Documentation ¶
Index ¶
Constants ¶
View Source
const ( ModeAspectFitStr = "fit" ModeFillStr = "fill" ModeStretchStr = "stretch" )
String representations of resize modes
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ResizeMode ¶
type ResizeMode int
ResizeMode defines how the image should be resized
const ( ModeAspectFit ResizeMode = iota // Maintain aspect ratio, fit within dimensions ModeFill // Fill the dimensions, crop if necessary ModeStretch // Stretch/squish to exactly match dimensions )
func ParseResizeMode ¶
func ParseResizeMode(mode string) (ResizeMode, error)
ParseResizeMode converts a string to ResizeMode
type ResizeOptions ¶
type ResizeOptions struct { Width int Height int Mode ResizeMode Filter imaging.ResampleFilter }
ResizeOptions contains all options for image resizing
Click to show internal directories.
Click to hide internal directories.