Versions in this module Expand all Collapse all v1 v1.0.0 Aug 23, 2024 Changes in this version + const BMP + const Box + const CatmullRom + const GIF + const JPEG + const JPG + const Lanczos + const Linear + const NearestNeighbor + const PNG + const TIFF + const WEBP + var ErrUnsupportedFormat = errors.New("imaging: unsupported image format") + var ErrUnsupportedParameter = errors.New("imaging: unsupported image parameter") + func AddjustBright(img image.Image, option BrightnessOption) image.Image + func AddjustContrast(img image.Image, option ContrastOption) image.Image + func AddjustGamma(img image.Image, option GammaOption) image.Image + func AddjustRotate(img image.Image, option RotateOption) image.Image + func AddjustSaturation(img image.Image, option SaturationOption) image.Image + func AddjustSharpen(img image.Image, option SharpenOption) image.Image + func AdjustBlur(img image.Image, option BlurOption) image.Image + func CropImage(img image.Image, option CropOption) image.Image + func CropPositionPoint(img image.Image, node Position, w, h float64) (x, y float64) + func DecodeImage(file io.Reader, format Format) (img image.Image, err error) + func DownloadImage(url string) (image.Image, string, error) + func EncodeImage(img image.Image, w io.Writer, format Format, quality int) error + func LoadGif(filePath string) (*gif.GIF, error) + func ParseHexColor(s string) (*color.RGBA, error) + func ParseRGBAColor(c *color.RGBA) string + func Process(img image.Image, w io.Writer, originalFormat Format, options []Option) error + func ProcessGif(gifImg *gif.GIF, w io.Writer, options []Option) error + func ResizeGif(gifImg *gif.GIF, option ResizeOption) + func ResizeImage(img image.Image, option ResizeOption) image.Image + func SaveImage(img image.Image, filePath string, format Format, quality int) error + func SerializeOptions(options []Option) string + func TextWatermarkPositionPoint(img image.Image, option TextWatermarkOption, w, h float64) (x, y float64) + func WarterMarkText(img image.Image, option TextWatermarkOption) image.Image + type BlurOption struct + Radius int + type BrightnessOption struct + Value int + type ContrastOption struct + Value int + type CropOption struct + Height int + Position Position + Width int + X int + Y int + type Format string + func FormatFromExtension(ext string) (Format, error) + func FormatFromFilename(filename string) (Format, error) + func LoadImage(filePath string) (image.Image, Format, error) + type FormatOption struct + Format Format + type GammaOption struct + Value float64 + type HueOption struct + Value int + type Option struct + Option interface{} + Parameter Parameter + func ParseOptions(parameterStr string) (options []Option, err error) + func ParseUrlOptions(urlstr string) ([]Option, error) + type Parameter string + const Blur + const Brightness + const Contrast + const Crop + const FormatType + const Gamma + const Hue + const Quality + const Resize + const Rotate + const Saturation + const Sharpen + const Watermark + type Position string + const Auto + const Center + const East + const Face + const North + const NorthEast + const NorthWest + const South + const SouthEast + const SouthWest + const West + type QualityOption struct + Fiter imaging.ResampleFilter + Quality int + type ResizeMode string + const Fill + const Fixed + const Lfit + const Mfit + const Pad + type ResizeOption struct + Color *color.RGBA + Height int + Limit int + Longer int + ResizeMode ResizeMode + Shorter int + Width int + type RotateOption struct + Value int + type SaturationOption struct + Value int + type SharpenOption struct + Value int + type TextWatermarkOption struct + Color *color.RGBA + Rotate int + Shadow int + Size int + Text string + Type string + type WatermarkOption struct + Fill int + Opacity int + Padx int + Pady int + Position Position + Voffset int + X int + Y int