Versions in this module Expand all Collapse all v0 v0.63.3 Jan 28, 2020 Changes in this version + func AddColorToPalette(c color.Color, p color.Palette) color.Palette + func IsOpaque(img image.Image) bool + func ReplaceColorInPalette(c color.Color, p color.Palette) + func ToFilters(in interface{}) []gift.Filter + type ExifConfig struct + DisableDate bool + DisableLatLong bool + ExcludeFields string + IncludeFields string + type Filters struct + func (*Filters) Brightness(percentage interface{}) gift.Filter + func (*Filters) ColorBalance(percentageRed, percentageGreen, percentageBlue interface{}) gift.Filter + func (*Filters) Colorize(hue, saturation, percentage interface{}) gift.Filter + func (*Filters) Contrast(percentage interface{}) gift.Filter + func (*Filters) Gamma(gamma interface{}) gift.Filter + func (*Filters) GaussianBlur(sigma interface{}) gift.Filter + func (*Filters) Grayscale() gift.Filter + func (*Filters) Hue(shift interface{}) gift.Filter + func (*Filters) Invert() gift.Filter + func (*Filters) Pixelate(size interface{}) gift.Filter + func (*Filters) Saturation(percentage interface{}) gift.Filter + func (*Filters) Sepia(percentage interface{}) gift.Filter + func (*Filters) Sigmoid(midpoint, factor interface{}) gift.Filter + func (*Filters) UnsharpMask(sigma, amount, threshold interface{}) gift.Filter + type Format int + const BMP + const GIF + const JPEG + const PNG + const TIFF + func ImageFormatFromExt(ext string) (Format, bool) + func (f Format) DefaultExtension() string + func (f Format) MediaType() media.Type + func (f Format) RequiresDefaultQuality() bool + func (f Format) SupportsTransparency() bool + type Image struct + Format Format + Proc *ImageProcessor + Spec Spec + func NewImage(f Format, proc *ImageProcessor, img image.Image, s Spec) *Image + func (i *Image) EncodeTo(conf ImageConfig, img image.Image, w io.Writer) error + func (i *Image) Height() int + func (i *Image) InitConfig(r io.Reader) error + func (i *Image) Width() int + func (i Image) WithImage(img image.Image) *Image + func (i Image) WithSpec(s Spec) *Image + type ImageConfig struct + Action string + Anchor gift.Anchor + AnchorStr string + BgColor color.Color + BgColorStr string + Filter gift.Resampling + FilterStr string + Height int + Key string + Quality int + Rotate int + TargetFormat Format + Width int + func DecodeImageConfig(action, config string, defaults Imaging) (ImageConfig, error) + func (i ImageConfig) GetKey(format Format) string + type ImageProcessor struct + Cfg ImagingConfig + func NewImageProcessor(cfg ImagingConfig) (*ImageProcessor, error) + func (p *ImageProcessor) ApplyFiltersFromConfig(src image.Image, conf ImageConfig) (image.Image, error) + func (p *ImageProcessor) DecodeExif(r io.Reader) (*exif.Exif, error) + func (p *ImageProcessor) Filter(src image.Image, filters ...gift.Filter) (image.Image, error) + func (p *ImageProcessor) GetDefaultImageConfig(action string) ImageConfig + type Imaging struct + Anchor string + BgColor string + Exif ExifConfig + Quality int + ResampleFilter string + type ImagingConfig struct + BgColor color.Color + Cfg Imaging + func DecodeConfig(m map[string]interface{}) (ImagingConfig, error) + type Spec interface + ReadSeekCloser func() (hugio.ReadSeekCloser, error)