vips

package
v0.0.0-...-67469c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2018 License: MIT Imports: 14 Imported by: 0

Documentation ¶

Overview ¶

Package vips provides a library for transforming images that is built on lipvips. Libvips is an extremely fast C-library. Therefore, govips requires that libvips 8+ be installed and available on the target environment.

Index ¶

Constants ¶

View Source
const DefaultFont = "sans 10"
View Source
const VipsMajorVersion = int(C.VIPS_MAJOR_VERSION)

VipsMajorVersion is the major version of libvips

View Source
const VipsMinorVersion = int(C.VIPS_MINOR_VERSION)

VipsMinorVersion if the minor version of libvips

View Source
const VipsVersion = string(C.VIPS_VERSION)

VipsVersion if the primary version of libvips

Variables ¶

View Source
var ColorBlack = Color{0, 0, 0}

ColorBlack is shorthand for black RGB

View Source
var (
	// ErrUnsupportedImageFormat when image type is unsupported
	ErrUnsupportedImageFormat = errors.New("Unsupported image format")
)
View Source
var ImageTypes = map[ImageType]string{
	ImageTypeGIF:    "gif",
	ImageTypeJPEG:   "jpeg",
	ImageTypeMagick: "magick",
	ImageTypePDF:    "pdf",
	ImageTypePNG:    "png",
	ImageTypeSVG:    "svg",
	ImageTypeTIFF:   "tiff",
	ImageTypeWEBP:   "webp",
}

Functions ¶

func Abs ¶

