codec

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Flags

func Flags(flags []cli.Flag) []cli.Flag

func Register

func Register(c Codec)

Types

type Codec

type Codec interface {
	String() string

	Flags([]cli.Flag) []cli.Flag
	Extensions() []string

	Sniff(io.ReaderAt) (int, []byte, error)
	Decode(io.Reader) (image.Image, error)
	Encode(io.Writer, image.Image, opts.Common) error
}

func All

func All() []Codec

func Detect

func Detect(output, override string) (Codec, error)

func Get

func Get(name string) (Codec, bool)

type Sniffed

type Sniffed struct {
	Header     []byte
	Confidence int
	Codec      Codec
}

func Sniff

func Sniff(reader io.Reader) (*Sniffed, io.Reader, error)

func (*Sniffed) String

func (s *Sniffed) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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