Versions in this module Expand all Collapse all v2 v2.6.8 Feb 5, 2021 Changes in this version + var ErrCantThumbnail = errors.New("thumbnail can't be generated") + var ErrGetFrame = errors.New("failed to get frame") + var ErrStreamNotFound = errors.New("no stream of this type found") + var ErrThumbnailingUnknown = errors.New("unknown thumbnailing error") + var ErrTooTall = ErrInvalidImage("image too tall") + var ErrTooWide = ErrInvalidImage("image too wide") + func DetectMIME(rs io.ReadSeeker, accepted map[string]bool) (mime, ext string, err error) + func RegisterMatcher(m Matcher) + func RegisterProcessor(mime string, fn Processor) + type AVError C.int + func (f AVError) Code() C.int + func (f AVError) Error() string + type Dims struct + Height uint + Width uint + type ErrArchive struct + Err error + func (e ErrArchive) Error() string + type ErrCoverArt struct + Err error + func (e ErrCoverArt) Error() string + type ErrInvalidImage string + func (e ErrInvalidImage) Error() string + type ErrUnsupportedMIME string + func (e ErrUnsupportedMIME) Error() string + type FFContext struct + func NewFFContext(rs io.ReadSeeker) (*FFContext, error) + func (c *FFContext) Close() + func (c *FFContext) CodecName(typ FFMediaType) (codec string, err error) + func (c *FFContext) CoverArt() []byte + func (c *FFContext) Dims() (dims Dims, err error) + func (c *FFContext) HasCoverArt() bool + func (c *FFContext) HasStream(typ FFMediaType) (bool, error) + func (c *FFContext) Length() time.Duration + func (c *FFContext) Meta() (m Meta) + func (c *FFContext) Thumbnail(dims Dims) (thumb image.Image, err error) + type FFMediaType int8 + const FFAudio + const FFUnknown + const FFVideo + type Matcher interface + Match func([]byte) (mime string, extension string) + type MatcherFunc func([]byte) (string, string) + func (fn MatcherFunc) Match(data []byte) (string, string) + type Meta struct + Artist string + Title string + type Options struct + AcceptedMimeTypes map[string]bool + MaxSourceDims Dims + ThumbDims Dims + type Processor func(io.ReadSeeker, *Source, Options) (image.Image, error) + type Source struct + Extension string + HasAudio bool + HasVideo bool + Length time.Duration + Mime string + func Process(rs io.ReadSeeker, opts Options) (src Source, thumb image.Image, err error) Other modules containing this package github.com/ElMaxo/thumbnailer