Versions in this module Expand all Collapse all v1 v1.6.4 Mar 7, 2023 Changes in this version + var ErrUnsupportedFormat = errors.New("imaging: unsupported image format") + func AdjustBrightness(img image.Image, percentage float64) *image.NRGBA + func AdjustContrast(img image.Image, percentage float64) *image.NRGBA + func AdjustFunc(img image.Image, fn func(c color.NRGBA) color.NRGBA) *image.NRGBA + func AdjustGamma(img image.Image, gamma float64) *image.NRGBA + func AdjustHue(img image.Image, shift float64) *image.NRGBA + func AdjustSaturation(img image.Image, percentage float64) *image.NRGBA + func AdjustSigmoid(img image.Image, midpoint, factor float64) *image.NRGBA + func Blur(img image.Image, sigma float64) *image.NRGBA + func Clone(img image.Image) *image.NRGBA + func Convolve3x3(img image.Image, kernel [9]float64, options *ConvolveOptions) *image.NRGBA + func Convolve5x5(img image.Image, kernel [25]float64, options *ConvolveOptions) *image.NRGBA + func Crop(img image.Image, rect image.Rectangle) *image.NRGBA + func CropAnchor(img image.Image, width, height int, anchor Anchor) *image.NRGBA + func CropCenter(img image.Image, width, height int) *image.NRGBA + func Decode(r io.Reader, opts ...DecodeOption) (image.Image, error) + func Encode(w io.Writer, img image.Image, format Format, opts ...EncodeOption) error + func Fill(img image.Image, width, height int, anchor Anchor, filter ResampleFilter) *image.NRGBA + func Fit(img image.Image, width, height int, filter ResampleFilter) *image.NRGBA + func FlipH(img image.Image) *image.NRGBA + func FlipV(img image.Image) *image.NRGBA + func Grayscale(img image.Image) *image.NRGBA + func Histogram(img image.Image) [256]float64 + func Invert(img image.Image) *image.NRGBA + func New(width, height int, fillColor color.Color) *image.NRGBA + func Open(filename string, opts ...DecodeOption) (image.Image, error) + func Overlay(background, img image.Image, pos image.Point, opacity float64) *image.NRGBA + func OverlayCenter(background, img image.Image, opacity float64) *image.NRGBA + func Paste(background, img image.Image, pos image.Point) *image.NRGBA + func PasteCenter(background, img image.Image) *image.NRGBA + func Resize(img image.Image, width, height int, filter ResampleFilter) *image.NRGBA + func Rotate(img image.Image, angle float64, bgColor color.Color) *image.NRGBA + func Rotate180(img image.Image) *image.NRGBA + func Rotate270(img image.Image) *image.NRGBA + func Rotate90(img image.Image) *image.NRGBA + func Save(img image.Image, filename string, opts ...EncodeOption) (err error) + func SetMaxProcs(value int) + func Sharpen(img image.Image, sigma float64) *image.NRGBA + func Thumbnail(img image.Image, width, height int, filter ResampleFilter) *image.NRGBA + func Transpose(img image.Image) *image.NRGBA + func Transverse(img image.Image) *image.NRGBA + type Anchor int + const Bottom + const BottomLeft + const BottomRight + const Center + const Left + const Right + const Top + const TopLeft + const TopRight + type ConvolveOptions struct + Abs bool + Bias int + Normalize bool + type DecodeOption func(*decodeConfig) + func AutoOrientation(enabled bool) DecodeOption + type EncodeOption func(*encodeConfig) + func GIFDrawer(drawer draw.Drawer) EncodeOption + func GIFNumColors(numColors int) EncodeOption + func GIFQuantizer(quantizer draw.Quantizer) EncodeOption + func JPEGQuality(quality int) EncodeOption + func PNGCompressionLevel(level png.CompressionLevel) EncodeOption + type Format int + const BMP + const GIF + const JPEG + const PNG + const TIFF + func FormatFromExtension(ext string) (Format, error) + func FormatFromFilename(filename string) (Format, error) + func (f Format) String() string + type ResampleFilter struct + Kernel func(float64) float64 + Support float64 + var BSpline ResampleFilter + var Bartlett ResampleFilter + var Blackman ResampleFilter + var Box ResampleFilter + var CatmullRom ResampleFilter + var Cosine ResampleFilter + var Gaussian ResampleFilter + var Hamming ResampleFilter + var Hann ResampleFilter + var Hermite ResampleFilter + var Lanczos ResampleFilter + var Linear ResampleFilter + var MitchellNetravali ResampleFilter + var NearestNeighbor ResampleFilter + var Welch ResampleFilter