Documentation
¶
Index ¶
- func Fill(imageBytes []byte, width, height int, maxBytes int, anchor imaging.Anchor) ([]byte, string, error)
- func Fit(imageBytes []byte, width, height int, maxBytes int) ([]byte, string, error)
- func FitRect(width, height int, maxWidth, maxHeight int) (newWidth, newHeight int)
- func GetMimeType(imageFormat string) (string, error)
- func GetThumbnail(imageBytes []byte, width, height int, maxBytes int) ([]byte, string, error)
- func ParseDetails(imageBytes []byte) (string, int, int, error)
- func ParseMimeType(imageBytes []byte) (string, error)
- func Resize(imageBytes []byte, width, height int, maxBytes int) ([]byte, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fill ¶
func Fill(imageBytes []byte, width, height int, maxBytes int, anchor imaging.Anchor) ([]byte, string, error)
Fill creates an image with the specified dimensions and fills it with the scaled source image. To achieve the correct aspect ratio without stretching, the source image will be cropped.
func GetMimeType ¶
GetMimeType returns the mime type for the given image format cooresponding to registered image types from the image package.
func GetThumbnail ¶
GetThumbnail creates an image in the given size, trying to encode it to the given max bytes
func ParseMimeType ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.