Documentation ¶
Index ¶
- func GetDimensions(file io.Reader) (int, int, error)
- func Resize(input io.ReadSeeker, format Format) (io.ReadSeekCloser, error)
- func ShrinkKeepAspect(width, height uint) []string
- func ThumbnailerInstalled()
- type ErrNoThumbnailer
- type FFmpeg
- type Format
- type ImageMagick
- type ResizeFunc
- type Thumbnailer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Resize ¶
func Resize(input io.ReadSeeker, format Format) (io.ReadSeekCloser, error)
func ShrinkKeepAspect ¶
func ThumbnailerInstalled ¶
func ThumbnailerInstalled()
Types ¶
type ErrNoThumbnailer ¶
type ErrNoThumbnailer string
func (ErrNoThumbnailer) Error ¶
func (e ErrNoThumbnailer) Error() string
type FFmpeg ¶
type FFmpeg struct {
Accept map[string]struct{}
}
func FFmpegThumbnailer ¶
func FFmpegThumbnailer() FFmpeg
func (FFmpeg) Resize ¶
func (ffm FFmpeg) Resize(input io.ReadSeeker, format Format) (io.ReadSeekCloser, error)
type Format ¶
type Format struct {
Width, Height uint
Mime string
Quality int
ResizeFunc ResizeFunc
}
type ImageMagick ¶
type ImageMagick struct {
Accept map[string]struct{}
}
func ImageMagickThumbnailer ¶
func ImageMagickThumbnailer() ImageMagick
func (ImageMagick) Accepts ¶
func (i ImageMagick) Accepts(mime string) bool
func (ImageMagick) Resize ¶
func (i ImageMagick) Resize(input io.ReadSeeker, format Format) (io.ReadSeekCloser, error)
type ResizeFunc ¶
type Thumbnailer ¶
type Thumbnailer interface { Accepts(string) bool Resize(io.ReadSeeker, Format) (io.ReadSeekCloser, error) }
Click to show internal directories.
Click to hide internal directories.