Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AnchorPositions = map[string]gift.Anchor{ strings.ToLower("Center"): gift.CenterAnchor, strings.ToLower("TopLeft"): gift.TopLeftAnchor, strings.ToLower("Top"): gift.TopAnchor, strings.ToLower("TopRight"): gift.TopRightAnchor, strings.ToLower("Left"): gift.LeftAnchor, strings.ToLower("Right"): gift.RightAnchor, strings.ToLower("BottomLeft"): gift.BottomLeftAnchor, strings.ToLower("Bottom"): gift.BottomAnchor, strings.ToLower("BottomRight"): gift.BottomRightAnchor, }
View Source
var Hints = map[string]webpoptions.EncodingPreset{ "picture": webpoptions.EncodingPresetPicture, "photo": webpoptions.EncodingPresetPhoto, "drawing": webpoptions.EncodingPresetDrawing, "icon": webpoptions.EncodingPresetIcon, "text": webpoptions.EncodingPresetText, }
These encoding hints are currently only relevant for Webp.
View Source
var ImageFilters = map[string]gift.Resampling{ strings.ToLower("NearestNeighbor"): gift.NearestNeighborResampling, strings.ToLower("Box"): gift.BoxResampling, strings.ToLower("Linear"): gift.LinearResampling, strings.ToLower("Hermite"): hermiteResampling, strings.ToLower("MitchellNetravali"): mitchellNetravaliResampling, strings.ToLower("CatmullRom"): catmullRomResampling, strings.ToLower("BSpline"): bSplineResampling, strings.ToLower("Gaussian"): gaussianResampling, strings.ToLower("Lanczos"): gift.LanczosResampling, strings.ToLower("Hann"): hannResampling, strings.ToLower("Hamming"): hammingResampling, strings.ToLower("Blackman"): blackmanResampling, strings.ToLower("Bartlett"): bartlettResampling, strings.ToLower("Welch"): welchResampling, strings.ToLower("Cosine"): cosineResampling, }
Functions ¶
func AddColorToPalette ¶
AddColorToPalette adds c as the first color in p if not already there. Note that it does no additional checks, so callers must make sure that the palette is valid for the relevant format.
func ColorToHexString ¶
ColorToHexString converts a color to a hex string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.