Versions in this module Expand all Collapse all v1 v1.1.10 Dec 2, 2022 Changes in this version + const ApertureValue + const BrightnessValue + const ColorSpace + const ComponentsConfiguration + const Compression + const DateTimeDigitized + const DateTimeOriginal + const Datetime + const ExifVersion + const ExposureBiasValue + const ExposureMode + const ExposureProgram + const ExposureTime + const FNumber + const Flash + const FocalLength + const FocalLengthIn35mmFilm + const GPSAltitude + const GPSAltitudeRef + const GPSDateStamp + const GPSDestBearing + const GPSDestBearingRef + const GPSImgDirection + const GPSImgDirectionRef + const GPSLatitude + const GPSLatitudeRef + const GPSLongitude + const GPSLongitudeRef + const GPSSpeed + const GPSSpeedRef + const ISOSpeedRatings + const Make + const MakerNote + const MeteringMode + const Model + const Orientation + const PixelXDimension + const PixelYDimension + const Quality + const ResolutionUnit + const SceneCaptureType + const SceneType + const SensingMethod + const ShutterSpeedValue + const Software + const SubSecTimeDigitized + const SubSecTimeOriginal + const SubjectArea + const Version + const VipsMajorVersion + const VipsMinorVersion + const VipsVersion + const WhiteBalance + const XResolution + const YCbCrPositioning + const YResolution + var ColorBlack = Color + var ErrExtractAreaParamsRequired = errors.New("extract area width/height params are required") + var ImageTypes = map[ImageType]string + var SupportedImageTypes = map[ImageType]SupportedImageType + var WatermarkFont = "sans 10" + func ColourspaceIsSupported(buf []byte) (bool, error) + func DetermineImageTypeName(buf []byte) string + func ImageTypeName(t ImageType) string + func Initialize() + func IsSVGImage(buf []byte) bool + func IsTypeNameSupported(t string) bool + func IsTypeNameSupportedSave(t string) bool + func IsTypeSupported(t ImageType) bool + func IsTypeSupportedSave(t ImageType) bool + func MaxSize() int + func Read(path string) ([]byte, error) + func Resize(buf []byte, o Options) ([]byte, error) + func SetMaxsize(s int) error + func Shutdown() + func VipsCacheDropAll() + func VipsCacheSetMax(maxCacheSize int) + func VipsCacheSetMaxMem(maxCacheMem int) + func VipsDebugInfo() + func VipsIsTypeSupported(t ImageType) bool + func VipsIsTypeSupportedSave(t ImageType) bool + func VipsVectorSetEnabled(enable bool) + func Write(path string, buf []byte) error + type Angle int + const D0 + const D135 + const D180 + const D235 + const D270 + const D315 + const D45 + const D90 + type Color struct + B uint8 + G uint8 + R uint8 + type Direction int + const Horizontal + const Vertical + type EXIF struct + ApertureValue string + BrightnessValue string + ColorSpace int + ComponentsConfiguration string + Compression int + DateTimeDigitized string + DateTimeOriginal string + Datetime string + ExifVersion string + ExposureBiasValue string + ExposureMode int + ExposureProgram int + ExposureTime string + FNumber string + Flash int + FocalLength string + FocalLengthIn35mmFilm int + GPSAltitude string + GPSAltitudeRef string + GPSDateStamp string + GPSDestBearing string + GPSDestBearingRef string + GPSImgDirection string + GPSImgDirectionRef string + GPSLatitude string + GPSLatitudeRef string + GPSLongitude string + GPSLongitudeRef string + GPSSpeed string + GPSSpeedRef string + ISOSpeedRatings int + Make string + MakerNote string + MeteringMode int + Model string + Orientation int + PixelXDimension int + PixelYDimension int + ResolutionUnit int + SceneCaptureType int + SceneType string + SensingMethod int + ShutterSpeedValue string + Software string + SubSecTimeDigitized string + SubSecTimeOriginal string + SubjectArea string + WhiteBalance int + XResolution string + YCbCrPositioning int + YResolution string + type Extend int + const ExtendBackground + const ExtendBlack + const ExtendCopy + const ExtendLast + const ExtendMirror + const ExtendRepeat + const ExtendWhite + type GaussianBlur struct + MinAmpl float64 + Sigma float64 + type Gravity int + const GravityCentre + const GravityEast + const GravityNorth + const GravitySmart + const GravitySouth + const GravityWest + type Image struct + func NewImage(buf []byte) *Image + func (i *Image) AutoRotate() ([]byte, error) + func (i *Image) Colourspace(c Interpretation) ([]byte, error) + func (i *Image) ColourspaceIsSupported() (bool, error) + func (i *Image) Convert(t ImageType) ([]byte, error) + func (i *Image) Crop(width, height int, gravity Gravity) ([]byte, error) + func (i *Image) CropByHeight(height int) ([]byte, error) + func (i *Image) CropByWidth(width int) ([]byte, error) + func (i *Image) Enlarge(width, height int) ([]byte, error) + func (i *Image) EnlargeAndCrop(width, height int) ([]byte, error) + func (i *Image) Extract(top, left, width, height int) ([]byte, error) + func (i *Image) Flip() ([]byte, error) + func (i *Image) Flop() ([]byte, error) + func (i *Image) ForceResize(width, height int) ([]byte, error) + func (i *Image) Gamma(exponent float64) ([]byte, error) + func (i *Image) Image() []byte + func (i *Image) Interpretation() (Interpretation, error) + func (i *Image) Length() int + func (i *Image) Metadata() (ImageMetadata, error) + func (i *Image) Process(o Options) ([]byte, error) + func (i *Image) Resize(width, height int) ([]byte, error) + func (i *Image) ResizeAndCrop(width, height int) ([]byte, error) + func (i *Image) Rotate(a Angle) ([]byte, error) + func (i *Image) Size() (ImageSize, error) + func (i *Image) SmartCrop(width, height int) ([]byte, error) + func (i *Image) Thumbnail(pixels int) ([]byte, error) + func (i *Image) Trim() ([]byte, error) + func (i *Image) Type() string + func (i *Image) Watermark(w Watermark) ([]byte, error) + func (i *Image) WatermarkImage(w WatermarkImage) ([]byte, error) + func (i *Image) Zoom(factor int) ([]byte, error) + type ImageMetadata struct + Alpha bool + Channels int + Colourspace string + EXIF EXIF + Orientation int + Profile bool + Size ImageSize + Space string + Type string + func Metadata(buf []byte) (ImageMetadata, error) + type ImageSize struct + Height int + Width int + func Size(buf []byte) (ImageSize, error) + type ImageType int + const AVIF + const GIF + const HEIF + const JPEG + const MAGICK + const PDF + const PNG + const SVG + const TIFF + const UNKNOWN + const WEBP + func DetermineImageType(buf []byte) ImageType + type Interpolator int + const Bicubic + const Bilinear + const Nearest + const Nohalo + func (i Interpolator) String() string + type Interpretation int + const InterpretationBW + const InterpretationCMYK + const InterpretationError + const InterpretationGREY16 + const InterpretationLAB + const InterpretationMultiband + const InterpretationRGB + const InterpretationRGB16 + const InterpretationSRGB + const InterpretationScRGB + const InterpretationXYZ + func ImageInterpretation(buf []byte) (Interpretation, error) + type Options struct + AreaHeight int + AreaWidth int + Background Color + Brightness float64 + Compression int + Contrast float64 + Crop bool + Embed bool + Enlarge bool + Extend Extend + Flip bool + Flop bool + Force bool + Gamma float64 + GaussianBlur GaussianBlur + Gravity Gravity + Height int + InputICC string + Interlace bool + Interpolator Interpolator + Interpretation Interpretation + Left int + Lossless bool + NoAutoRotate bool + NoProfile bool + OutputICC string + Palette bool + Quality int + Rotate Angle + Sharpen Sharpen + SmartCrop bool + Speed int + StripMetadata bool + Threshold float64 + Top int + Trim bool + Type ImageType + Watermark Watermark + WatermarkImage WatermarkImage + Width int + Zoom int + type Sharpen struct + M1 float64 + M2 float64 + Radius int + X1 float64 + Y2 float64 + Y3 float64 + type SupportedImageType struct + Load bool + Save bool + func IsImageTypeSupportedByVips(t ImageType) SupportedImageType + type VipsMemoryInfo struct + Allocations int64 + Memory int64 + MemoryHighwater int64 + func VipsMemory() VipsMemoryInfo + type Watermark struct + Background Color + DPI int + Font string + Margin int + NoReplicate bool + Opacity float32 + Text string + Width int + type WatermarkImage struct + Buf []byte + Left int + Opacity float32 + Top int