Documentation ¶ Index ¶ func Thumbnail(dims Dims, inputFile string) (thumb image.Image, err error) func ThumbnailPercentage(percentage float64, inputFile string) (thumb image.Image, err error) type Dims Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Thumbnail ¶ func Thumbnail(dims Dims, inputFile string) (thumb image.Image, err error) func ThumbnailPercentage ¶ added in v0.8.19 func ThumbnailPercentage(percentage float64, inputFile string) (thumb image.Image, err error) Types ¶ type Dims ¶ type Dims struct { Width uint `yaml:"width"` Height uint `yaml:"height"` } Dims denote the maximum width and height of the thumbnail The algorithm will try to resize the image to the maximum possible size that preserves the aspect ratio and fits within the given dimensions. Source Files ¶ View all Source files thumbnail.go Click to show internal directories. Click to hide internal directories.