Versions in this module Expand all Collapse all v1 v1.3.8 Jul 25, 2020 Changes in this version + const DefaultFont + const MajorVersion + const MicroVersion + const MinorVersion + const Version + var ErrUnsupportedImageFormat = errors.New("unsupported image format") + var ImageTypes = map[ImageType]string + func ClearCache() + func IsTypeSupported(imageType ImageType) bool + func PrintCache() + func PrintObjectReport(label string) + func ReadRuntimeStats(stats *RuntimeStats) + func ReadVipsMemStats(stats *MemoryStats) + func Shutdown() + func ShutdownThread() + func Startup(config *Config) + type Align int + const AlignCenter + const AlignHigh + const AlignLow + type Angle int + const Angle0 + const Angle180 + const Angle270 + const Angle90 + func GetRotationAngleFromExif(orientation int) (Angle, bool) + type Angle45 int + const Angle45_0 + const Angle45_135 + const Angle45_180 + const Angle45_225 + const Angle45_270 + const Angle45_315 + const Angle45_45 + const Angle45_90 + type BandFormat int + const BandFormatChar + const BandFormatComplex + const BandFormatDouble + const BandFormatDpComplex + const BandFormatFloat + const BandFormatInt + const BandFormatNotSet + const BandFormatShort + const BandFormatUchar + const BandFormatUint + const BandFormatUshort + type BlendMode int + const BlendModeAdd + const BlendModeAtop + const BlendModeClear + const BlendModeColorBurn + const BlendModeColorDodge + const BlendModeDarken + const BlendModeDest + const BlendModeDestAtop + const BlendModeDestIn + const BlendModeDestOut + const BlendModeDestOver + const BlendModeDifference + const BlendModeExclusion + const BlendModeHardLight + const BlendModeIn + const BlendModeLighten + const BlendModeMultiply + const BlendModeOut + const BlendModeOver + const BlendModeOverlay + const BlendModeSaturate + const BlendModeScreen + const BlendModeSoftLight + const BlendModeSource + const BlendModeXOR + type Coding int + const CodingError + const CodingLABQ + const CodingNone + const CodingRAD + type Color struct + B uint8 + G uint8 + R uint8 + type Config struct + CacheTrace bool + CollectStats bool + ConcurrencyLevel int + MaxCacheFiles int + MaxCacheMem int + MaxCacheSize int + ReportLeaks bool + type Direction int + const DirectionHorizontal + const DirectionVertical + type ExportParams struct + Compression int + Effort int + Format ImageType + Interlaced bool + Lossless bool + Quality int + func NewDefaultExportParams() *ExportParams + func NewDefaultJPEGExportParams() *ExportParams + func NewDefaultPNGExportParams() *ExportParams + func NewDefaultWEBPExportParams() *ExportParams + type ExtendStrategy int + const ExtendBackground + const ExtendBlack + const ExtendCopy + const ExtendMirror + const ExtendRepeat + const ExtendWhite + type ImageMetadata struct + Colorspace Interpretation + Format ImageType + Height int + Orientation int + Width int + type ImageRef struct + func NewImageFromBuffer(buf []byte) (*ImageRef, error) + func NewImageFromFile(file string) (*ImageRef, error) + func NewImageFromReader(r io.Reader) (*ImageRef, error) + func (r *ImageRef) AddAlpha() error + func (r *ImageRef) AutoRotate() error + func (r *ImageRef) BandFormat() BandFormat + func (r *ImageRef) BandJoin(images ...*ImageRef) error + func (r *ImageRef) Bands() int + func (r *ImageRef) Close() + func (r *ImageRef) Coding() Coding + func (r *ImageRef) ColorSpace() Interpretation + func (r *ImageRef) Composite(overlay *ImageRef, mode BlendMode, x, y int) error + func (r *ImageRef) Copy() (*ImageRef, error) + func (r *ImageRef) Embed(left, top, width, height int, extend ExtendStrategy) error + func (r *ImageRef) Export(params *ExportParams) ([]byte, *ImageMetadata, error) + func (r *ImageRef) ExtractArea(left, top, width, height int) error + func (r *ImageRef) ExtractBand(band int, num int) error + func (r *ImageRef) Flatten(backgroundColor *Color) error + func (r *ImageRef) Flip(direction Direction) error + func (r *ImageRef) Format() ImageType + func (r *ImageRef) GaussianBlur(sigma float64) error + func (r *ImageRef) GetOrientation() int + func (r *ImageRef) HasAlpha() bool + func (r *ImageRef) HasICCProfile() bool + func (r *ImageRef) HasIPTC() bool + func (r *ImageRef) HasProfile() bool + func (r *ImageRef) Height() int + func (r *ImageRef) Interpretation() Interpretation + func (r *ImageRef) Invert() error + func (r *ImageRef) IsColorSpaceSupported() bool + func (r *ImageRef) Label(labelParams *LabelParams) error + func (r *ImageRef) Linear(a, b []float64) error + func (r *ImageRef) Linear1(a, b float64) error + func (r *ImageRef) Metadata() *ImageMetadata + func (r *ImageRef) Modulate(brightness, saturation float64, hue int) error + func (r *ImageRef) ModulateHSV(brightness, saturation float64, hue int) error + func (r *ImageRef) OffsetX() int + func (r *ImageRef) OffsetY() int + func (r *ImageRef) OptimizeICCProfile() error + func (r *ImageRef) PremultiplyAlpha() error + func (r *ImageRef) RemoveICCProfile() error + func (r *ImageRef) RemoveMetadata() error + func (r *ImageRef) RemoveOrientation() error + func (r *ImageRef) ResX() float64 + func (r *ImageRef) ResY() float64 + func (r *ImageRef) Resize(scale float64, kernel Kernel) error + func (r *ImageRef) ResizeWithVScale(hScale, vScale float64, kernel Kernel) error + func (r *ImageRef) Rotate(angle Angle) error + func (r *ImageRef) SetOrientation(orientation int) error + func (r *ImageRef) Sharpen(sigma float64, x1 float64, m2 float64, mode SharpenMode) error + func (r *ImageRef) ToBytes() ([]byte, error) + func (r *ImageRef) ToColorSpace(interpretation Interpretation) error + func (r *ImageRef) UnpremultiplyAlpha() error + func (r *ImageRef) Width() int + func (r *ImageRef) Zoom(xFactor int, yFactor int) error + type ImageType int + const ImageTypeBMP + const ImageTypeGIF + const ImageTypeHEIF + const ImageTypeJPEG + const ImageTypeMagick + const ImageTypePDF + const ImageTypePNG + const ImageTypeSVG + const ImageTypeTIFF + const ImageTypeUnknown + const ImageTypeWEBP + func DetermineImageType(buf []byte) ImageType + func (i ImageType) FileExt() string + type Interpretation int + const InterpretationBW + const InterpretationCMC + const InterpretationCMYK + const InterpretationError + const InterpretationFourier + const InterpretationGB16 + const InterpretationGrey16 + const InterpretationHSV + const InterpretationHistogram + const InterpretationLAB + const InterpretationLABQ + const InterpretationLABS + const InterpretationLCH + const InterpretationMatrix + const InterpretationMultiband + const InterpretationRGB + const InterpretationRGB16 + const InterpretationSRGB + const InterpretationScRGB + const InterpretationXYZ + const InterpretationYXY + type Kernel int + const KernelAuto + const KernelCubic + const KernelLanczos2 + const KernelLanczos3 + const KernelLinear + const KernelMitchell + const KernelNearest + type LabelParams struct + Alignment Align + Color Color + Font string + Height Scalar + OffsetX Scalar + OffsetY Scalar + Opacity float32 + Text string + Width Scalar + type MemoryStats struct + Allocs int64 + Files int64 + Mem int64 + MemHigh int64 + type PreMultiplicationState struct + type RuntimeStats struct + OperationCounts map[string]int64 + type Scalar struct + Relative bool + Value float64 + func ValueOf(value float64) Scalar + func (s *Scalar) Get(base int) float64 + func (s *Scalar) GetRounded(base int) int + func (s *Scalar) IsZero() bool + func (s *Scalar) Set(value float64) + func (s *Scalar) SetInt(value int) + func (s *Scalar) SetScale(f float64) + type SharpenMode int + const SharpenModeLuminescence + const SharpenModeRGB