Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MediaTypeJpeg is the mime type for jpeg images MediaTypeJpeg = "image/jpeg" // MediaTypePng is the mime type for png images MediaTypePng = "image/png" // MediaTypeGif is the mime type for gif images MediaTypeGif = "image/gif" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image interface { goimg.Image Duplicate() Image Size() Size Draw(img Image, x, y int, over bool) Resize(width, height int) ResizeFit(width, height int) ResizeLimit(width, height int) Crop(x, y, w, h int) ResizeFill(width, height int) ToJpeg(quality int) (*bytes.Buffer, error) ToPng(level PngCompressionOpt) (*bytes.Buffer, error) ToBase64(quality int) (string, error) }
Image is an open image file
type Options ¶
type Options struct { Width int Height int ThumbWidth int ThumbHeight int Quality int ThumbQuality int Fill bool }
Options represent the image options of the loaded image
type PngCompressionOpt ¶
type PngCompressionOpt int
const ( PngDefault PngCompressionOpt = iota PngNone PngFast PngBest )
Click to show internal directories.
Click to hide internal directories.