imagemeta

package
v3.24.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFormat = errors.New("unknown image format")
)
View Source
var ErrWebpInvalidFormat = errors.New("webp: invalid format")

Functions

func BestIcoPage

func BestIcoPage(r io.Reader) (int, int, error)

func IsSVG

func IsSVG(r io.Reader) bool

func RegisterFormat

func RegisterFormat(magic string, decodeMeta DecodeMetaFunc)

Types

type BmpFormatError

type BmpFormatError string

func (BmpFormatError) Error

func (e BmpFormatError) Error() string

type DecodeMetaFunc

type DecodeMetaFunc func(io.Reader) (Meta, error)

type IcoMeta

type IcoMeta struct {
	Meta
	// contains filtered or unexported fields
}

func DecodeIcoMeta

func DecodeIcoMeta(r io.Reader) (*IcoMeta, error)

func (*IcoMeta) BestImageOffset

func (m *IcoMeta) BestImageOffset() int

func (*IcoMeta) BestImageSize

func (m *IcoMeta) BestImageSize() int

type JpegFormatError

type JpegFormatError string

func (JpegFormatError) Error

func (e JpegFormatError) Error() string

type Meta

type Meta interface {
	Format() imagetype.Type
	Width() int
	Height() int
}

func DecodeBmpMeta

func DecodeBmpMeta(r io.Reader) (Meta, error)

func DecodeGifMeta

func DecodeGifMeta(r io.Reader) (Meta, error)

func DecodeHeifMeta

func DecodeHeifMeta(r io.Reader) (Meta, error)

func DecodeJpegMeta

func DecodeJpegMeta(rr io.Reader) (Meta, error)

func DecodeMeta

func DecodeMeta(r io.Reader) (Meta, error)

func DecodePngMeta

func DecodePngMeta(r io.Reader) (Meta, error)

func DecodeTiffMeta

func DecodeTiffMeta(rr io.Reader) (Meta, error)

func DecodeWebpMeta

func DecodeWebpMeta(r io.Reader) (Meta, error)

type PngFormatError

type PngFormatError string

func (PngFormatError) Error

func (e PngFormatError) Error() string

type TiffFormatError

type TiffFormatError string

func (TiffFormatError) Error

func (e TiffFormatError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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