Documentation
¶
Overview ¶
Package thumbnail provides simple thumbnail generation for images.
Index ¶
- func Generate(src image.Image, opts Options) image.Image
- func GenerateAndSave(inputPath, outputPath string, opts Options) error
- func GenerateFromFile(path string, opts Options) (image.Image, error)
- func SaveGIF(img image.Image, w io.Writer) error
- func SaveJPEG(img image.Image, w io.Writer, quality int) error
- func SavePNG(img image.Image, w io.Writer) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
Generate creates a thumbnail from the source image. It maintains aspect ratio, fitting within the specified dimensions.
func GenerateAndSave ¶
GenerateAndSave is a convenience function that generates a thumbnail and saves it to a file.
func GenerateFromFile ¶
GenerateFromFile reads an image file and generates a thumbnail.
Types ¶
Click to show internal directories.
Click to hide internal directories.