codec

package
v0.0.0-...-750c881 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec interface {
	Encode(io.Writer, image.Image) error
	Decode(io.Reader) (image.Image, error)
}

type JPEGCodec

type JPEGCodec struct {
	// contains filtered or unexported fields
}

func NewJPEGCodec

func NewJPEGCodec(opts jpeg.Options) *JPEGCodec

func (*JPEGCodec) Decode

func (c *JPEGCodec) Decode(reader io.Reader) (image.Image, error)

func (*JPEGCodec) Encode

func (c *JPEGCodec) Encode(writer io.Writer, img image.Image) error

type Passthrough

type Passthrough struct {
	// contains filtered or unexported fields
}

Passthrough should be used as a codec when both sides are the same.

func NewPassthrough

func NewPassthrough() *Passthrough

func (*Passthrough) Decode

func (c *Passthrough) Decode(reader io.Reader) (image.Image, error)

func (*Passthrough) Encode

func (c *Passthrough) Encode(writer io.Writer, img image.Image) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL