Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrImageConfig = "Cannot obtain image config from the file" ErrColorPalette = "Cannot obtain color palette from the image" ErrImageBase64 = "Cannot convert resized image to base64 string" )
Meaningful error messages
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
Image has basic file properties of the image
func (*Image) AspectRatio ¶
AspectRatio returns the aspect ratio of the image
func (*Image) ColorPalette ¶
ColorPalette returns the extracted colors from the image
func (*Image) Dimensions ¶
Dimensions returns the height/width of the image
func (*Image) PreviewEnhancedSrc ¶
PreviewEnhancedSrc returns base64-encoded image which can be used as placeholder for large dimension preview
func (*Image) PreviewSrc ¶
PreviewSrc returns base64-encoded image which can be used as placeholder for small dimension preview
type ImageOps ¶
type ImageOps interface { // Returns the height/width of the image Dimensions() (int, int) // Returns the aspect ratio of the image AspectRatio() float64 // Returns a low quality placeholder base64 string PreviewSrc() (string, error) // Returns a low quality placeholder base64 string PreviewEnhancedSrc() (string, error) // Returns the color palette of the image ColorPalette() (map[string]Color, error) }
ImageOps - List of public image functions form Image struct
Click to show internal directories.
Click to hide internal directories.