func Abs(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Abs executes the 'abs' operation

func Add ¶

func Add(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Add executes the 'add' operation

func Analyzeload ¶

func Analyzeload(filename string, options ...*Option) (*C.VipsImage, error)

Analyzeload executes the 'analyzeload' operation

func Autorot ¶

func Autorot(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Autorot executes the 'autorot' operation

func Avg ¶

func Avg(in *C.VipsImage, options ...*Option) (float64, error)

Avg executes the 'avg' operation

func Bandbool ¶

func Bandbool(in *C.VipsImage, boolean OperationBoolean, options ...*Option) (*C.VipsImage, error)

Bandbool executes the 'bandbool' operation

func Bandfold ¶

func Bandfold(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Bandfold executes the 'bandfold' operation

func Bandmean ¶

func Bandmean(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Bandmean executes the 'bandmean' operation

func Bandunfold ¶

func Bandunfold(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Bandunfold executes the 'bandunfold' operation

func Black ¶

func Black(width int, height int, options ...*Option) (*C.VipsImage, error)

Black executes the 'black' operation

func Boolean ¶

func Boolean(left *C.VipsImage, right *C.VipsImage, boolean OperationBoolean, options ...*Option) (*C.VipsImage, error)

Boolean executes the 'boolean' operation

func Buildlut ¶

func Buildlut(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Buildlut executes the 'buildlut' operation

func Byteswap ¶

func Byteswap(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Byteswap executes the 'byteswap' operation

func Cache ¶

func Cache(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Cache executes the 'cache' operation

func Cast ¶

func Cast(in *C.VipsImage, format BandFormat, options ...*Option) (*C.VipsImage, error)

Cast executes the 'cast' operation

func Cmc2Lch ¶

func Cmc2Lch(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Cmc2Lch executes the 'CMC2LCh' operation

func Colourspace ¶

func Colourspace(in *C.VipsImage, space Interpretation, options ...*Option) (*C.VipsImage, error)

Colourspace executes the 'colourspace' operation

func Compass ¶

func Compass(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Compass executes the 'compass' operation

func Complex ¶

func Complex(in *C.VipsImage, cmplx OperationComplex, options ...*Option) (*C.VipsImage, error)

Complex executes the 'complex' operation

func Complex2 ¶

func Complex2(left *C.VipsImage, right *C.VipsImage, cmplx OperationComplex2, options ...*Option) (*C.VipsImage, error)

Complex2 executes the 'complex2' operation

func Complexform ¶

func Complexform(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Complexform executes the 'complexform' operation

func Complexget ¶

func Complexget(in *C.VipsImage, get OperationComplexGet, options ...*Option) (*C.VipsImage, error)

Complexget executes the 'complexget' operation

func Conv ¶

func Conv(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Conv executes the 'conv' operation

func Conva ¶

func Conva(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Conva executes the 'conva' operation

func Convasep ¶

func Convasep(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Convasep executes the 'convasep' operation

func Convf ¶

func Convf(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Convf executes the 'convf' operation

func Convi ¶

func Convi(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Convi executes the 'convi' operation

func Convsep ¶

func Convsep(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Convsep executes the 'convsep' operation

func Copy ¶

func Copy(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Copy executes the 'copy' operation

func Countlines ¶

func Countlines(in *C.VipsImage, direction Direction, options ...*Option) (float64, error)

Countlines executes the 'countlines' operation

func Csvload ¶

func Csvload(filename string, options ...*Option) (*C.VipsImage, error)

Csvload executes the 'csvload' operation

func Csvsave ¶

func Csvsave(in *C.VipsImage, filename string, options ...*Option) error

Csvsave executes the 'csvsave' operation

func De00 ¶

func De00(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)

De00 executes the 'dE00' operation

func De76 ¶

func De76(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)

De76 executes the 'dE76' operation

func Decmc ¶

func Decmc(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Decmc executes the 'dECMC' operation

func Deviate ¶

func Deviate(in *C.VipsImage, options ...*Option) (float64, error)

Deviate executes the 'deviate' operation

func Divide ¶

func Divide(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Divide executes the 'divide' operation

func DrawImage ¶

func DrawImage(image *C.VipsImage, sub *C.VipsImage, x int, y int, options ...*Option) error

DrawImage executes the 'draw_image' operation

func DrawSmudge ¶

func DrawSmudge(image *C.VipsImage, left int, top int, width int, height int, options ...*Option) error

DrawSmudge executes the 'draw_smudge' operation

func Dzsave ¶

func Dzsave(in *C.VipsImage, filename string, options ...*Option) error

Dzsave executes the 'dzsave' operation

func Embed ¶

func Embed(in *C.VipsImage, x int, y int, width int, height int, options ...*Option) (*C.VipsImage, error)

Embed executes the 'embed' operation

func ExtractArea ¶

func ExtractArea(input *C.VipsImage, left int, top int, width int, height int, options ...*Option) (*C.VipsImage, error)

ExtractArea executes the 'extract_area' operation

func ExtractBand ¶

func ExtractBand(in *C.VipsImage, band int, options ...*Option) (*C.VipsImage, error)

ExtractBand executes the 'extract_band' operation

func Eye ¶

func Eye(width int, height int, options ...*Option) (*C.VipsImage, error)

Eye executes the 'eye' operation

func Falsecolour ¶

func Falsecolour(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Falsecolour executes the 'falsecolour' operation

func Fastcor ¶

func Fastcor(in *C.VipsImage, ref *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Fastcor executes the 'fastcor' operation

func FillNearest ¶

func FillNearest(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

FillNearest executes the 'fill_nearest' operation

func FindTrim ¶

func FindTrim(in *C.VipsImage, options ...*Option) (int, int, int, int, error)

FindTrim executes the 'find_trim' operation

func Flatten ¶

func Flatten(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Flatten executes the 'flatten' operation

func Flip ¶

func Flip(in *C.VipsImage, direction Direction, options ...*Option) (*C.VipsImage, error)

Flip executes the 'flip' operation

func Float2Rad ¶

func Float2Rad(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Float2Rad executes the 'float2rad' operation

func Fractsurf ¶

func Fractsurf(width int, height int, fractalDimension float64, options ...*Option) (*C.VipsImage, error)

Fractsurf executes the 'fractsurf' operation

func Freqmult ¶

func Freqmult(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Freqmult executes the 'freqmult' operation

func Fwfft ¶

func Fwfft(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Fwfft executes the 'fwfft' operation

func Gamma ¶

func Gamma(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Gamma executes the 'gamma' operation

func Gaussblur ¶

func Gaussblur(in *C.VipsImage, sigma float64, options ...*Option) (*C.VipsImage, error)

Gaussblur executes the 'gaussblur' operation

func Gaussmat ¶

func Gaussmat(sigma float64, minAmpl float64, options ...*Option) (*C.VipsImage, error)

Gaussmat executes the 'gaussmat' operation

func Gaussnoise ¶

func Gaussnoise(width int, height int, options ...*Option) (*C.VipsImage, error)

Gaussnoise executes the 'gaussnoise' operation

func Gifload ¶

func Gifload(filename string, options ...*Option) (*C.VipsImage, error)

Gifload executes the 'gifload' operation

func Globalbalance ¶

func Globalbalance(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Globalbalance executes the 'globalbalance' operation

func Grey ¶

func Grey(width int, height int, options ...*Option) (*C.VipsImage, error)

Grey executes the 'grey' operation

func Grid ¶

func Grid(in *C.VipsImage, tileHeight int, across int, down int, options ...*Option) (*C.VipsImage, error)

Grid executes the 'grid' operation

func HistCum ¶

func HistCum(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

HistCum executes the 'hist_cum' operation

func HistEntropy ¶

func HistEntropy(in *C.VipsImage, options ...*Option) (float64, error)

HistEntropy executes the 'hist_entropy' operation

func HistEqual ¶

func HistEqual(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

HistEqual executes the 'hist_equal' operation

func HistFind ¶

func HistFind(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

HistFind executes the 'hist_find' operation

func HistFindIndexed ¶

func HistFindIndexed(in *C.VipsImage, index *C.VipsImage, options ...*Option) (*C.VipsImage, error)

HistFindIndexed executes the 'hist_find_indexed' operation

func HistFindNdim ¶

func HistFindNdim(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

HistFindNdim executes the 'hist_find_ndim' operation

func HistIsmonotonic ¶

func HistIsmonotonic(in *C.VipsImage, options ...*Option) (bool, error)

HistIsmonotonic executes the 'hist_ismonotonic' operation

func HistLocal ¶

func HistLocal(in *C.VipsImage, width int, height int, options ...*Option) (*C.VipsImage, error)

HistLocal executes the 'hist_local' operation

func HistMatch ¶

func HistMatch(in *C.VipsImage, ref *C.VipsImage, options ...*Option) (*C.VipsImage, error)

HistMatch executes the 'hist_match' operation

func HistNorm ¶

func HistNorm(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

HistNorm executes the 'hist_norm' operation

func HistPlot ¶

func HistPlot(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

HistPlot executes the 'hist_plot' operation

func HoughCircle ¶

func HoughCircle(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

HoughCircle executes the 'hough_circle' operation

func HoughLine ¶

func HoughLine(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

HoughLine executes the 'hough_line' operation

func Hsv2Srgb ¶

func Hsv2Srgb(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Hsv2Srgb executes the 'HSV2sRGB' operation

func IccExport ¶

func IccExport(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

IccExport executes the 'icc_export' operation

func IccImport ¶

func IccImport(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

IccImport executes the 'icc_import' operation

func IccTransform ¶

func IccTransform(in *C.VipsImage, outputProfile string, options ...*Option) (*C.VipsImage, error)

IccTransform executes the 'icc_transform' operation

func Identity ¶

func Identity(options ...*Option) (*C.VipsImage, error)

Identity executes the 'identity' operation

func Ifthenelse ¶

func Ifthenelse(cond *C.VipsImage, in1 *C.VipsImage, in2 *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Ifthenelse executes the 'ifthenelse' operation

func Insert ¶

func Insert(main *C.VipsImage, sub *C.VipsImage, x int, y int, options ...*Option) (*C.VipsImage, error)

Insert executes the 'insert' operation

func Invert ¶

func Invert(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Invert executes the 'invert' operation

func Invertlut ¶

func Invertlut(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Invertlut executes the 'invertlut' operation

func Invfft ¶

func Invfft(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Invfft executes the 'invfft' operation

func IsTypeSupported ¶

func IsTypeSupported(imageType ImageType) bool

func Join ¶

func Join(in1 *C.VipsImage, in2 *C.VipsImage, direction Direction, options ...*Option) (*C.VipsImage, error)

Join executes the 'join' operation

func Jpegload ¶

func Jpegload(filename string, options ...*Option) (*C.VipsImage, error)

Jpegload executes the 'jpegload' operation

func Jpegsave ¶

func Jpegsave(in *C.VipsImage, filename string, options ...*Option) error

Jpegsave executes the 'jpegsave' operation

func JpegsaveMime ¶

func JpegsaveMime(in *C.VipsImage, options ...*Option) error

JpegsaveMime executes the 'jpegsave_mime' operation

func Lab2Labq ¶

func Lab2Labq(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Lab2Labq executes the 'Lab2LabQ' operation

func Lab2Labs ¶

func Lab2Labs(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Lab2Labs executes the 'Lab2LabS' operation

func Lab2Lch ¶

func Lab2Lch(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Lab2Lch executes the 'Lab2LCh' operation

func Lab2Xyz ¶

func Lab2Xyz(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Lab2Xyz executes the 'Lab2XYZ' operation

func Labelregions ¶

func Labelregions(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Labelregions executes the 'labelregions' operation

func Labq2Lab ¶

func Labq2Lab(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Labq2Lab executes the 'LabQ2Lab' operation

func Labq2Labs ¶

func Labq2Labs(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Labq2Labs executes the 'LabQ2LabS' operation

func Labq2Srgb ¶

func Labq2Srgb(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Labq2Srgb executes the 'LabQ2sRGB' operation

func Labs2Lab ¶

func Labs2Lab(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Labs2Lab executes the 'LabS2Lab' operation

func Labs2Labq ¶

func Labs2Labq(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Labs2Labq executes the 'LabS2LabQ' operation

func LazyCreate ¶

func LazyCreate(file string) io.Writer

func LazyOpen ¶

func LazyOpen(file string) io.Reader

func Lch2Cmc ¶

func Lch2Cmc(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Lch2Cmc executes the 'LCh2CMC' operation

func Lch2Lab ¶

func Lch2Lab(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Lch2Lab executes the 'LCh2Lab' operation

func Linecache ¶

func Linecache(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Linecache executes the 'linecache' operation

func Logmat ¶

func Logmat(sigma float64, minAmpl float64, options ...*Option) (*C.VipsImage, error)

Logmat executes the 'logmat' operation

func Mapim ¶

func Mapim(in *C.VipsImage, index *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Mapim executes the 'mapim' operation

func Maplut ¶

func Maplut(in *C.VipsImage, lut *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Maplut executes the 'maplut' operation

func MaskButterworth ¶

func MaskButterworth(width int, height int, order float64, frequencyCutoff float64, amplitudeCutoff float64, options ...*Option) (*C.VipsImage, error)

MaskButterworth executes the 'mask_butterworth' operation

func MaskButterworthBand ¶

func MaskButterworthBand(width int, height int, order float64, frequencyCutoffx float64, frequencyCutoffy float64, radius float64, amplitudeCutoff float64, options ...*Option) (*C.VipsImage, error)

MaskButterworthBand executes the 'mask_butterworth_band' operation

func MaskButterworthRing ¶

func MaskButterworthRing(width int, height int, order float64, frequencyCutoff float64, amplitudeCutoff float64, ringwidth float64, options ...*Option) (*C.VipsImage, error)

MaskButterworthRing executes the 'mask_butterworth_ring' operation

func MaskFractal ¶

func MaskFractal(width int, height int, fractalDimension float64, options ...*Option) (*C.VipsImage, error)

MaskFractal executes the 'mask_fractal' operation

func MaskGaussian ¶

func MaskGaussian(width int, height int, frequencyCutoff float64, amplitudeCutoff float64, options ...*Option) (*C.VipsImage, error)

MaskGaussian executes the 'mask_gaussian' operation

func MaskGaussianBand ¶

func MaskGaussianBand(width int, height int, frequencyCutoffx float64, frequencyCutoffy float64, radius float64, amplitudeCutoff float64, options ...*Option) (*C.VipsImage, error)

MaskGaussianBand executes the 'mask_gaussian_band' operation

func MaskGaussianRing ¶

func MaskGaussianRing(width int, height int, frequencyCutoff float64, amplitudeCutoff float64, ringwidth float64, options ...*Option) (*C.VipsImage, error)

MaskGaussianRing executes the 'mask_gaussian_ring' operation

func MaskIdeal ¶

func MaskIdeal(width int, height int, frequencyCutoff float64, options ...*Option) (*C.VipsImage, error)

MaskIdeal executes the 'mask_ideal' operation

func MaskIdealBand ¶

func MaskIdealBand(width int, height int, frequencyCutoffx float64, frequencyCutoffy float64, radius float64, options ...*Option) (*C.VipsImage, error)

MaskIdealBand executes the 'mask_ideal_band' operation

func MaskIdealRing ¶

func MaskIdealRing(width int, height int, frequencyCutoff float64, ringwidth float64, options ...*Option) (*C.VipsImage, error)

MaskIdealRing executes the 'mask_ideal_ring' operation

func Match ¶

func Match(ref *C.VipsImage, sec *C.VipsImage, xr1 int, yr1 int, xs1 int, ys1 int, xr2 int, yr2 int, xs2 int, ys2 int, options ...*Option) (*C.VipsImage, error)

Match executes the 'match' operation

func Math ¶

func Math(in *C.VipsImage, math OperationMath, options ...*Option) (*C.VipsImage, error)

Math executes the 'math' operation

func Math2 ¶

func Math2(left *C.VipsImage, right *C.VipsImage, math2 OperationMath2, options ...*Option) (*C.VipsImage, error)

Math2 executes the 'math2' operation

func Matrixload ¶

func Matrixload(filename string, options ...*Option) (*C.VipsImage, error)

Matrixload executes the 'matrixload' operation

func Matrixprint ¶

func Matrixprint(in *C.VipsImage, options ...*Option) error

Matrixprint executes the 'matrixprint' operation

func Matrixsave ¶

func Matrixsave(in *C.VipsImage, filename string, options ...*Option) error

Matrixsave executes the 'matrixsave' operation

func Max ¶

func Max(in *C.VipsImage, options ...*Option) (float64, error)

Max executes the 'max' operation

func Measure ¶

func Measure(in *C.VipsImage, h int, v int, options ...*Option) (*C.VipsImage, error)

Measure executes the 'measure' operation

func Merge ¶

func Merge(ref *C.VipsImage, sec *C.VipsImage, direction Direction, dx int, dy int, options ...*Option) (*C.VipsImage, error)

Merge executes the 'merge' operation

func Min ¶

func Min(in *C.VipsImage, options ...*Option) (float64, error)

Min executes the 'min' operation

func Morph ¶

func Morph(in *C.VipsImage, mask *C.VipsImage, morph OperationMorphology, options ...*Option) (*C.VipsImage, error)

Morph executes the 'morph' operation

func Mosaic ¶

func Mosaic(ref *C.VipsImage, sec *C.VipsImage, direction Direction, xref int, yref int, xsec int, ysec int, options ...*Option) (*C.VipsImage, error)

Mosaic executes the 'mosaic' operation

func Mosaic1 ¶

func Mosaic1(ref *C.VipsImage, sec *C.VipsImage, direction Direction, xr1 int, yr1 int, xs1 int, ys1 int, xr2 int, yr2 int, xs2 int, ys2 int, options ...*Option) (*C.VipsImage, error)

Mosaic1 executes the 'mosaic1' operation

func Msb ¶

func Msb(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Msb executes the 'msb' operation

func Multiply ¶

func Multiply(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Multiply executes the 'multiply' operation

func Pdfload ¶

func Pdfload(filename string, options ...*Option) (*C.VipsImage, error)

Pdfload executes the 'pdfload' operation

func Percent ¶

func Percent(in *C.VipsImage, percent float64, options ...*Option) (int, error)

Percent executes the 'percent' operation

func Perlin ¶

func Perlin(width int, height int, options ...*Option) (*C.VipsImage, error)

Perlin executes the 'perlin' operation

func Phasecor ¶

func Phasecor(in *C.VipsImage, in2 *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Phasecor executes the 'phasecor' operation

func Pngload ¶

func Pngload(filename string, options ...*Option) (*C.VipsImage, error)

Pngload executes the 'pngload' operation

func Pngsave ¶

func Pngsave(in *C.VipsImage, filename string, options ...*Option) error

Pngsave executes the 'pngsave' operation

func Ppmload ¶

func Ppmload(filename string, options ...*Option) (*C.VipsImage, error)

Ppmload executes the 'ppmload' operation

func Ppmsave ¶

func Ppmsave(in *C.VipsImage, filename string, options ...*Option) error

Ppmsave executes the 'ppmsave' operation

func Premultiply ¶

func Premultiply(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Premultiply executes the 'premultiply' operation

func PrintObjectReport ¶

func PrintObjectReport(label string)

PrintObjectReport outputs all of the current internal objects in libvips

func Profile ¶

func Profile(in *C.VipsImage, options ...*Option) (*C.VipsImage, *C.VipsImage, error)

Profile executes the 'profile' operation

func Project ¶

func Project(in *C.VipsImage, options ...*Option) (*C.VipsImage, *C.VipsImage, error)

Project executes the 'project' operation

func Quadratic ¶

func Quadratic(in *C.VipsImage, coeff *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Quadratic executes the 'quadratic' operation

func Rad2Float ¶

func Rad2Float(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Rad2Float executes the 'rad2float' operation

func Radload ¶

func Radload(filename string, options ...*Option) (*C.VipsImage, error)

Radload executes the 'radload' operation

func Radsave ¶

func Radsave(in *C.VipsImage, filename string, options ...*Option) error

Radsave executes the 'radsave' operation

func Rank ¶

func Rank(in *C.VipsImage, width int, height int, index int, options ...*Option) (*C.VipsImage, error)

Rank executes the 'rank' operation

func Rawload ¶

func Rawload(filename string, width int, height int, bands int, options ...*Option) (*C.VipsImage, error)

Rawload executes the 'rawload' operation

func Rawsave ¶

func Rawsave(in *C.VipsImage, filename string, options ...*Option) error

Rawsave executes the 'rawsave' operation

func RawsaveFd ¶

func RawsaveFd(in *C.VipsImage, fd int, options ...*Option) error

RawsaveFd executes the 'rawsave_fd' operation

func ReadRuntimeStats ¶

func ReadRuntimeStats(stats *RuntimeStats)

func ReadVipsMemStats ¶

func ReadVipsMemStats(stats *VipsMemoryStats)

func Recomb ¶

func Recomb(in *C.VipsImage, m *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Recomb executes the 'recomb' operation

func Reduce ¶

func Reduce(in *C.VipsImage, hshrink float64, vshrink float64, options ...*Option) (*C.VipsImage, error)

Reduce executes the 'reduce' operation

func Reduceh ¶

func Reduceh(in *C.VipsImage, hshrink float64, options ...*Option) (*C.VipsImage, error)

Reduceh executes the 'reduceh' operation

func Reducev ¶

func Reducev(in *C.VipsImage, vshrink float64, options ...*Option) (*C.VipsImage, error)

Reducev executes the 'reducev' operation

func Relational ¶

func Relational(left *C.VipsImage, right *C.VipsImage, relational OperationRelational, options ...*Option) (*C.VipsImage, error)

Relational executes the 'relational' operation

func Remainder ¶

func Remainder(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Remainder executes the 'remainder' operation

func Replicate ¶

func Replicate(in *C.VipsImage, across int, down int, options ...*Option) (*C.VipsImage, error)

Replicate executes the 'replicate' operation

func Resize ¶

func Resize(in *C.VipsImage, scale float64, options ...*Option) (*C.VipsImage, error)

Resize executes the 'resize' operation

func Rot ¶

func Rot(in *C.VipsImage, angle Angle, options ...*Option) (*C.VipsImage, error)

Rot executes the 'rot' operation

func Rot45 ¶

func Rot45(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Rot45 executes the 'rot45' operation

func Round ¶

func Round(in *C.VipsImage, round OperationRound, options ...*Option) (*C.VipsImage, error)

Round executes the 'round' operation

func Scale ¶

func Scale(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Scale executes the 'scale' operation

func Scrgb2Bw ¶

func Scrgb2Bw(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Scrgb2Bw executes the 'scRGB2BW' operation

func Scrgb2Srgb ¶

func Scrgb2Srgb(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Scrgb2Srgb executes the 'scRGB2sRGB' operation

func Scrgb2Xyz ¶

func Scrgb2Xyz(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Scrgb2Xyz executes the 'scRGB2XYZ' operation

func Sequential ¶

func Sequential(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Sequential executes the 'sequential' operation

func Sharpen ¶

func Sharpen(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Sharpen executes the 'sharpen' operation

func Shrink ¶

func Shrink(in *C.VipsImage, hshrink float64, vshrink float64, options ...*Option) (*C.VipsImage, error)

Shrink executes the 'shrink' operation

func Shrinkh ¶

func Shrinkh(in *C.VipsImage, hshrink int, options ...*Option) (*C.VipsImage, error)

Shrinkh executes the 'shrinkh' operation

func Shrinkv ¶

func Shrinkv(in *C.VipsImage, vshrink int, options ...*Option) (*C.VipsImage, error)

Shrinkv executes the 'shrinkv' operation

func Shutdown ¶

func Shutdown()

Shutdown libvips

func ShutdownThread ¶

func ShutdownThread()

ShutdownThread clears the cache for for the given thread

func Sign ¶

func Sign(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Sign executes the 'sign' operation

func Similarity ¶

func Similarity(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Similarity executes the 'similarity' operation

func Sines ¶

func Sines(width int, height int, options ...*Option) (*C.VipsImage, error)

Sines executes the 'sines' operation

func Smartcrop ¶

func Smartcrop(input *C.VipsImage, width int, height int, options ...*Option) (*C.VipsImage, error)

Smartcrop executes the 'smartcrop' operation

func Spcor ¶

func Spcor(in *C.VipsImage, ref *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Spcor executes the 'spcor' operation

func Spectrum ¶

func Spectrum(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Spectrum executes the 'spectrum' operation

func Srgb2Hsv ¶

func Srgb2Hsv(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Srgb2Hsv executes the 'sRGB2HSV' operation

func Srgb2Scrgb ¶

func Srgb2Scrgb(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Srgb2Scrgb executes the 'sRGB2scRGB' operation

func Startup ¶

func Startup(config *Config)

Startup sets up the libvips support and ensures the versions are correct. Pass in nil for default configuration.

func Stats ¶

func Stats(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Stats executes the 'stats' operation

func Stdif ¶

func Stdif(in *C.VipsImage, width int, height int, options ...*Option) (*C.VipsImage, error)

Stdif executes the 'stdif' operation

func Subsample ¶

func Subsample(input *C.VipsImage, xfac int, yfac int, options ...*Option) (*C.VipsImage, error)

Subsample executes the 'subsample' operation

func Subtract ¶

func Subtract(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Subtract executes the 'subtract' operation

func Svgload ¶

func Svgload(filename string, options ...*Option) (*C.VipsImage, error)

Svgload executes the 'svgload' operation

func System ¶

func System(cmdFormat string, options ...*Option) error

System executes the 'system' operation

func Text ¶

func Text(text string, options ...*Option) (*C.VipsImage, error)

Text executes the 'text' operation

func Thumbnail ¶

func Thumbnail(filename string, width int, options ...*Option) (*C.VipsImage, error)

Thumbnail executes the 'thumbnail' operation

func ThumbnailImage ¶

func ThumbnailImage(in *C.VipsImage, width int, options ...*Option) (*C.VipsImage, error)

ThumbnailImage executes the 'thumbnail_image' operation

func Tiffload ¶

func Tiffload(filename string, options ...*Option) (*C.VipsImage, error)

Tiffload executes the 'tiffload' operation

func Tiffsave ¶

func Tiffsave(in *C.VipsImage, filename string, options ...*Option) error

Tiffsave executes the 'tiffsave' operation

func Tilecache ¶

func Tilecache(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Tilecache executes the 'tilecache' operation

func Tonelut ¶

func Tonelut(options ...*Option) (*C.VipsImage, error)

Tonelut executes the 'tonelut' operation

func Unpremultiply ¶

func Unpremultiply(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Unpremultiply executes the 'unpremultiply' operation

func VipsClearCache ¶

func VipsClearCache()

func VipsPrintCache ¶

func VipsPrintCache()

func Vipsload ¶

func Vipsload(filename string, options ...*Option) (*C.VipsImage, error)

Vipsload executes the 'vipsload' operation

func Vipssave ¶

func Vipssave(in *C.VipsImage, filename string, options ...*Option) error

Vipssave executes the 'vipssave' operation

func Webpload ¶

func Webpload(filename string, options ...*Option) (*C.VipsImage, error)

Webpload executes the 'webpload' operation

func Webpsave ¶

func Webpsave(in *C.VipsImage, filename string, options ...*Option) error

Webpsave executes the 'webpsave' operation

func Worley ¶

func Worley(width int, height int, options ...*Option) (*C.VipsImage, error)

Worley executes the 'worley' operation

func Wrap ¶

func Wrap(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Wrap executes the 'wrap' operation

func Xyz ¶

func Xyz(width int, height int, options ...*Option) (*C.VipsImage, error)

Xyz executes the 'xyz' operation

func Xyz2Lab ¶

func Xyz2Lab(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Xyz2Lab executes the 'XYZ2Lab' operation

func Xyz2Scrgb ¶

func Xyz2Scrgb(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Xyz2Scrgb executes the 'XYZ2scRGB' operation

func Xyz2Yxy ¶

func Xyz2Yxy(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Xyz2Yxy executes the 'XYZ2Yxy' operation

func Yxy2Xyz ¶

func Yxy2Xyz(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)

Yxy2Xyz executes the 'Yxy2XYZ' operation

func Zone ¶

func Zone(width int, height int, options ...*Option) (*C.VipsImage, error)

Zone executes the 'zone' operation

func Zoom ¶

func Zoom(input *C.VipsImage, xfac int, yfac int, options ...*Option) (*C.VipsImage, error)

Zoom executes the 'zoom' operation

Types ¶

type Access ¶

type Access int

Access represents VIPS_ACCESS

const (
	AccessRandom               Access = C.VIPS_ACCESS_RANDOM
	AccessSequential           Access = C.VIPS_ACCESS_SEQUENTIAL
	AccessSequentialUnbuffered Access = C.VIPS_ACCESS_SEQUENTIAL_UNBUFFERED
)

Access enum

type Align ¶

type Align int

Align represents VIPS_ALIGN

const (
	AlignLow    Align = C.VIPS_ALIGN_LOW
	AlignCenter Align = C.VIPS_ALIGN_CENTRE
	AlignHigh   Align = C.VIPS_ALIGN_HIGH
)

Direction enum

type Anchor ¶

type Anchor int

Anchor represents the an anchor for cropping and other image operations

const (
	AnchorAuto Anchor = iota
	AnchorCenter
	AnchorTop
	AnchorTopRight
	AnchorTopLeft
	AnchorRight
	AnchorBottom
	AnchorBottomLeft
	AnchorBottomRight
	AnchorLeft
)

Anchor enum

type Angle ¶

type Angle int

Angle represents VIPS_ANGLE type

const (
	Angle0   Angle = C.VIPS_ANGLE_D0
	Angle90  Angle = C.VIPS_ANGLE_D90
	Angle180 Angle = C.VIPS_ANGLE_D180
	Angle270 Angle = C.VIPS_ANGLE_D270
)

Angle enum

type Angle45 ¶

type Angle45 int

Angle45 represents VIPS_ANGLE45 type

const (
	Angle45_0   Angle45 = C.VIPS_ANGLE45_D0
	Angle45_45  Angle45 = C.VIPS_ANGLE45_D45
	Angle45_90  Angle45 = C.VIPS_ANGLE45_D90
	Angle45_135 Angle45 = C.VIPS_ANGLE45_D135
	Angle45_180 Angle45 = C.VIPS_ANGLE45_D180
	Angle45_225 Angle45 = C.VIPS_ANGLE45_D225
	Angle45_270 Angle45 = C.VIPS_ANGLE45_D270
	Angle45_315 Angle45 = C.VIPS_ANGLE45_D315
)

Angle45 enum

type BandFormat ¶

type BandFormat int

BandFormat represents VIPS_FORMAT type

const (
	BandFormatNotSet    BandFormat = C.VIPS_FORMAT_NOTSET
	BandFormatUchar     BandFormat = C.VIPS_FORMAT_UCHAR
	BandFormatChar      BandFormat = C.VIPS_FORMAT_CHAR
	BandFormatUshort    BandFormat = C.VIPS_FORMAT_USHORT
	BandFormatShort     BandFormat = C.VIPS_FORMAT_SHORT
	BandFormatUint      BandFormat = C.VIPS_FORMAT_UINT
	BandFormatInt       BandFormat = C.VIPS_FORMAT_INT
	BandFormatFloat     BandFormat = C.VIPS_FORMAT_FLOAT
	BandFormatComplex   BandFormat = C.VIPS_FORMAT_COMPLEX
	BandFormatDouble    BandFormat = C.VIPS_FORMAT_DOUBLE
	BandFormatDpComplex BandFormat = C.VIPS_FORMAT_DPCOMPLEX
)

BandFormat enum

type Blackboard ¶

type Blackboard struct {
	*TransformParams
	// contains filtered or unexported fields
}

Blackboard is an object that tracks transient data during a transformation

func NewBlackboard ¶

func NewBlackboard(image *C.VipsImage, imageType ImageType, p *TransformParams) *Blackboard

NewBlackboard creates a new blackboard object meant for transformation data

func (*Blackboard) Height ¶

func (bb *Blackboard) Height() int

Height returns the height of the in-flight image

func (*Blackboard) Width ¶

func (bb *Blackboard) Width() int

Width returns the width of the in-flight image

type BlendMode ¶

type BlendMode int

type Coding ¶

type Coding int

Coding represents VIPS_CODING type

const (
	CodingError Coding = C.VIPS_CODING_ERROR
	CodingNone  Coding = C.VIPS_CODING_NONE
	CodingLABQ  Coding = C.VIPS_CODING_LABQ
	CodingRAD   Coding = C.VIPS_CODING_RAD
)

Coding enum

type Color ¶

type Color struct {
	R, G, B uint8
}

Color represents an RGB

type Composite ¶

type Composite struct {
	Image     *ImageRef
	BlendMode BlendMode
}

type Config ¶

type Config struct {
	ConcurrencyLevel int
	MaxCacheFiles    int
	MaxCacheMem      int
	MaxCacheSize     int
	ReportLeaks      bool
	CacheTrace       bool
	CollectStats     bool
}

Config allows fine-tuning of libvips library

type Direction ¶

type Direction int

Direction represents VIPS_DIRECTION type

const (
	DirectionHorizontal Direction = C.VIPS_DIRECTION_HORIZONTAL
	DirectionVertical   Direction = C.VIPS_DIRECTION_VERTICAL
)

Direction enum

type ExportParams ¶

type ExportParams struct {
	OutputFile      string
	Writer          io.Writer
	Format          ImageType
	Quality         int
	Compression     int
	Interlaced      bool
	Lossless        bool
	StripProfile    bool
	StripMetadata   bool
	Interpretation  Interpretation
	BackgroundColor *Color
}

ExportParams are options when exporting an image to file or buffer

type Extend ¶

type Extend int

Extend represents VIPS_EXTEND type

const (
	ExtendBlack      Extend = C.VIPS_EXTEND_BLACK
	ExtendCopy       Extend = C.VIPS_EXTEND_COPY
	ExtendRepeat     Extend = C.VIPS_EXTEND_REPEAT
	ExtendMirror     Extend = C.VIPS_EXTEND_MIRROR
	ExtendWhite      Extend = C.VIPS_EXTEND_WHITE
	ExtendBackground Extend = C.VIPS_EXTEND_BACKGROUND
)

Extend enum

type FlipDirection ¶

type FlipDirection int

FlipDirection represents the direction to flip

const (
	FlipNone FlipDirection = iota
	FlipHorizontal
	FlipVertical
	FlipBoth
)

Flip enum

type ImageRef ¶

type ImageRef struct {
	// contains filtered or unexported fields
}

ImageRef contains a libvips image and manages its lifecycle. You should close an image when done or it will leak until the next GC

func LoadImage ¶

func LoadImage(r io.Reader) (*ImageRef, error)

LoadImage loads an ImageRef from the given reader

func NewImageFromBuffer ¶

func NewImageFromBuffer(buf []byte) (*ImageRef, error)

NewImageFromBuffer loads an image buffer and creates a new Image

func NewImageFromFile ¶

func NewImageFromFile(file string) (*ImageRef, error)

NewImageFromFile loads an image from file and creates a new ImageRef

func NewImageRef ¶

func NewImageRef(vipsImage *C.VipsImage, format ImageType) *ImageRef

func (*ImageRef) Abs ¶

func (in *ImageRef) Abs(options ...*Option) error

Abs executes the 'abs' operation

func (*ImageRef) Autorot ¶

func (in *ImageRef) Autorot(options ...*Option) error

Autorot executes the 'autorot' operation

func (*ImageRef) BandFormat ¶

func (ref *ImageRef) BandFormat() BandFormat

BandFormat returns the current band format

func (*ImageRef) Bandbool ¶

func (in *ImageRef) Bandbool(boolean OperationBoolean, options ...*Option) error

Bandbool executes the 'bandbool' operation

func (*ImageRef) Bandfold ¶

func (in *ImageRef) Bandfold(options ...*Option) error

Bandfold executes the 'bandfold' operation

func (*ImageRef) Bandmean ¶

func (in *ImageRef) Bandmean(options ...*Option) error

Bandmean executes the 'bandmean' operation

func (*ImageRef) Bands ¶

func (ref *ImageRef) Bands() int

Bands returns the number of bands for this image

func (*ImageRef) Bandunfold ¶

func (in *ImageRef) Bandunfold(options ...*Option) error

Bandunfold executes the 'bandunfold' operation

func (*ImageRef) Buildlut ¶

func (in *ImageRef) Buildlut(options ...*Option) error

Buildlut executes the 'buildlut' operation

func (*ImageRef) Byteswap ¶

func (in *ImageRef) Byteswap(options ...*Option) error

Byteswap executes the 'byteswap' operation

func (*ImageRef) Cache ¶

func (in *ImageRef) Cache(options ...*Option) error

Cache executes the 'cache' operation

func (*ImageRef) Cast ¶

func (in *ImageRef) Cast(format BandFormat, options ...*Option) error

Cast executes the 'cast' operation

func (*ImageRef) Close ¶

func (ref *ImageRef) Close()

Close closes an image and frees internal memory associated with it

func (*ImageRef) Cmc2Lch ¶

func (in *ImageRef) Cmc2Lch(options ...*Option) error

Cmc2Lch executes the 'CMC2LCh' operation

func (*ImageRef) Coding ¶

func (ref *ImageRef) Coding() Coding

Coding returns the image coding

func (*ImageRef) Colourspace ¶

func (in *ImageRef) Colourspace(space Interpretation, options ...*Option) error

Colourspace executes the 'colourspace' operation

func (*ImageRef) Complex ¶

func (in *ImageRef) Complex(cmplx OperationComplex, options ...*Option) error

Complex executes the 'complex' operation

func (*ImageRef) Complexget ¶

func (in *ImageRef) Complexget(get OperationComplexGet, options ...*Option) error

Complexget executes the 'complexget' operation

func (*ImageRef) Composite ¶

func (ref *ImageRef) Composite(overlay *ImageRef, mode BlendMode) error

Composite overlays the given image over this one

func (*ImageRef) Copy ¶

func (in *ImageRef) Copy(options ...*Option) error

Copy executes the 'copy' operation

func (*ImageRef) Embed ¶

func (in *ImageRef) Embed(x int, y int, width int, height int, options ...*Option) error

Embed executes the 'embed' operation

func (*ImageRef) Export ¶

func (ref *ImageRef) Export(params ExportParams) ([]byte, ImageType, error)

Export exports the image

func (*ImageRef) ExtractArea ¶

func (in *ImageRef) ExtractArea(left int, top int, width int, height int, options ...*Option) error

ExtractArea executes the 'extract_area' operation

func (*ImageRef) ExtractBand ¶

func (in *ImageRef) ExtractBand(band int, options ...*Option) error

ExtractBand executes the 'extract_band' operation

func (*ImageRef) Falsecolour ¶

func (in *ImageRef) Falsecolour(options ...*Option) error

Falsecolour executes the 'falsecolour' operation

func (*ImageRef) FillNearest ¶

func (in *ImageRef) FillNearest(options ...*Option) error

FillNearest executes the 'fill_nearest' operation

func (*ImageRef) Flatten ¶

func (in *ImageRef) Flatten(options ...*Option) error

Flatten executes the 'flatten' operation

func (*ImageRef) Flip ¶

func (in *ImageRef) Flip(direction Direction, options ...*Option) error

Flip executes the 'flip' operation

func (*ImageRef) Float2Rad ¶

func (in *ImageRef) Float2Rad(options ...*Option) error

Float2Rad executes the 'float2rad' operation

func (*ImageRef) Format ¶

func (ref *ImageRef) Format() ImageType

Format returns the initial format of the vips image when loaded

func (*ImageRef) Fwfft ¶

func (in *ImageRef) Fwfft(options ...*Option) error

Fwfft executes the 'fwfft' operation

func (*ImageRef) Gamma ¶

func (in *ImageRef) Gamma(options ...*Option) error

Gamma executes the 'gamma' operation

func (*ImageRef) Gaussblur ¶

func (in *ImageRef) Gaussblur(sigma float64, options ...*Option) error

Gaussblur executes the 'gaussblur' operation

func (*ImageRef) Globalbalance ¶

func (in *ImageRef) Globalbalance(options ...*Option) error

Globalbalance executes the 'globalbalance' operation

func (*ImageRef) Grid ¶

func (in *ImageRef) Grid(tileHeight int, across int, down int, options ...*Option) error

Grid executes the 'grid' operation

func (*ImageRef) Height ¶

func (ref *ImageRef) Height() int

Height returns the height of this iamge

func (*ImageRef) HistCum ¶

func (in *ImageRef) HistCum(options ...*Option) error

HistCum executes the 'hist_cum' operation

func (*ImageRef) HistEqual ¶

func (in *ImageRef) HistEqual(options ...*Option) error

HistEqual executes the 'hist_equal' operation

func (*ImageRef) HistFind ¶

func (in *ImageRef) HistFind(options ...*Option) error

HistFind executes the 'hist_find' operation

func (*ImageRef) HistFindNdim ¶

func (in *ImageRef) HistFindNdim(options ...*Option) error

HistFindNdim executes the 'hist_find_ndim' operation

func (*ImageRef) HistLocal ¶

func (in *ImageRef) HistLocal(width int, height int, options ...*Option) error

HistLocal executes the 'hist_local' operation

func (*ImageRef) HistNorm ¶

func (in *ImageRef) HistNorm(options ...*Option) error

HistNorm executes the 'hist_norm' operation

func (*ImageRef) HistPlot ¶

func (in *ImageRef) HistPlot(options ...*Option) error

HistPlot executes the 'hist_plot' operation

func (*ImageRef) HoughCircle ¶

func (in *ImageRef) HoughCircle(options ...*Option) error

HoughCircle executes the 'hough_circle' operation

func (*ImageRef) HoughLine ¶

func (in *ImageRef) HoughLine(options ...*Option) error

HoughLine executes the 'hough_line' operation

func (*ImageRef) Hsv2Srgb ¶

func (in *ImageRef) Hsv2Srgb(options ...*Option) error

Hsv2Srgb executes the 'HSV2sRGB' operation

func (*ImageRef) IccExport ¶

func (in *ImageRef) IccExport(options ...*Option) error

IccExport executes the 'icc_export' operation

func (*ImageRef) IccImport ¶

func (in *ImageRef) IccImport(options ...*Option) error

IccImport executes the 'icc_import' operation

func (*ImageRef) IccTransform ¶

func (in *ImageRef) IccTransform(outputProfile string, options ...*Option) error

IccTransform executes the 'icc_transform' operation

func (*ImageRef) Image ¶

func (ref *ImageRef) Image() *C.VipsImage

Image returns a handle to the internal vips image, just in case

func (*ImageRef) Interpretation ¶

func (ref *ImageRef) Interpretation() Interpretation

Interpretation returns the current interpretation

func (*ImageRef) Invert ¶

func (in *ImageRef) Invert(options ...*Option) error

Invert executes the 'invert' operation

func (*ImageRef) Invertlut ¶

func (in *ImageRef) Invertlut(options ...*Option) error

Invertlut executes the 'invertlut' operation

func (*ImageRef) Invfft ¶

func (in *ImageRef) Invfft(options ...*Option) error

Invfft executes the 'invfft' operation

func (*ImageRef) Lab2Labq ¶

func (in *ImageRef) Lab2Labq(options ...*Option) error

Lab2Labq executes the 'Lab2LabQ' operation

func (*ImageRef) Lab2Labs ¶

func (in *ImageRef) Lab2Labs(options ...*Option) error

Lab2Labs executes the 'Lab2LabS' operation

func (*ImageRef) Lab2Lch ¶

func (in *ImageRef) Lab2Lch(options ...*Option) error

Lab2Lch executes the 'Lab2LCh' operation

func (*ImageRef) Lab2Xyz ¶

func (in *ImageRef) Lab2Xyz(options ...*Option) error

Lab2Xyz executes the 'Lab2XYZ' operation

func (*ImageRef) Labelregions ¶

func (in *ImageRef) Labelregions(options ...*Option) error

Labelregions executes the 'labelregions' operation

func (*ImageRef) Labq2Lab ¶

func (in *ImageRef) Labq2Lab(options ...*Option) error

Labq2Lab executes the 'LabQ2Lab' operation

func (*ImageRef) Labq2Labs ¶

func (in *ImageRef) Labq2Labs(options ...*Option) error

Labq2Labs executes the 'LabQ2LabS' operation

func (*ImageRef) Labq2Srgb ¶

func (in *ImageRef) Labq2Srgb(options ...*Option) error

Labq2Srgb executes the 'LabQ2sRGB' operation

func (*ImageRef) Labs2Lab ¶

func (in *ImageRef) Labs2Lab(options ...*Option) error

Labs2Lab executes the 'LabS2Lab' operation

func (*ImageRef) Labs2Labq ¶

func (in *ImageRef) Labs2Labq(options ...*Option) error

Labs2Labq executes the 'LabS2LabQ' operation

func (*ImageRef) Lch2Cmc ¶

func (in *ImageRef) Lch2Cmc(options ...*Option) error

Lch2Cmc executes the 'LCh2CMC' operation

func (*ImageRef) Lch2Lab ¶

func (in *ImageRef) Lch2Lab(options ...*Option) error

Lch2Lab executes the 'LCh2Lab' operation

func (*ImageRef) Linecache ¶

func (in *ImageRef) Linecache(options ...*Option) error

Linecache executes the 'linecache' operation

func (*ImageRef) Math ¶

func (in *ImageRef) Math(math OperationMath, options ...*Option) error

Math executes the 'math' operation

func (*ImageRef) Measure ¶

func (in *ImageRef) Measure(h int, v int, options ...*Option) error

Measure executes the 'measure' operation

func (*ImageRef) Msb ¶

func (in *ImageRef) Msb(options ...*Option) error

Msb executes the 'msb' operation

func (*ImageRef) OffsetX ¶

func (ref *ImageRef) OffsetX() int

OffsetX returns the X offset

func (*ImageRef) OffsetY ¶

func (ref *ImageRef) OffsetY() int

OffsetY returns the Y offset

func (*ImageRef) Premultiply ¶

func (in *ImageRef) Premultiply(options ...*Option) error

Premultiply executes the 'premultiply' operation

func (*ImageRef) Rad2Float ¶

func (in *ImageRef) Rad2Float(options ...*Option) error

Rad2Float executes the 'rad2float' operation

func (*ImageRef) Rank ¶

func (in *ImageRef) Rank(width int, height int, index int, options ...*Option) error

Rank executes the 'rank' operation

func (*ImageRef) Reduce ¶

func (in *ImageRef) Reduce(hshrink float64, vshrink float64, options ...*Option) error

Reduce executes the 'reduce' operation

func (*ImageRef) Reduceh ¶

func (in *ImageRef) Reduceh(hshrink float64, options ...*Option) error

Reduceh executes the 'reduceh' operation

func (*ImageRef) Reducev ¶

func (in *ImageRef) Reducev(vshrink float64, options ...*Option) error

Reducev executes the 'reducev' operation

func (*ImageRef) Replicate ¶

func (in *ImageRef) Replicate(across int, down int, options ...*Option) error

Replicate executes the 'replicate' operation

func (*ImageRef) ResX ¶

func (ref *ImageRef) ResX() float64

ResX returns the X resolution

func (*ImageRef) ResY ¶

func (ref *ImageRef) ResY() float64

ResY returns the Y resolution

func (*ImageRef) Resize ¶

func (in *ImageRef) Resize(scale float64, options ...*Option) error

Resize executes the 'resize' operation

func (*ImageRef) Rot ¶

func (in *ImageRef) Rot(angle Angle, options ...*Option) error

Rot executes the 'rot' operation

func (*ImageRef) Rot45 ¶

func (in *ImageRef) Rot45(options ...*Option) error

Rot45 executes the 'rot45' operation

func (*ImageRef) Round ¶

func (in *ImageRef) Round(round OperationRound, options ...*Option) error

Round executes the 'round' operation

func (*ImageRef) Scale ¶

func (in *ImageRef) Scale(options ...*Option) error

Scale executes the 'scale' operation

func (*ImageRef) Scrgb2Bw ¶

func (in *ImageRef) Scrgb2Bw(options ...*Option) error

Scrgb2Bw executes the 'scRGB2BW' operation

func (*ImageRef) Scrgb2Srgb ¶

func (in *ImageRef) Scrgb2Srgb(options ...*Option) error

Scrgb2Srgb executes the 'scRGB2sRGB' operation

func (*ImageRef) Scrgb2Xyz ¶

func (in *ImageRef) Scrgb2Xyz(options ...*Option) error

Scrgb2Xyz executes the 'scRGB2XYZ' operation

func (*ImageRef) Sequential ¶

func (in *ImageRef) Sequential(options ...*Option) error

Sequential executes the 'sequential' operation

func (*ImageRef) SetImage ¶

func (ref *ImageRef) SetImage(image *C.VipsImage)

SetImage resets the image for this image and frees the previous one

func (*ImageRef) Sharpen ¶

func (in *ImageRef) Sharpen(options ...*Option) error

Sharpen executes the 'sharpen' operation

func (*ImageRef) Shrink ¶

func (in *ImageRef) Shrink(hshrink float64, vshrink float64, options ...*Option) error

Shrink executes the 'shrink' operation

func (*ImageRef) Shrinkh ¶

func (in *ImageRef) Shrinkh(hshrink int, options ...*Option) error

Shrinkh executes the 'shrinkh' operation

func (*ImageRef) Shrinkv ¶

func (in *ImageRef) Shrinkv(vshrink int, options ...*Option) error

Shrinkv executes the 'shrinkv' operation

func (*ImageRef) Sign ¶

func (in *ImageRef) Sign(options ...*Option) error

Sign executes the 'sign' operation

func (*ImageRef) Similarity ¶

func (in *ImageRef) Similarity(options ...*Option) error

Similarity executes the 'similarity' operation

func (*ImageRef) Smartcrop ¶

func (in *ImageRef) Smartcrop(width int, height int, options ...*Option) error

Smartcrop executes the 'smartcrop' operation

func (*ImageRef) Spectrum ¶

func (in *ImageRef) Spectrum(options ...*Option) error

Spectrum executes the 'spectrum' operation

func (*ImageRef) Srgb2Hsv ¶

func (in *ImageRef) Srgb2Hsv(options ...*Option) error

Srgb2Hsv executes the 'sRGB2HSV' operation

func (*ImageRef) Srgb2Scrgb ¶

func (in *ImageRef) Srgb2Scrgb(options ...*Option) error

Srgb2Scrgb executes the 'sRGB2scRGB' operation

func (*ImageRef) Stats ¶

func (in *ImageRef) Stats(options ...*Option) error

Stats executes the 'stats' operation

func (*ImageRef) Stdif ¶

func (in *ImageRef) Stdif(width int, height int, options ...*Option) error

Stdif executes the 'stdif' operation

func (*ImageRef) Subsample ¶

func (in *ImageRef) Subsample(xfac int, yfac int, options ...*Option) error

Subsample executes the 'subsample' operation

func (*ImageRef) ThumbnailImage ¶

func (in *ImageRef) ThumbnailImage(width int, options ...*Option) error

ThumbnailImage executes the 'thumbnail_image' operation

func (*ImageRef) Tilecache ¶

func (in *ImageRef) Tilecache(options ...*Option) error

Tilecache executes the 'tilecache' operation

func (*ImageRef) ToBytes ¶

func (ref *ImageRef) ToBytes() ([]byte, error)

ToBytes writes the image to memory in VIPs format and returns the raw bytes, useful for storage.

func (*ImageRef) Unpremultiply ¶

func (in *ImageRef) Unpremultiply(options ...*Option) error

Unpremultiply executes the 'unpremultiply' operation

func (*ImageRef) Width ¶

func (ref *ImageRef) Width() int

Width returns the width of this image

func (*ImageRef) Wrap ¶

func (in *ImageRef) Wrap(options ...*Option) error

Wrap executes the 'wrap' operation

func (*ImageRef) Xyz2Lab ¶

func (in *ImageRef) Xyz2Lab(options ...*Option) error

Xyz2Lab executes the 'XYZ2Lab' operation

func (*ImageRef) Xyz2Scrgb ¶

func (in *ImageRef) Xyz2Scrgb(options ...*Option) error

Xyz2Scrgb executes the 'XYZ2scRGB' operation

func (*ImageRef) Xyz2Yxy ¶

func (in *ImageRef) Xyz2Yxy(options ...*Option) error

Xyz2Yxy executes the 'XYZ2Yxy' operation

func (*ImageRef) Yxy2Xyz ¶

func (in *ImageRef) Yxy2Xyz(options ...*Option) error

Yxy2Xyz executes the 'Yxy2XYZ' operation

func (*ImageRef) Zoom ¶

func (in *ImageRef) Zoom(xfac int, yfac int, options ...*Option) error

Zoom executes the 'zoom' operation

type ImageType ¶

type ImageType int

ImageType represents an image type

const (
	ImageTypeUnknown ImageType = C.UNKNOWN
	ImageTypeGIF     ImageType = C.GIF
	ImageTypeJPEG    ImageType = C.JPEG
	ImageTypeMagick  ImageType = C.MAGICK
	ImageTypePDF     ImageType = C.PDF
	ImageTypePNG     ImageType = C.PNG
	ImageTypeSVG     ImageType = C.SVG
	ImageTypeTIFF    ImageType = C.TIFF
	ImageTypeWEBP    ImageType = C.WEBP
)

ImageType enum

func DetermineImageType ¶

func DetermineImageType(buf []byte) ImageType

DetermineImageType attempts to determine the image type of the given buffer

func (ImageType) OutputExt ¶

func (i ImageType) OutputExt() string

OutputExt returns the canonical extension for the ImageType

type InputParams ¶

type InputParams struct {
	Reader io.Reader
	Image  *ImageRef
}

InputParams are options when importing an image from file or buffer

type Interpolator ¶

type Interpolator string

Interpolator represents the vips interpolator types

const (
	InterpolateBicubic  Interpolator = "bicubic"
	InterpolateBilinear Interpolator = "bilinear"
	InterpolateNoHalo   Interpolator = "nohalo"
)

Interpolator enum

func (Interpolator) String ¶

func (i Interpolator) String() string

String returns the canonical name of the interpolator

type Interpretation ¶

type Interpretation int

Interpretation represents VIPS_INTERPRETATION type

type Kernel ¶

type Kernel int

Kernel represents VipsKernel type

const (
	KernelAuto     Kernel = -1
	KernelNearest  Kernel = C.VIPS_KERNEL_NEAREST
	KernelLinear   Kernel = C.VIPS_KERNEL_LINEAR
	KernelCubic    Kernel = C.VIPS_KERNEL_CUBIC
	KernelLanczos2 Kernel = C.VIPS_KERNEL_LANCZOS2
	KernelLanczos3 Kernel = C.VIPS_KERNEL_LANCZOS3
)

Kernel enum

type LabelParams ¶

type LabelParams struct {
	Text      string
	Font      string
	Width     Scalar
	Height    Scalar
	OffsetX   Scalar
	OffsetY   Scalar
	Opacity   float32
	Color     Color
	Alignment Align
}

LabelParams represents a text-based label

type LazyFile ¶

type LazyFile struct {
	// contains filtered or unexported fields
}

LazyFile is a lazy reader or writer TODO(d): Move this to AF

func (*LazyFile) Close ¶

func (r *LazyFile) Close() error

func (*LazyFile) Read ¶

func (r *LazyFile) Read(p []byte) (n int, err error)

func (*LazyFile) Write ¶

func (r *LazyFile) Write(p []byte) (n int, err error)

type OperationBoolean ¶

type OperationBoolean int

OperationBoolean represents VIPS_OPERATION_BOOLEAN type

OperationBoolean enum

type OperationComplex ¶

type OperationComplex int

OperationComplex represents VIPS_OPERATION_COMPLEX type

const (
	OperationComplexPolar OperationComplex = C.VIPS_OPERATION_COMPLEX_POLAR
	OperationComplexRect  OperationComplex = C.VIPS_OPERATION_COMPLEX_RECT
	OperationComplexConj  OperationComplex = C.VIPS_OPERATION_COMPLEX_CONJ
)

OperationComplex enum

type OperationComplex2 ¶

type OperationComplex2 int

OperationComplex2 represents VIPS_OPERATION_COMPLEX2 type

const (
	OperationComplex2CrossPhase OperationComplex2 = C.VIPS_OPERATION_COMPLEX2_CROSS_PHASE
)

OperationComplex2 enum

type OperationComplexGet ¶

type OperationComplexGet int

OperationComplexGet represents VIPS_OPERATION_COMPLEXGET type

OperationComplexGet enum

type OperationMath ¶

type OperationMath int

OperationMath represents VIPS_OPERATION_MATH type

OperationMath enum

type OperationMath2 ¶

type OperationMath2 int

OperationMath2 represents VIPS_OPERATION_MATH2 type

const (
	OperationMath2Pow OperationMath2 = C.VIPS_OPERATION_MATH2_POW
	OperationMath2Wop OperationMath2 = C.VIPS_OPERATION_MATH2_WOP
)

OperationMath2 enum

type OperationMorphology ¶

type OperationMorphology int

OperationMorphology represents VIPS_OPERATION_MORPHOLOGY

OperationMorphology enum

type OperationRelational ¶

type OperationRelational int

OperationRelational represents VIPS_OPERATION_RELATIONAL type

OperationRelational enum

type OperationRound ¶

type OperationRound int

OperationRound represents VIPS_OPERATION_ROUND type

const (
	OperationRoundRint  OperationRound = C.VIPS_OPERATION_ROUND_RINT
	OperationRoundCeil  OperationRound = C.VIPS_OPERATION_ROUND_CEIL
	OperationRoundFloor OperationRound = C.VIPS_OPERATION_ROUND_FLOOR
)

OperationRound enum

type Option ¶

type Option struct {
	Name string
	// contains filtered or unexported fields
}

Option is a type that is passed to internal libvips functions

func InputBool ¶

func InputBool(name string, v bool) *Option

InputBool represents a boolean input option

func InputDouble ¶

func InputDouble(name string, v float64) *Option

InputDouble represents a float64 input option

func InputImage ¶

func InputImage(name string, v *C.VipsImage) *Option

InputImage represents a VipsImage input option

func InputInt ¶

func InputInt(name string, v int) *Option

InputInt represents a int input option

func InputInterpolator ¶

func InputInterpolator(name string, interp Interpolator) *Option

InputInterpolator represents a Interpolator input option

func InputString ¶

func InputString(name string, v string) *Option

InputString represents a string input option

func NewOption ¶

func NewOption(name string, gtype C.GType, output bool, closer func(gv *C.GValue)) *Option

NewOption returns a new option instance

func OutputBool ¶

func OutputBool(name string, v *bool) *Option

OutputBool represents a boolean output option

func OutputDouble ¶

func OutputDouble(name string, v *float64) *Option

OutputDouble represents a float output option

func OutputImage ¶

func OutputImage(name string, v **C.VipsImage) *Option

OutputImage represents a VipsImage output option

func OutputInt ¶

func OutputInt(name string, v *int) *Option

OutputInt represents a int output option

func OutputString ¶

func OutputString(name string, v *string) *Option

OutputString represents a string output option

func (*Option) Close ¶

func (v *Option) Close()

Close releases memory associated with this option

func (*Option) GValue ¶

func (v *Option) GValue() *C.GValue

GValue returns the internal gvalue type

func (*Option) Output ¶

func (v *Option) Output() bool

Output returns true if this option is an output-only option

type ResizeStrategy ¶

type ResizeStrategy int

ResizeStrategy is the strategy to use when resizing an image

const (
	ResizeStrategyAuto ResizeStrategy = iota
	ResizeStrategyEmbed
	ResizeStrategyCrop
	ResizeStrategyStretch
)

ResizeStrategy enum

type RuntimeStats ¶

type RuntimeStats struct {
	OperationCounts map[string]int64
}

type Scalar ¶

type Scalar struct {
	Value    float64
	Relative bool
}

func ScaleOf ¶

func ScaleOf(value float64) Scalar

func ValueOf ¶

func ValueOf(value float64) Scalar

func (*Scalar) Get ¶

func (s *Scalar) Get(base int) float64

func (*Scalar) GetRounded ¶

func (s *Scalar) GetRounded(base int) int

func (*Scalar) IsZero ¶

func (s *Scalar) IsZero() bool

func (*Scalar) Set ¶

func (s *Scalar) Set(value float64)

func (*Scalar) SetInt ¶

func (s *Scalar) SetInt(value int)

func (*Scalar) SetScale ¶

func (s *Scalar) SetScale(f float64)

type Transform ¶

type Transform struct {
	// contains filtered or unexported fields
}

Transform handles single image transformations

func NewTransform ¶

func NewTransform() *Transform

NewTransform constructs a new transform for execution

func (*Transform) Anchor ¶

func (t *Transform) Anchor(anchor Anchor) *Transform

Anchor sets the anchor for cropping

func (*Transform) Apply ¶

func (t *Transform) Apply() ([]byte, ImageType, error)

Apply loads the image, applies the transform, and exports it according to the parameters specified

func (*Transform) BackgroundColor ¶

func (t *Transform) BackgroundColor(color Color) *Transform

BackgroundColor sets the background color of the image when a transparent image is flattened

func (*Transform) Compression ¶

func (t *Transform) Compression(compression int) *Transform

Compression sets the compression value for image formats that support it

func (*Transform) Crop ¶

func (t *Transform) Crop(anchor Anchor) *Transform

Crop an image, width and height must be equal to or less than image size

func (*Transform) CropOffsetX ¶

func (t *Transform) CropOffsetX(x int) *Transform

CropOffsetX sets the target offset from the crop position

func (*Transform) CropOffsetY ¶

func (t *Transform) CropOffsetY(y int) *Transform

CropOffsetY sets the target offset from the crop position

func (*Transform) CropRelativeOffsetX ¶

func (t *Transform) CropRelativeOffsetX(x float64) *Transform

CropRelativeOffsetX sets the target offset from the crop position

func (*Transform) CropRelativeOffsetY ¶

func (t *Transform) CropRelativeOffsetY(y float64) *Transform

CropRelativeOffsetY sets the target offset from the crop position

func (*Transform) Embed ¶

func (t *Transform) Embed(extend Extend) *Transform

Embed this image appropriately if resized according to a new aspect ratio

func (*Transform) Flip ¶

func (t *Transform) Flip(flip FlipDirection) *Transform

Flip flips the image horizontally or vertically

func (*Transform) Format ¶

func (t *Transform) Format(format ImageType) *Transform

Format sets the image format of the input image when exporting. Defaults to JPEG

func (*Transform) GaussBlur ¶

func (t *Transform) GaussBlur(sigma float64) *Transform

GaussBlur applies a gaussian blur to the image

func (*Transform) Image ¶

func (t *Transform) Image(image *ImageRef) *Transform

Image sets the image to operate on

func (*Transform) Interpolator ¶

func (t *Transform) Interpolator(interp Interpolator) *Transform

Interpolator sets the resampling interpolator when upscaling, defaults to bicubic

func (*Transform) Invert ¶

func (t *Transform) Invert() *Transform

Invert inverts the image color

func (*Transform) Kernel ¶

func (t *Transform) Kernel(kernel Kernel) *Transform

Kernel sets the sampling kernel for the transform when down-scaling. Defaults to lancosz3

func (*Transform) Label ¶

func (t *Transform) Label(lp *LabelParams) *Transform

func (*Transform) Load ¶

func (t *Transform) Load(reader io.Reader) *Transform

Load loads a buffer into the transform

func (*Transform) LoadBuffer ¶

func (t *Transform) LoadBuffer(buf []byte) *Transform

LoadBuffer loads a buffer into the transform

func (*Transform) LoadFile ¶

func (t *Transform) LoadFile(file string) *Transform

LoadFile loads a file into the transform

func (*Transform) Lossless ¶

func (t *Transform) Lossless() *Transform

Lossless uses lossless compression for image formats that support both lossy and lossless e.g. webp

func (*Transform) MaxScale ¶

func (t *Transform) MaxScale(max float64) *Transform

MaxScale sets the max scale factor that this image can be enlarged or reduced by

func (*Transform) Output ¶

func (t *Transform) Output(writer io.Writer) *Transform

Output outputs the transform to a buffer and closes it

func (*Transform) OutputBytes ¶

func (t *Transform) OutputBytes() *Transform

OutputBytes outputs the transform to a buffer and closes it

func (*Transform) OutputFile ¶

func (t *Transform) OutputFile(file string) *Transform

OutputFile outputs the transform to a file and closes it

func (*Transform) PadStrategy ¶

func (t *Transform) PadStrategy(strategy Extend) *Transform

PadStrategy sets the strategy when the image must be padded to maintain aspect ratoi

func (*Transform) Quality ¶

func (t *Transform) Quality(quality int) *Transform

Quality sets the quality value for image formats that support it

func (*Transform) Resize ¶

func (t *Transform) Resize(width, height int) *Transform

Resize resizes the image to the given width and height

func (*Transform) ResizeHeight ¶

func (t *Transform) ResizeHeight(height int) *Transform

ResizeHeight resizes the image to the given height, maintaining aspect ratio

func (*Transform) ResizeStrategy ¶

func (t *Transform) ResizeStrategy(strategy ResizeStrategy) *Transform

ResizeStrategy sets the strategy when resizing an image

func (*Transform) ResizeWidth ¶

func (t *Transform) ResizeWidth(width int) *Transform

ResizeWidth resizes the image to the given width, maintaining aspect ratio

func (*Transform) Rotate ¶

func (t *Transform) Rotate(angle Angle) *Transform

Rotate rotates image by a multiple of 90 degrees

func (*Transform) Scale ¶

func (t *Transform) Scale(scale float64) *Transform

Scale the image

func (*Transform) ScaleHeight ¶

func (t *Transform) ScaleHeight(scale float64) *Transform

ScaleHeight scales the height of the image proportionally

func (*Transform) ScaleWidth ¶

func (t *Transform) ScaleWidth(scale float64) *Transform

ScaleWidth scales the image by its width proportionally

func (*Transform) Stretch ¶

func (t *Transform) Stretch() *Transform

Stretch an image without maintaining aspect ratio

func (*Transform) StripMetadata ¶

func (t *Transform) StripMetadata() *Transform

StripMetadata strips metadata from the image

func (*Transform) StripProfile ¶

func (t *Transform) StripProfile() *Transform

StripProfile strips ICC profile from the image

func (*Transform) Zoom ¶

func (t *Transform) Zoom(x, y int) *Transform

Zoom an image by repeating pixels. This is fast nearest-neighbour zoom.

type TransformParams ¶

type TransformParams struct {
	PadStrategy             Extend
	ResizeStrategy          ResizeStrategy
	CropAnchor              Anchor
	ReductionSampler        Kernel
	EnlargementInterpolator Interpolator
	ZoomX                   int
	ZoomY                   int
	Invert                  bool
	Rotate                  Angle
	BlurSigma               float64
	Flip                    FlipDirection
	Width                   Scalar
	Height                  Scalar
	CropOffsetX             Scalar
	CropOffsetY             Scalar
	MaxScale                float64
	Label                   *LabelParams
}

TransformParams are parameters for the transformation

type VipsMemoryStats ¶

type VipsMemoryStats struct {
	Mem     int64
	MemHigh int64
	Files   int64
	Allocs  int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL