Versions in this module Expand all Collapse all v0 v0.1.0 Jul 11, 2026 Changes in this version + const DefaultMaxPixels + const DefaultMaxSide + var BMP = Format + var ErrTooLarge = errors.New("imgprobe: image exceeds size limits") + var ErrUnsupported = errors.New("imgprobe: unsupported or invalid image") + var GIF = Format + var JPEG = Format + var PNG = Format + var TIFF = Format + var WEBP = Format + func Sniff(head []byte, opts ...Option) (format, contentType string, err error) + type DecodeConfigFunc func(data []byte) (width, height int, err error) + type Format struct + func NewFormat(name, contentType string, magic []byte, dc DecodeConfigFunc) Format + func (f Format) ContentType() string + func (f Format) Name() string + type Option func(*config) + func WithFormats(formats ...Format) Option + func WithMaxPixels(n int64) Option + func WithMaxSide(n int) Option + func WithOrientation(orientation int) Option + type Result struct + ContentType string + Format string + Height int + Width int + func Config(data []byte, opts ...Option) (Result, error)