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
- Variables
- func Abs(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Add(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Analyzeload(filename string, options ...*Option) (*C.VipsImage, error)
- func Autorot(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Avg(in *C.VipsImage, options ...*Option) (float64, error)
- func Bandbool(in *C.VipsImage, boolean OperationBoolean, options ...*Option) (*C.VipsImage, error)
- func Bandfold(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Bandmean(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Bandunfold(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Black(width int, height int, options ...*Option) (*C.VipsImage, error)
- func Boolean(left *C.VipsImage, right *C.VipsImage, boolean OperationBoolean, ...) (*C.VipsImage, error)
- func Buildlut(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Byteswap(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Cache(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Cast(in *C.VipsImage, format BandFormat, options ...*Option) (*C.VipsImage, error)
- func Cmc2Lch(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Colourspace(in *C.VipsImage, space Interpretation, options ...*Option) (*C.VipsImage, error)
- func Compass(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Complex(in *C.VipsImage, cmplx OperationComplex, options ...*Option) (*C.VipsImage, error)
- func Complex2(left *C.VipsImage, right *C.VipsImage, cmplx OperationComplex2, ...) (*C.VipsImage, error)
- func Complexform(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Complexget(in *C.VipsImage, get OperationComplexGet, options ...*Option) (*C.VipsImage, error)
- func Conv(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Conva(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Convasep(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Convf(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Convi(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Convsep(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Copy(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Countlines(in *C.VipsImage, direction Direction, options ...*Option) (float64, error)
- func Csvload(filename string, options ...*Option) (*C.VipsImage, error)
- func Csvsave(in *C.VipsImage, filename string, options ...*Option) error
- func De00(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func De76(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Decmc(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Deviate(in *C.VipsImage, options ...*Option) (float64, error)
- func Divide(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func DrawImage(image *C.VipsImage, sub *C.VipsImage, x int, y int, options ...*Option) error
- func DrawSmudge(image *C.VipsImage, left int, top int, width int, height int, ...) error
- func Dzsave(in *C.VipsImage, filename string, options ...*Option) error
- func Embed(in *C.VipsImage, x int, y int, width int, height int, options ...*Option) (*C.VipsImage, error)
- func ExtractArea(input *C.VipsImage, left int, top int, width int, height int, ...) (*C.VipsImage, error)
- func ExtractBand(in *C.VipsImage, band int, options ...*Option) (*C.VipsImage, error)
- func Eye(width int, height int, options ...*Option) (*C.VipsImage, error)
- func Falsecolour(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Fastcor(in *C.VipsImage, ref *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func FillNearest(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func FindTrim(in *C.VipsImage, options ...*Option) (int, int, int, int, error)
- func Flatten(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Flip(in *C.VipsImage, direction Direction, options ...*Option) (*C.VipsImage, error)
- func Float2Rad(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Fractsurf(width int, height int, fractalDimension float64, options ...*Option) (*C.VipsImage, error)
- func Freqmult(in *C.VipsImage, mask *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Fwfft(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Gamma(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Gaussblur(in *C.VipsImage, sigma float64, options ...*Option) (*C.VipsImage, error)
- func Gaussmat(sigma float64, minAmpl float64, options ...*Option) (*C.VipsImage, error)
- func Gaussnoise(width int, height int, options ...*Option) (*C.VipsImage, error)
- func Gifload(filename string, options ...*Option) (*C.VipsImage, error)
- func Globalbalance(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Grey(width int, height int, options ...*Option) (*C.VipsImage, error)
- func Grid(in *C.VipsImage, tileHeight int, across int, down int, options ...*Option) (*C.VipsImage, error)
- func HistCum(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func HistEntropy(in *C.VipsImage, options ...*Option) (float64, error)
- func HistEqual(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func HistFind(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func HistFindIndexed(in *C.VipsImage, index *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func HistFindNdim(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func HistIsmonotonic(in *C.VipsImage, options ...*Option) (bool, error)
- func HistLocal(in *C.VipsImage, width int, height int, options ...*Option) (*C.VipsImage, error)
- func HistMatch(in *C.VipsImage, ref *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func HistNorm(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func HistPlot(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func HoughCircle(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func HoughLine(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Hsv2Srgb(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func IccExport(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func IccImport(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func IccTransform(in *C.VipsImage, outputProfile string, options ...*Option) (*C.VipsImage, error)
- func Identity(options ...*Option) (*C.VipsImage, error)
- func Ifthenelse(cond *C.VipsImage, in1 *C.VipsImage, in2 *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Insert(main *C.VipsImage, sub *C.VipsImage, x int, y int, options ...*Option) (*C.VipsImage, error)
- func Invert(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Invertlut(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Invfft(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func IsTypeSupported(imageType ImageType) bool
- func Join(in1 *C.VipsImage, in2 *C.VipsImage, direction Direction, options ...*Option) (*C.VipsImage, error)
- func Jpegload(filename string, options ...*Option) (*C.VipsImage, error)
- func Jpegsave(in *C.VipsImage, filename string, options ...*Option) error
- func JpegsaveMime(in *C.VipsImage, options ...*Option) error
- func Lab2Labq(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Lab2Labs(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Lab2Lch(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Lab2Xyz(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Labelregions(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Labq2Lab(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Labq2Labs(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Labq2Srgb(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Labs2Lab(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Labs2Labq(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func LazyCreate(file string) io.Writer
- func LazyOpen(file string) io.Reader
- func Lch2Cmc(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Lch2Lab(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Linecache(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Logmat(sigma float64, minAmpl float64, options ...*Option) (*C.VipsImage, error)
- func Mapim(in *C.VipsImage, index *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Maplut(in *C.VipsImage, lut *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func MaskButterworth(width int, height int, order float64, frequencyCutoff float64, ...) (*C.VipsImage, error)
- func MaskButterworthBand(width int, height int, order float64, frequencyCutoffx float64, ...) (*C.VipsImage, error)
- func MaskButterworthRing(width int, height int, order float64, frequencyCutoff float64, ...) (*C.VipsImage, error)
- func MaskFractal(width int, height int, fractalDimension float64, options ...*Option) (*C.VipsImage, error)
- func MaskGaussian(width int, height int, frequencyCutoff float64, amplitudeCutoff float64, ...) (*C.VipsImage, error)
- func MaskGaussianBand(width int, height int, frequencyCutoffx float64, frequencyCutoffy float64, ...) (*C.VipsImage, error)
- func MaskGaussianRing(width int, height int, frequencyCutoff float64, amplitudeCutoff float64, ...) (*C.VipsImage, error)
- func MaskIdeal(width int, height int, frequencyCutoff float64, options ...*Option) (*C.VipsImage, error)
- func MaskIdealBand(width int, height int, frequencyCutoffx float64, frequencyCutoffy float64, ...) (*C.VipsImage, error)
- func MaskIdealRing(width int, height int, frequencyCutoff float64, ringwidth float64, ...) (*C.VipsImage, error)
- func Match(ref *C.VipsImage, sec *C.VipsImage, xr1 int, yr1 int, xs1 int, ys1 int, ...) (*C.VipsImage, error)
- func Math(in *C.VipsImage, math OperationMath, options ...*Option) (*C.VipsImage, error)
- func Math2(left *C.VipsImage, right *C.VipsImage, math2 OperationMath2, ...) (*C.VipsImage, error)
- func Matrixload(filename string, options ...*Option) (*C.VipsImage, error)
- func Matrixprint(in *C.VipsImage, options ...*Option) error
- func Matrixsave(in *C.VipsImage, filename string, options ...*Option) error
- func Max(in *C.VipsImage, options ...*Option) (float64, error)
- func Measure(in *C.VipsImage, h int, v int, options ...*Option) (*C.VipsImage, error)
- func Merge(ref *C.VipsImage, sec *C.VipsImage, direction Direction, dx int, dy int, ...) (*C.VipsImage, error)
- func Min(in *C.VipsImage, options ...*Option) (float64, error)
- func Morph(in *C.VipsImage, mask *C.VipsImage, morph OperationMorphology, ...) (*C.VipsImage, error)
- func Mosaic(ref *C.VipsImage, sec *C.VipsImage, direction Direction, xref int, yref int, ...) (*C.VipsImage, error)
- func Mosaic1(ref *C.VipsImage, sec *C.VipsImage, direction Direction, xr1 int, yr1 int, ...) (*C.VipsImage, error)
- func Msb(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Multiply(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Pdfload(filename string, options ...*Option) (*C.VipsImage, error)
- func Percent(in *C.VipsImage, percent float64, options ...*Option) (int, error)
- func Perlin(width int, height int, options ...*Option) (*C.VipsImage, error)
- func Phasecor(in *C.VipsImage, in2 *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Pngload(filename string, options ...*Option) (*C.VipsImage, error)
- func Pngsave(in *C.VipsImage, filename string, options ...*Option) error
- func Ppmload(filename string, options ...*Option) (*C.VipsImage, error)
- func Ppmsave(in *C.VipsImage, filename string, options ...*Option) error
- func Premultiply(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func PrintObjectReport(label string)
- func Profile(in *C.VipsImage, options ...*Option) (*C.VipsImage, *C.VipsImage, error)
- func Project(in *C.VipsImage, options ...*Option) (*C.VipsImage, *C.VipsImage, error)
- func Quadratic(in *C.VipsImage, coeff *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Rad2Float(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Radload(filename string, options ...*Option) (*C.VipsImage, error)
- func Radsave(in *C.VipsImage, filename string, options ...*Option) error
- func Rank(in *C.VipsImage, width int, height int, index int, options ...*Option) (*C.VipsImage, error)
- func Rawload(filename string, width int, height int, bands int, options ...*Option) (*C.VipsImage, error)
- func Rawsave(in *C.VipsImage, filename string, options ...*Option) error
- func RawsaveFd(in *C.VipsImage, fd int, options ...*Option) error
- func ReadRuntimeStats(stats *RuntimeStats)
- func ReadVipsMemStats(stats *VipsMemoryStats)
- func Recomb(in *C.VipsImage, m *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Reduce(in *C.VipsImage, hshrink float64, vshrink float64, options ...*Option) (*C.VipsImage, error)
- func Reduceh(in *C.VipsImage, hshrink float64, options ...*Option) (*C.VipsImage, error)
- func Reducev(in *C.VipsImage, vshrink float64, options ...*Option) (*C.VipsImage, error)
- func Relational(left *C.VipsImage, right *C.VipsImage, relational OperationRelational, ...) (*C.VipsImage, error)
- func Remainder(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Replicate(in *C.VipsImage, across int, down int, options ...*Option) (*C.VipsImage, error)
- func Resize(in *C.VipsImage, scale float64, options ...*Option) (*C.VipsImage, error)
- func Rot(in *C.VipsImage, angle Angle, options ...*Option) (*C.VipsImage, error)
- func Rot45(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Round(in *C.VipsImage, round OperationRound, options ...*Option) (*C.VipsImage, error)
- func Scale(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Scrgb2Bw(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Scrgb2Srgb(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Scrgb2Xyz(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Sequential(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Sharpen(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Shrink(in *C.VipsImage, hshrink float64, vshrink float64, options ...*Option) (*C.VipsImage, error)
- func Shrinkh(in *C.VipsImage, hshrink int, options ...*Option) (*C.VipsImage, error)
- func Shrinkv(in *C.VipsImage, vshrink int, options ...*Option) (*C.VipsImage, error)
- func Shutdown()
- func ShutdownThread()
- func Sign(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Similarity(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Sines(width int, height int, options ...*Option) (*C.VipsImage, error)
- func Smartcrop(input *C.VipsImage, width int, height int, options ...*Option) (*C.VipsImage, error)
- func Spcor(in *C.VipsImage, ref *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Spectrum(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Srgb2Hsv(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Srgb2Scrgb(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Startup(config *Config)
- func Stats(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Stdif(in *C.VipsImage, width int, height int, options ...*Option) (*C.VipsImage, error)
- func Subsample(input *C.VipsImage, xfac int, yfac int, options ...*Option) (*C.VipsImage, error)
- func Subtract(left *C.VipsImage, right *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Svgload(filename string, options ...*Option) (*C.VipsImage, error)
- func System(cmdFormat string, options ...*Option) error
- func Text(text string, options ...*Option) (*C.VipsImage, error)
- func Thumbnail(filename string, width int, options ...*Option) (*C.VipsImage, error)
- func ThumbnailImage(in *C.VipsImage, width int, options ...*Option) (*C.VipsImage, error)
- func Tiffload(filename string, options ...*Option) (*C.VipsImage, error)
- func Tiffsave(in *C.VipsImage, filename string, options ...*Option) error
- func Tilecache(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Tonelut(options ...*Option) (*C.VipsImage, error)
- func Unpremultiply(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func VipsClearCache()
- func VipsPrintCache()
- func Vipsload(filename string, options ...*Option) (*C.VipsImage, error)
- func Vipssave(in *C.VipsImage, filename string, options ...*Option) error
- func Webpload(filename string, options ...*Option) (*C.VipsImage, error)
- func Webpsave(in *C.VipsImage, filename string, options ...*Option) error
- func Worley(width int, height int, options ...*Option) (*C.VipsImage, error)
- func Wrap(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Xyz(width int, height int, options ...*Option) (*C.VipsImage, error)
- func Xyz2Lab(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Xyz2Scrgb(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Xyz2Yxy(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Yxy2Xyz(in *C.VipsImage, options ...*Option) (*C.VipsImage, error)
- func Zone(width int, height int, options ...*Option) (*C.VipsImage, error)
- func Zoom(input *C.VipsImage, xfac int, yfac int, options ...*Option) (*C.VipsImage, error)
- type Access
- type Align
- type Anchor
- type Angle
- type Angle45
- type BandFormat
- type Blackboard
- type BlendMode
- type Coding
- type Color
- type Composite
- type Config
- type Direction
- type ExportParams
- type Extend
- type FlipDirection
- type ImageRef
- func (in *ImageRef) Abs(options ...*Option) error
- func (in *ImageRef) Autorot(options ...*Option) error
- func (ref *ImageRef) BandFormat() BandFormat
- func (in *ImageRef) Bandbool(boolean OperationBoolean, options ...*Option) error
- func (in *ImageRef) Bandfold(options ...*Option) error
- func (in *ImageRef) Bandmean(options ...*Option) error
- func (ref *ImageRef) Bands() int
- func (in *ImageRef) Bandunfold(options ...*Option) error
- func (in *ImageRef) Buildlut(options ...*Option) error
- func (in *ImageRef) Byteswap(options ...*Option) error
- func (in *ImageRef) Cache(options ...*Option) error
- func (in *ImageRef) Cast(format BandFormat, options ...*Option) error
- func (ref *ImageRef) Close()
- func (in *ImageRef) Cmc2Lch(options ...*Option) error
- func (ref *ImageRef) Coding() Coding
- func (in *ImageRef) Colourspace(space Interpretation, options ...*Option) error
- func (in *ImageRef) Complex(cmplx OperationComplex, options ...*Option) error
- func (in *ImageRef) Complexget(get OperationComplexGet, options ...*Option) error
- func (ref *ImageRef) Composite(overlay *ImageRef, mode BlendMode) error
- func (in *ImageRef) Copy(options ...*Option) error
- func (in *ImageRef) Embed(x int, y int, width int, height int, options ...*Option) error
- func (ref *ImageRef) Export(params ExportParams) ([]byte, ImageType, error)
- func (in *ImageRef) ExtractArea(left int, top int, width int, height int, options ...*Option) error
- func (in *ImageRef) ExtractBand(band int, options ...*Option) error
- func (in *ImageRef) Falsecolour(options ...*Option) error
- func (in *ImageRef) FillNearest(options ...*Option) error
- func (in *ImageRef) Flatten(options ...*Option) error
- func (in *ImageRef) Flip(direction Direction, options ...*Option) error
- func (in *ImageRef) Float2Rad(options ...*Option) error
- func (ref *ImageRef) Format() ImageType
- func (in *ImageRef) Fwfft(options ...*Option) error
- func (in *ImageRef) Gamma(options ...*Option) error
- func (in *ImageRef) Gaussblur(sigma float64, options ...*Option) error
- func (in *ImageRef) Globalbalance(options ...*Option) error
- func (in *ImageRef) Grid(tileHeight int, across int, down int, options ...*Option) error
- func (ref *ImageRef) HasAlpha() bool
- func (ref *ImageRef) HasProfile() bool
- func (ref *ImageRef) Height() int
- func (in *ImageRef) HistCum(options ...*Option) error
- func (in *ImageRef) HistEqual(options ...*Option) error
- func (in *ImageRef) HistFind(options ...*Option) error
- func (in *ImageRef) HistFindNdim(options ...*Option) error
- func (in *ImageRef) HistLocal(width int, height int, options ...*Option) error
- func (in *ImageRef) HistNorm(options ...*Option) error
- func (in *ImageRef) HistPlot(options ...*Option) error
- func (in *ImageRef) HoughCircle(options ...*Option) error
- func (in *ImageRef) HoughLine(options ...*Option) error
- func (in *ImageRef) Hsv2Srgb(options ...*Option) error
- func (in *ImageRef) IccExport(options ...*Option) error
- func (in *ImageRef) IccImport(options ...*Option) error
- func (in *ImageRef) IccTransform(outputProfile string, options ...*Option) error
- func (ref *ImageRef) Image() *C.VipsImage
- func (ref *ImageRef) Interpretation() Interpretation
- func (in *ImageRef) Invert(options ...*Option) error
- func (in *ImageRef) Invertlut(options ...*Option) error
- func (in *ImageRef) Invfft(options ...*Option) error
- func (in *ImageRef) Lab2Labq(options ...*Option) error
- func (in *ImageRef) Lab2Labs(options ...*Option) error
- func (in *ImageRef) Lab2Lch(options ...*Option) error
- func (in *ImageRef) Lab2Xyz(options ...*Option) error
- func (in *ImageRef) Labelregions(options ...*Option) error
- func (in *ImageRef) Labq2Lab(options ...*Option) error
- func (in *ImageRef) Labq2Labs(options ...*Option) error
- func (in *ImageRef) Labq2Srgb(options ...*Option) error
- func (in *ImageRef) Labs2Lab(options ...*Option) error
- func (in *ImageRef) Labs2Labq(options ...*Option) error
- func (in *ImageRef) Lch2Cmc(options ...*Option) error
- func (in *ImageRef) Lch2Lab(options ...*Option) error
- func (in *ImageRef) Linecache(options ...*Option) error
- func (in *ImageRef) Math(math OperationMath, options ...*Option) error
- func (in *ImageRef) Measure(h int, v int, options ...*Option) error
- func (in *ImageRef) Msb(options ...*Option) error
- func (ref *ImageRef) OffsetX() int
- func (ref *ImageRef) OffsetY() int
- func (in *ImageRef) Premultiply(options ...*Option) error
- func (in *ImageRef) Rad2Float(options ...*Option) error
- func (in *ImageRef) Rank(width int, height int, index int, options ...*Option) error
- func (in *ImageRef) Reduce(hshrink float64, vshrink float64, options ...*Option) error
- func (in *ImageRef) Reduceh(hshrink float64, options ...*Option) error
- func (in *ImageRef) Reducev(vshrink float64, options ...*Option) error
- func (in *ImageRef) Replicate(across int, down int, options ...*Option) error
- func (ref *ImageRef) ResX() float64
- func (ref *ImageRef) ResY() float64
- func (in *ImageRef) Resize(scale float64, options ...*Option) error
- func (in *ImageRef) Rot(angle Angle, options ...*Option) error
- func (in *ImageRef) Rot45(options ...*Option) error
- func (in *ImageRef) Round(round OperationRound, options ...*Option) error
- func (in *ImageRef) Scale(options ...*Option) error
- func (in *ImageRef) Scrgb2Bw(options ...*Option) error
- func (in *ImageRef) Scrgb2Srgb(options ...*Option) error
- func (in *ImageRef) Scrgb2Xyz(options ...*Option) error
- func (in *ImageRef) Sequential(options ...*Option) error
- func (ref *ImageRef) SetImage(image *C.VipsImage)
- func (in *ImageRef) Sharpen(options ...*Option) error
- func (in *ImageRef) Shrink(hshrink float64, vshrink float64, options ...*Option) error
- func (in *ImageRef) Shrinkh(hshrink int, options ...*Option) error
- func (in *ImageRef) Shrinkv(vshrink int, options ...*Option) error
- func (in *ImageRef) Sign(options ...*Option) error
- func (in *ImageRef) Similarity(options ...*Option) error
- func (in *ImageRef) Smartcrop(width int, height int, options ...*Option) error
- func (in *ImageRef) Spectrum(options ...*Option) error
- func (in *ImageRef) Srgb2Hsv(options ...*Option) error
- func (in *ImageRef) Srgb2Scrgb(options ...*Option) error
- func (in *ImageRef) Stats(options ...*Option) error
- func (in *ImageRef) Stdif(width int, height int, options ...*Option) error
- func (in *ImageRef) Subsample(xfac int, yfac int, options ...*Option) error
- func (in *ImageRef) ThumbnailImage(width int, options ...*Option) error
- func (in *ImageRef) Tilecache(options ...*Option) error
- func (ref *ImageRef) ToBytes() ([]byte, error)
- func (in *ImageRef) Unpremultiply(options ...*Option) error
- func (ref *ImageRef) Width() int
- func (in *ImageRef) Wrap(options ...*Option) error
- func (in *ImageRef) Xyz2Lab(options ...*Option) error
- func (in *ImageRef) Xyz2Scrgb(options ...*Option) error
- func (in *ImageRef) Xyz2Yxy(options ...*Option) error
- func (in *ImageRef) Yxy2Xyz(options ...*Option) error
- func (in *ImageRef) Zoom(xfac int, yfac int, options ...*Option) error
- type ImageType
- type InputParams
- type Interpolator
- type Interpretation
- type Kernel
- type LabelParams
- type LazyFile
- type LoadOption
- type OperationBoolean
- type OperationComplex
- type OperationComplex2
- type OperationComplexGet
- type OperationMath
- type OperationMath2
- type OperationMorphology
- type OperationRelational
- type OperationRound
- type Option
- func InputBool(name string, v bool) *Option
- func InputDouble(name string, v float64) *Option
- func InputImage(name string, v *C.VipsImage) *Option
- func InputInt(name string, v int) *Option
- func InputInterpolator(name string, interp Interpolator) *Option
- func InputString(name string, v string) *Option
- func NewOption(name string, gtype C.GType, output bool, closer func(gv *C.GValue)) *Option
- func OutputBool(name string, v *bool) *Option
- func OutputDouble(name string, v *float64) *Option
- func OutputImage(name string, v **C.VipsImage) *Option
- func OutputInt(name string, v *int) *Option
- func OutputString(name string, v *string) *Option
- type ResizeStrategy
- type RuntimeStats
- type Scalar
- type Size
- type Transform
- func (t *Transform) Anchor(anchor Anchor) *Transform
- func (t *Transform) Apply() ([]byte, ImageType, error)
- func (t *Transform) BackgroundColor(color Color) *Transform
- func (t *Transform) Compression(compression int) *Transform
- func (t *Transform) Crop(anchor Anchor) *Transform
- func (t *Transform) CropOffsetX(x int) *Transform
- func (t *Transform) CropOffsetY(y int) *Transform
- func (t *Transform) CropRelativeOffsetX(x float64) *Transform
- func (t *Transform) CropRelativeOffsetY(y float64) *Transform
- func (t *Transform) Embed(extend Extend) *Transform
- func (t *Transform) Flip(flip FlipDirection) *Transform
- func (t *Transform) Format(format ImageType) *Transform
- func (t *Transform) GaussBlur(sigma float64) *Transform
- func (t *Transform) Image(image *ImageRef) *Transform
- func (t *Transform) Interlaced() *Transform
- func (t *Transform) Interpolator(interp Interpolator) *Transform
- func (t *Transform) Interpretation(interpretation Interpretation) *Transform
- func (t *Transform) Invert() *Transform
- func (t *Transform) Kernel(kernel Kernel) *Transform
- func (t *Transform) Label(lp *LabelParams) *Transform
- func (t *Transform) Load(reader io.Reader) *Transform
- func (t *Transform) LoadBuffer(buf []byte) *Transform
- func (t *Transform) LoadFile(file string) *Transform
- func (t *Transform) Lossless() *Transform
- func (t *Transform) MaxScale(max float64) *Transform
- func (t *Transform) Output(writer io.Writer) *Transform
- func (t *Transform) OutputBytes() *Transform
- func (t *Transform) OutputFile(file string) *Transform
- func (t *Transform) PadStrategy(strategy Extend) *Transform
- func (t *Transform) Quality(quality int) *Transform
- func (t *Transform) Resize(width, height int) *Transform
- func (t *Transform) ResizeHeight(height int) *Transform
- func (t *Transform) ResizeStrategy(strategy ResizeStrategy) *Transform
- func (t *Transform) ResizeWidth(width int) *Transform
- func (t *Transform) Rotate(angle Angle) *Transform
- func (t *Transform) Scale(scale float64) *Transform
- func (t *Transform) ScaleHeight(scale float64) *Transform
- func (t *Transform) ScaleWidth(scale float64) *Transform
- func (t *Transform) Stretch() *Transform
- func (t *Transform) StripMetadata() *Transform
- func (t *Transform) StripProfile() *Transform
- func (t *Transform) Zoom(x, y int) *Transform
- type TransformParams
- type VipsMemoryStats
Constants ¶
const DefaultFont = "sans 10"
const VipsMajorVersion = int(C.VIPS_MAJOR_VERSION)
VipsMajorVersion is the major version of libvips
const VipsMinorVersion = int(C.VIPS_MINOR_VERSION)
VipsMinorVersion if the minor version of libvips
const VipsVersion = string(C.VIPS_VERSION)
VipsVersion if the primary version of libvips
Variables ¶
var ColorBlack = Color{0, 0, 0}
ColorBlack is shorthand for black RGB
var ( // ErrUnsupportedImageFormat when image type is unsupported ErrUnsupportedImageFormat = errors.New("Unsupported image format") )
var ImageTypes = map[ImageType]string{ ImageTypeGIF: "gif", ImageTypeJPEG: "jpeg", ImageTypeMagick: "magick", ImageTypePDF: "pdf", ImageTypePNG: "png", ImageTypeSVG: "svg", ImageTypeTIFF: "tiff", ImageTypeWEBP: "webp", }
Functions ¶
func Analyzeload ¶
Analyzeload executes the 'analyzeload' operation
func Bandunfold ¶
Bandunfold executes the 'bandunfold' operation
func Boolean ¶
func Boolean(left *C.VipsImage, right *C.VipsImage, boolean OperationBoolean, options ...*Option) (*C.VipsImage, error)
Boolean executes the 'boolean' operation
func Colourspace ¶
Colourspace executes the 'colourspace' 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 ¶
Complexform executes the 'complexform' operation
func Complexget ¶
Complexget executes the 'complexget' operation
func Countlines ¶
Countlines executes the 'countlines' 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 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 ¶
ExtractBand executes the 'extract_band' operation
func Falsecolour ¶
Falsecolour executes the 'falsecolour' operation
func FillNearest ¶
FillNearest executes the 'fill_nearest' operation
func Fractsurf ¶
func Fractsurf(width int, height int, fractalDimension float64, options ...*Option) (*C.VipsImage, error)
Fractsurf executes the 'fractsurf' operation
func Gaussnoise ¶
Gaussnoise executes the 'gaussnoise' operation
func Globalbalance ¶
Globalbalance executes the 'globalbalance' 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 HistEntropy ¶
HistEntropy executes the 'hist_entropy' operation
func HistFindIndexed ¶
HistFindIndexed executes the 'hist_find_indexed' operation
func HistFindNdim ¶
HistFindNdim executes the 'hist_find_ndim' operation
func HistIsmonotonic ¶
HistIsmonotonic executes the 'hist_ismonotonic' operation
func HoughCircle ¶
HoughCircle executes the 'hough_circle' operation
func IccTransform ¶
IccTransform executes the 'icc_transform' 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 IsTypeSupported ¶
func Join ¶
func Join(in1 *C.VipsImage, in2 *C.VipsImage, direction Direction, options ...*Option) (*C.VipsImage, error)
Join executes the 'join' operation
func JpegsaveMime ¶
JpegsaveMime executes the 'jpegsave_mime' operation
func Labelregions ¶
Labelregions executes the 'labelregions' operation
func LazyCreate ¶
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 Math2 ¶
func Math2(left *C.VipsImage, right *C.VipsImage, math2 OperationMath2, options ...*Option) (*C.VipsImage, error)
Math2 executes the 'math2' operation
func Matrixload ¶
Matrixload executes the 'matrixload' operation
func Matrixprint ¶
Matrixprint executes the 'matrixprint' operation
func Matrixsave ¶
Matrixsave executes the 'matrixsave' 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 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 Premultiply ¶
Premultiply executes the 'premultiply' operation
func PrintObjectReport ¶
func PrintObjectReport(label string)
PrintObjectReport outputs all of the current internal objects in libvips
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 ReadRuntimeStats ¶
func ReadRuntimeStats(stats *RuntimeStats)
func ReadVipsMemStats ¶
func ReadVipsMemStats(stats *VipsMemoryStats)
func Reduce ¶
func Reduce(in *C.VipsImage, hshrink float64, vshrink float64, options ...*Option) (*C.VipsImage, error)
Reduce executes the 'reduce' operation
func Relational ¶
func Relational(left *C.VipsImage, right *C.VipsImage, relational OperationRelational, options ...*Option) (*C.VipsImage, error)
Relational executes the 'relational' operation
func Scrgb2Srgb ¶
Scrgb2Srgb executes the 'scRGB2sRGB' operation
func Sequential ¶
Sequential executes the 'sequential' operation
func Shrink ¶
func Shrink(in *C.VipsImage, hshrink float64, vshrink float64, options ...*Option) (*C.VipsImage, error)
Shrink executes the 'shrink' operation
func ShutdownThread ¶
func ShutdownThread()
ShutdownThread clears the cache for for the given thread
func Similarity ¶
Similarity executes the 'similarity' operation
func Srgb2Scrgb ¶
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 ThumbnailImage ¶
ThumbnailImage executes the 'thumbnail_image' operation
func Unpremultiply ¶
Unpremultiply executes the 'unpremultiply' operation
func VipsClearCache ¶
func VipsClearCache()
func VipsPrintCache ¶
func VipsPrintCache()
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
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
const ( BlendModeClear BlendMode = C.VIPS_BLEND_MODE_CLEAR BlendModeSource BlendMode = C.VIPS_BLEND_MODE_SOURCE BlendModeOver BlendMode = C.VIPS_BLEND_MODE_OVER BlendModeIn BlendMode = C.VIPS_BLEND_MODE_IN BlendModeOut BlendMode = C.VIPS_BLEND_MODE_OUT BlendModeAtop BlendMode = C.VIPS_BLEND_MODE_ATOP BlendModeDest BlendMode = C.VIPS_BLEND_MODE_DEST BlendModeDestOver BlendMode = C.VIPS_BLEND_MODE_DEST_OVER BlendModeDestIn BlendMode = C.VIPS_BLEND_MODE_DEST_IN BlendModeDestOut BlendMode = C.VIPS_BLEND_MODE_DEST_OUT BlendModeDestAtop BlendMode = C.VIPS_BLEND_MODE_DEST_ATOP BlendModeXOR BlendMode = C.VIPS_BLEND_MODE_XOR BlendModeAdd BlendMode = C.VIPS_BLEND_MODE_ADD BlendModeSaturate BlendMode = C.VIPS_BLEND_MODE_SATURATE BlendModeMultiply BlendMode = C.VIPS_BLEND_MODE_MULTIPLY BlendModeScreen BlendMode = C.VIPS_BLEND_MODE_SCREEN BlendModeOverlay BlendMode = C.VIPS_BLEND_MODE_OVERLAY BlendModeDarken BlendMode = C.VIPS_BLEND_MODE_DARKEN BlendModeLighten BlendMode = C.VIPS_BLEND_MODE_LIGHTEN BlendModeColorDodge BlendMode = C.VIPS_BLEND_MODE_COLOUR_DODGE BlendModeColorBurn BlendMode = C.VIPS_BLEND_MODE_COLOUR_BURN BlendModeHardLight BlendMode = C.VIPS_BLEND_MODE_HARD_LIGHT BlendModeSoftLight BlendMode = C.VIPS_BLEND_MODE_SOFT_LIGHT BlendModeDifference BlendMode = C.VIPS_BLEND_MODE_DIFFERENCE BlendModeExclusion BlendMode = C.VIPS_BLEND_MODE_EXCLUSION )
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 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, opts ...LoadOption) (*ImageRef, error)
LoadImage loads an ImageRef from the given reader
func NewImageFromBuffer ¶
func NewImageFromBuffer(buf []byte, opts ...LoadOption) (*ImageRef, error)
NewImageFromBuffer loads an image buffer and creates a new Image
func NewImageFromFile ¶
func NewImageFromFile(file string, opts ...LoadOption) (*ImageRef, error)
NewImageFromFile loads an image from file and creates a new ImageRef
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) Bandunfold ¶
Bandunfold executes the 'bandunfold' 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) 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) Export ¶
func (ref *ImageRef) Export(params ExportParams) ([]byte, ImageType, error)
Export exports the image
func (*ImageRef) ExtractArea ¶
ExtractArea executes the 'extract_area' operation
func (*ImageRef) ExtractBand ¶
ExtractBand executes the 'extract_band' operation
func (*ImageRef) Falsecolour ¶
Falsecolour executes the 'falsecolour' operation
func (*ImageRef) FillNearest ¶
FillNearest executes the 'fill_nearest' operation
func (*ImageRef) Globalbalance ¶
Globalbalance executes the 'globalbalance' operation
func (*ImageRef) HasProfile ¶
HasProfile returns if the image has an ICC profile embedded.
func (*ImageRef) HistFindNdim ¶
HistFindNdim executes the 'hist_find_ndim' operation
func (*ImageRef) HoughCircle ¶
HoughCircle executes the 'hough_circle' operation
func (*ImageRef) IccTransform ¶
IccTransform executes the 'icc_transform' operation
func (*ImageRef) Interpretation ¶
func (ref *ImageRef) Interpretation() Interpretation
Interpretation returns the current interpretation
func (*ImageRef) Labelregions ¶
Labelregions executes the 'labelregions' operation
func (*ImageRef) Math ¶
func (in *ImageRef) Math(math OperationMath, options ...*Option) error
Math executes the 'math' operation
func (*ImageRef) Premultiply ¶
Premultiply executes the 'premultiply' operation
func (*ImageRef) Round ¶
func (in *ImageRef) Round(round OperationRound, options ...*Option) error
Round executes the 'round' operation
func (*ImageRef) Scrgb2Srgb ¶
Scrgb2Srgb executes the 'scRGB2sRGB' operation
func (*ImageRef) Sequential ¶
Sequential executes the 'sequential' operation
func (*ImageRef) Similarity ¶
Similarity executes the 'similarity' operation
func (*ImageRef) Srgb2Scrgb ¶
Srgb2Scrgb executes the 'sRGB2scRGB' operation
func (*ImageRef) ThumbnailImage ¶
ThumbnailImage executes the 'thumbnail_image' operation
func (*ImageRef) ToBytes ¶
ToBytes writes the image to memory in VIPs format and returns the raw bytes, useful for storage.
func (*ImageRef) Unpremultiply ¶
Unpremultiply executes the 'unpremultiply' 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 ¶
DetermineImageType attempts to determine the image type of the given buffer
type InputParams ¶
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
const ( InterpretationError Interpretation = C.VIPS_INTERPRETATION_ERROR InterpretationMultiband Interpretation = C.VIPS_INTERPRETATION_MULTIBAND InterpretationBW Interpretation = C.VIPS_INTERPRETATION_B_W InterpretationHistogram Interpretation = C.VIPS_INTERPRETATION_HISTOGRAM InterpretationXYZ Interpretation = C.VIPS_INTERPRETATION_XYZ InterpretationLAB Interpretation = C.VIPS_INTERPRETATION_LAB InterpretationCMYK Interpretation = C.VIPS_INTERPRETATION_CMYK InterpretationLABQ Interpretation = C.VIPS_INTERPRETATION_LABQ InterpretationRGB Interpretation = C.VIPS_INTERPRETATION_RGB InterpretationCMC Interpretation = C.VIPS_INTERPRETATION_CMC InterpretationLCH Interpretation = C.VIPS_INTERPRETATION_LCH InterpretationLABS Interpretation = C.VIPS_INTERPRETATION_LABS InterpretationSRGB Interpretation = C.VIPS_INTERPRETATION_sRGB InterpretationYXY Interpretation = C.VIPS_INTERPRETATION_YXY InterpretationFourier Interpretation = C.VIPS_INTERPRETATION_FOURIER InterpretationGB16 Interpretation = C.VIPS_INTERPRETATION_RGB16 InterpretationGrey16 Interpretation = C.VIPS_INTERPRETATION_GREY16 InterpretationMatrix Interpretation = C.VIPS_INTERPRETATION_MATRIX InterpretationScRGB Interpretation = C.VIPS_INTERPRETATION_scRGB InterpretationHSV Interpretation = C.VIPS_INTERPRETATION_HSV )
Interpretation enum
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
type LoadOption ¶
type LoadOption func(o *vipsLoadOptions)
func WithAccessMode ¶
func WithAccessMode(a Access) LoadOption
type OperationBoolean ¶
type OperationBoolean int
OperationBoolean represents VIPS_OPERATION_BOOLEAN type
const ( OperationBooleanAnd OperationBoolean = C.VIPS_OPERATION_BOOLEAN_AND OperationBooleanOr OperationBoolean = C.VIPS_OPERATION_BOOLEAN_OR OperationBooleanEOr OperationBoolean = C.VIPS_OPERATION_BOOLEAN_EOR OperationBooleanLShift OperationBoolean = C.VIPS_OPERATION_BOOLEAN_LSHIFT OperationBooleanRShift OperationBoolean = C.VIPS_OPERATION_BOOLEAN_RSHIFT )
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
const ( OperationComplexReal OperationComplexGet = C.VIPS_OPERATION_COMPLEXGET_REAL OperationComplexImag OperationComplexGet = C.VIPS_OPERATION_COMPLEXGET_IMAG )
OperationComplexGet enum
type OperationMath ¶
type OperationMath int
OperationMath represents VIPS_OPERATION_MATH type
const ( OperationMathSin OperationMath = C.VIPS_OPERATION_MATH_SIN OperationMathCos OperationMath = C.VIPS_OPERATION_MATH_COS OperationMathTan OperationMath = C.VIPS_OPERATION_MATH_TAN OperationMathAsin OperationMath = C.VIPS_OPERATION_MATH_ASIN OperationMathAcos OperationMath = C.VIPS_OPERATION_MATH_ACOS OperationMathAtan OperationMath = C.VIPS_OPERATION_MATH_ATAN OperationMathLog OperationMath = C.VIPS_OPERATION_MATH_LOG OperationMathLog10 OperationMath = C.VIPS_OPERATION_MATH_LOG10 OperationMathExp OperationMath = C.VIPS_OPERATION_MATH_EXP OperationMathExp10 OperationMath = C.VIPS_OPERATION_MATH_EXP10 )
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
const ( MorphologyErode OperationMorphology = C.VIPS_OPERATION_MORPHOLOGY_ERODE MorphologyDilate OperationMorphology = C.VIPS_OPERATION_MORPHOLOGY_DILATE )
OperationMorphology enum
type OperationRelational ¶
type OperationRelational int
OperationRelational represents VIPS_OPERATION_RELATIONAL type
const ( OperationRelationalEqual OperationRelational = C.VIPS_OPERATION_RELATIONAL_EQUAL OperationRelationalNotEq OperationRelational = C.VIPS_OPERATION_RELATIONAL_NOTEQ OperationRelationalLess OperationRelational = C.VIPS_OPERATION_RELATIONAL_LESS OperationRelationalLessEq OperationRelational = C.VIPS_OPERATION_RELATIONAL_LESSEQ OperationRelationalMore OperationRelational = C.VIPS_OPERATION_RELATIONAL_MORE OperationRelationalMoreEq OperationRelational = C.VIPS_OPERATION_RELATIONAL_MOREEQ )
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 InputDouble ¶
InputDouble represents a float64 input option
func InputImage ¶
InputImage represents a VipsImage input option
func InputInterpolator ¶
func InputInterpolator(name string, interp Interpolator) *Option
InputInterpolator represents a Interpolator input option
func InputString ¶
InputString represents a string input option
func OutputBool ¶
OutputBool represents a boolean output option
func OutputDouble ¶
OutputDouble represents a float output option
func OutputImage ¶
OutputImage represents a VipsImage output option
func OutputString ¶
OutputString represents a string output 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 Scalar ¶
func (*Scalar) GetRounded ¶
type Size ¶
type Size int
Size represents VIPS_SIZE type
const ( SizeBoth Size = C.VIPS_SIZE_BOTH SizeUp Size = C.VIPS_SIZE_UP SizeDown Size = C.VIPS_SIZE_DOWN SizeForce Size = C.VIPS_SIZE_FORCE SizeLast Size = C.VIPS_SIZE_LAST )
Size enum
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) Apply ¶
Apply loads the image, applies the transform, and exports it according to the parameters specified
func (*Transform) BackgroundColor ¶
BackgroundColor sets the background color of the image when a transparent image is flattened
func (*Transform) Compression ¶
Compression sets the compression value for image formats that support it
func (*Transform) CropOffsetX ¶
CropOffsetX sets the target offset from the crop position
func (*Transform) CropOffsetY ¶
CropOffsetY sets the target offset from the crop position
func (*Transform) CropRelativeOffsetX ¶
CropRelativeOffsetX sets the target offset from the crop position
func (*Transform) CropRelativeOffsetY ¶
CropRelativeOffsetY sets the target offset from the crop position
func (*Transform) Flip ¶
func (t *Transform) Flip(flip FlipDirection) *Transform
Flip flips the image horizontally or vertically
func (*Transform) Format ¶
Format sets the image format of the input image when exporting. Defaults to JPEG
func (*Transform) Interlaced ¶
Interlaced uses interlaced for image that support it
func (*Transform) Interpolator ¶
func (t *Transform) Interpolator(interp Interpolator) *Transform
Interpolator sets the resampling interpolator when upscaling, defaults to bicubic
func (*Transform) Interpretation ¶
func (t *Transform) Interpretation(interpretation Interpretation) *Transform
Interpretation sets interpretation for image
func (*Transform) Kernel ¶
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) LoadBuffer ¶
LoadBuffer loads a buffer into the transform
func (*Transform) Lossless ¶
Lossless uses lossless compression for image formats that support both lossy and lossless e.g. webp
func (*Transform) MaxScale ¶
MaxScale sets the max scale factor that this image can be enlarged or reduced by
func (*Transform) OutputBytes ¶
OutputBytes outputs the transform to a buffer and closes it
func (*Transform) OutputFile ¶
OutputFile outputs the transform to a file and closes it
func (*Transform) PadStrategy ¶
PadStrategy sets the strategy when the image must be padded to maintain aspect ratoi
func (*Transform) ResizeHeight ¶
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 ¶
ResizeWidth resizes the image to the given width, maintaining aspect ratio
func (*Transform) ScaleHeight ¶
ScaleHeight scales the height of the image proportionally
func (*Transform) ScaleWidth ¶
ScaleWidth scales the image by its width proportionally
func (*Transform) StripMetadata ¶
StripMetadata strips metadata from the image
func (*Transform) StripProfile ¶
StripProfile strips ICC profile from the image
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