Class VImage
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordHelper record to hold multiple outputs from thefindTrim(app.photofox.vipsffm.VipsOption...)operationstatic final recordHelper record to hold multiple outputs from theprofile(app.photofox.vipsffm.VipsOption...)operationstatic final recordHelper record to hold multiple outputs from theproject(app.photofox.vipsffm.VipsOption...)operation -
Method Summary
Modifier and TypeMethodDescriptionabs(VipsOption... args) This operation finds the absolute value of an image.add(VImage right, VipsOption... args) This operation calculatesin1+in2and writes the result toout.addalpha(VipsOption... args) Append an alpha channel.affine(List<Double> matrix, VipsOption... args) This operator performs an affine transform on an image usinginterpolate.static VImageanalyzeload(Arena arena, String filename, VipsOption... args) Load an Analyze 6.0 file.static VImagearrayjoin(Arena arena, List<VImage> in, VipsOption... args) Lay out the images ininin a grid.autorot(VipsOption... args) Look at the image metadata and rotate and flip the image to make it upright.doubleavg(VipsOption... args) This operation finds the average value in an image.bandbool(VipsOperationBoolean boolean1, VipsOption... args) Perform various boolean operations across the bands of an image.bandfold(VipsOption... args) Fold up an image horizontally: width is collapsed into bands.static VImagebandjoin(Arena arena, List<VImage> in, VipsOption... args) Join a set of images together, bandwise.bandjoinConst(List<Double> c, VipsOption... args) Append a set of constant bands to an image.bandmean(VipsOption... args) This operation writes a one-band image where each pixel is the average of the bands for that pixel in the input image.static VImagebandrank(Arena arena, List<VImage> in, VipsOption... args) Sorts the imagesinband-element-wise, then outputs an image in which each band element is selected from the sorted list by theindexparameter.bandunfold(VipsOption... args) Unfold image bands into x axis.static VImageblack(Arena arena, int width, int height, VipsOption... args) Make a black unsigned char image of a specified size.boolean1(VImage right, VipsOperationBoolean boolean1, VipsOption... args) Perform various boolean operations on pairs of images.booleanConst(VipsOperationBoolean boolean1, List<Double> c, VipsOption... args) Perform various boolean operations on an image against an array of constants.buildlut(VipsOption... args) This operation builds a lookup table from a set of points.byteswap(VipsOption... args) Swap the byte order in an image.canny(VipsOption... args) Find edges by Canny's method: The maximum of the derivative of the gradient in the direction of the gradient.case1(List<VImage> cases, VipsOption... args) Use values inindexto select pixels fromcases.cast(VipsBandFormat format, VipsOption... args) Convertintoformat.clamp(VipsOption... args) This operation clamps pixel values to a range, by default 0 - 1.CMC2LCh(VipsOption... args) Turn LCh to CMC.CMYK2XYZ(VipsOption... args) Turn CMYK to XYZ.colourspace(VipsInterpretation space, VipsOption... args) This operation looks at the interpretation field ofin(or usessource_space, if set) and runs a set of colourspace conversion functions to move it tospace.compass(VImage mask, VipsOption... args) This convolvesinwithmasktimestimes, rotatingmaskbyangleeach time.complex(VipsOperationComplex cmplx, VipsOption... args) Perform various operations on complex images.complex2(VImage right, VipsOperationComplex2 cmplx, VipsOption... args) Perform various binary operations on complex images.complexform(VImage right, VipsOption... args) Compose two real images to make a complex image.complexget(VipsOperationComplexget get, VipsOption... args) Get components of complex images.static VImageComposite an array of images together.composite2(VImage overlay, VipsBlendMode mode, VipsOption... args) Compositeoverlayon top ofbasewithmode.conv(VImage mask, VipsOption... args) Perform a convolution ofinwithmask.conva(VImage mask, VipsOption... args) Perform an approximate integer convolution ofinwithmask.convasep(VImage mask, VipsOption... args) Approximate separable integer convolution.convf(VImage mask, VipsOption... args) Convolution.convi(VImage mask, VipsOption... args) Integer convolution.convsep(VImage mask, VipsOption... args) Perform a separable convolution ofinwithmask.copy(VipsOption... args) Copy an image, optionally modifying the header.doublecountlines(VipsDirection direction, VipsOption... args) Function which calculates the number of transitions between black and white for the horizontal or the vertical direction of an image.static VImagecsvload(Arena arena, String filename, VipsOption... args) Load a CSV (comma-separated values) file.static VImagecsvloadSource(Arena arena, VSource source, VipsOption... args) Exactly ascsvload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.voidcsvsave(String filename, VipsOption... args) Writes the pixels ininto thefilenameas CSV (comma-separated values).voidcsvsaveTarget(VTarget target, VipsOption... args) Ascsvsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.dE00(VImage right, VipsOption... args) Calculate dE 00.dE76(VImage right, VipsOption... args) Calculate dE 76.dECMC(VImage right, VipsOption... args) Calculate dE CMC.doubledeviate(VipsOption... args) This operation finds the standard deviation of all pixels inin.divide(VImage right, VipsOption... args) This operation calculatesin1/in2and writes the result toout.voiddrawCircle(List<Double> ink, int cx, int cy, int radius, VipsOption... args) Draws a circle onimage.voiddrawFlood(List<Double> ink, int x, int y, VipsOption... args) Flood-fillimagewithink, starting at positionx,y.voiddrawImage(VImage sub, int x, int y, VipsOption... args) Drawsubon top ofimageat positionx,y.voiddrawLine(List<Double> ink, int x1, int y1, int x2, int y2, VipsOption... args) Draws a 1-pixel-wide line on an image.voiddrawMask(List<Double> ink, VImage mask, int x, int y, VipsOption... args) Drawmaskon the image.voiddrawRect(List<Double> ink, int left, int top, int width, int height, VipsOption... args) Paint pixels withinleft,top,width,heightinimagewithink.voiddrawSmudge(int left, int top, int width, int height, VipsOption... args) Smudge a section ofimage.voiddzsave(String filename, VipsOption... args) Save an image as a set of tiles at various resolutions.dzsaveBuffer(VipsOption... args) Asdzsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.voiddzsaveTarget(VTarget target, VipsOption... args) Asdzsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.embed(int x, int y, int width, int height, VipsOption... args) The opposite ofextractArea(int, int, int, int, app.photofox.vipsffm.VipsOption...): embedinwithin an image of sizewidthbyheightat positionx,y.booleanextractArea(int left, int top, int width, int height, VipsOption... args) Extract an area from an image.extractBand(int band, VipsOption... args) Extract a band or bands from an image.static VImageeye(Arena arena, int width, int height, VipsOption... args) Create a test pattern with increasing spatial frequency in X and amplitude in Y.falsecolour(VipsOption... args) Forceinto 1 band, 8-bit, then transform to a 3-band 8-bit image with a false colour map.fastcor(VImage ref, VipsOption... args) Calculate a fast correlation surface.fillNearest(VipsOption... args) Fill outwards from every non-zero pixel inin, setting pixels indistanceandvalue.findTrim(VipsOption... args) Searchinfor the bounding box of the non-background area.static VImagefitsload(Arena arena, String filename, VipsOption... args) Read a FITS image file into a VIPS image.static VImagefitsloadSource(Arena arena, VSource source, VipsOption... args) Exactly asfitsload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.voidfitssave(String filename, VipsOption... args) Write a VIPS image to a file in FITS format.flatten(VipsOption... args) Take the last band ofinas an alpha and use it to blend the remaining channels withbackground.flip(VipsDirection direction, VipsOption... args) Flips an image left-right or up-down.float2rad(VipsOption... args) Convert a three-band float image to Radiance 32-bit packed format.static VImagefractsurf(Arena arena, int width, int height, double fractalDimension, VipsOption... args) Generate an image of sizewidthbyheightand fractal dimensionfractal_dimension.freqmult(VImage mask, VipsOption... args) Multiplyinbymaskin Fourier space.fwfft(VipsOption... args) Transform an image to Fourier space.gamma(VipsOption... args) Calculatein** (1 /exponent), normalising to the maximum range of the input type.gaussblur(double sigma, VipsOption... args) This operator runsgaussmat(java.lang.foreign.Arena, double, double, app.photofox.vipsffm.VipsOption...)andconvsep(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)for you on an image.static VImagegaussmat(Arena arena, double sigma, double minAmpl, VipsOption... args) Creates a circularly symmetric Gaussian image of radiussigma.static VImagegaussnoise(Arena arena, int width, int height, VipsOption... args) Make a one band float image of gaussian noise with the specified distribution.Helper function to get the metadata stored atnameon this image, of typeblob, ornullif not presentHelper function to get the metadata stored atnameon this image, of typedouble, ornullif not presentReturns a list of all metadata entry names for this imageintHelper function to get the metadata stored atnameon this image, of typeimage, ornullif not presentHelper function to get the metadata stored atnameon this image, of typeint, ornullif not presentgetpoint(int x, int y, VipsOption... args) Reads a single pixel on an image.Helper function to get the metadata stored atnameon this image, of typestring, ornullif not presentGets the rawMemorySegment(C pointer) for this VipsImage structintgetWidth()static VImagegifload(Arena arena, String filename, VipsOption... args) Read a GIF file into a libvips image.static VImagegifloadBuffer(Arena arena, VBlob buffer, VipsOption... args) Exactly asgifload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a memory buffer.static VImagegifloadSource(Arena arena, VSource source, VipsOption... args) Exactly asgifload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.voidgifsave(String filename, VipsOption... args) Write to a file in GIF format.gifsaveBuffer(VipsOption... args) Asgifsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.voidgifsaveTarget(VTarget target, VipsOption... args) Asgifsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.globalbalance(VipsOption... args) globalbalance(app.photofox.vipsffm.VipsOption...)can be used to remove contrast differences in an assembled mosaic.gravity(VipsCompassDirection direction, int width, int height, VipsOption... args) The opposite ofextractArea(int, int, int, int, app.photofox.vipsffm.VipsOption...): placeinwithin an image of sizewidthbyheightat a certain gravity.static VImagegrey(Arena arena, int width, int height, VipsOption... args) Create a one-band float image with the left-most column zero and the right-most 1.grid(int tileHeight, int across, int down, VipsOption... args) Chop a tall thin image up into a set of tiles, lay the tiles out in a grid.booleanhasAlpha()inthashCode()static VImageheifload(Arena arena, String filename, VipsOption... args) Read a HEIF image file into a VIPS image.static VImageheifloadBuffer(Arena arena, VBlob buffer, VipsOption... args) Read a HEIF image file into a VIPS image.static VImageheifloadSource(Arena arena, VSource source, VipsOption... args) Exactly asheifload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.voidheifsave(String filename, VipsOption... args) Write a VIPS image to a file in HEIF format.heifsaveBuffer(VipsOption... args) Asheifsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.voidheifsaveTarget(VTarget target, VipsOption... args) Asheifsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.histCum(VipsOption... args) Form cumulative histogram.doublehistEntropy(VipsOption... args) Estimate image entropy from a histogram.histEqual(VipsOption... args) Histogram-equalisein.histFind(VipsOption... args) Find the histogram ofin.histFindIndexed(VImage index, VipsOption... args) Make a histogram ofin, but use imageindexto pick the bins.histFindNdim(VipsOption... args) Make a one, two or three dimensional histogram of a 1, 2 or 3 band image.booleanhistIsmonotonic(VipsOption... args) Testinfor monotonicity.histLocal(int width, int height, VipsOption... args) Performs local histogram equalisation oninusing a window of sizewidthbyheightcentered on the input pixel.histMatch(VImage ref, VipsOption... args) Adjustinto matchref.histNorm(VipsOption... args) Normalise histogram.histPlot(VipsOption... args) Plot a 1 by any or any by 1 image file as a max by any or any by max image using these rules:houghCircle(VipsOption... args) Find the circular Hough transform of an image.houghLine(VipsOption... args) Find the line Hough transform forin.HSV2sRGB(VipsOption... args) Convert HSV to sRGB.iccExport(VipsOption... args) Export an image from D65 LAB to device space with an ICC profile.iccImport(VipsOption... args) Import an image from device space to D65 LAB with an ICC profile.iccTransform(String outputProfile, VipsOption... args) Transform an image with a pair of ICC profiles.static VImageidentity(Arena arena, VipsOption... args) Creates an identity lookup table, ie.ifthenelse(VImage in1, VImage in2, VipsOption... args) This operation scans the condition imagecondand uses it to select pixels from either the then imagein1or the else imagein2.insert(VImage sub, int x, int y, VipsOption... args) Insertsubintomainat positionx,y.invert(VipsOption... args) For unsigned formats, this operation calculates (max -in), eg.invertlut(VipsOption... args) Given a mask of target values and real values, generate a LUT which will map reals to targets.invfft(VipsOption... args) Transform an image from Fourier space to real space.join(VImage in2, VipsDirection direction, VipsOption... args) Joinin1andin2together, left-right or up-down depending on the value ofdirection.static VImagejp2kload(Arena arena, String filename, VipsOption... args) Read a JPEG2000 image.static VImagejp2kloadBuffer(Arena arena, VBlob buffer, VipsOption... args) Exactly asjp2kload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a buffer.static VImagejp2kloadSource(Arena arena, VSource source, VipsOption... args) Exactly asjp2kload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.voidjp2ksave(String filename, VipsOption... args) Write a VIPS image to a file in JPEG2000 format.jp2ksaveBuffer(VipsOption... args) Asjp2ksave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.voidjp2ksaveTarget(VTarget target, VipsOption... args) Asjp2ksave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.static VImagejpegload(Arena arena, String filename, VipsOption... args) Read a JPEG file into a VIPS image.static VImagejpegloadBuffer(Arena arena, VBlob buffer, VipsOption... args) Read a JPEG-formatted memory block into a VIPS image.static VImagejpegloadSource(Arena arena, VSource source, VipsOption... args) Read a JPEG-formatted memory block into a VIPS image.voidjpegsave(String filename, VipsOption... args) Write a VIPS image to a file as JPEG.jpegsaveBuffer(VipsOption... args) Asjpegsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.voidjpegsaveMime(VipsOption... args) Asjpegsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save as a mime jpeg on stdout.voidjpegsaveTarget(VTarget target, VipsOption... args) Asjpegsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.static VImagejxlload(Arena arena, String filename, VipsOption... args) Read a JPEG-XL image.static VImagejxlloadBuffer(Arena arena, VBlob buffer, VipsOption... args) Exactly asjxlload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a buffer.static VImagejxlloadSource(Arena arena, VSource source, VipsOption... args) Exactly asjxlload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.voidjxlsave(String filename, VipsOption... args) Write a VIPS image to a file in JPEG-XL format.jxlsaveBuffer(VipsOption... args) Asjxlsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.voidjxlsaveTarget(VTarget target, VipsOption... args) Asjxlsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.Lab2LabQ(VipsOption... args) Convert a Lab three-band float image to LabQ (VipsCoding.CODING_LABQ).Lab2LabS(VipsOption... args) Turn Lab to LabS, signed 16-bit int fixed point.Lab2LCh(VipsOption... args) Turn Lab to LCh.Lab2XYZ(VipsOption... args) Turn Lab to XYZ.labelregions(VipsOption... args) Label regions of equal pixels in an image.LabQ2Lab(VipsOption... args) Unpack a LabQ (VipsCoding.CODING_LABQ) image to a three-band float image.LabQ2LabS(VipsOption... args) Unpack a LabQ (VipsCoding.CODING_LABQ) image to a three-band short image.LabQ2sRGB(VipsOption... args) Unpack a LabQ (VipsCoding.CODING_LABQ) image to a three-band short image.LabS2Lab(VipsOption... args) Convert a LabS three-band signed short image to a three-band float image.LabS2LabQ(VipsOption... args) Convert a LabS three-band signed short image to LabQLCh2CMC(VipsOption... args) Turn LCh to CMC.LCh2Lab(VipsOption... args) Turn LCh to Lab.Pass an image through a linear transform, ie.linecache(VipsOption... args) This operation behaves rather likecopy(app.photofox.vipsffm.VipsOption...)between imagesinandout, except that it keeps a cache of computed scanlines.static VImagelogmat(Arena arena, double sigma, double minAmpl, VipsOption... args) Create a circularly symmetric Laplacian of Gaussian mask of radiussigma.static VImagemagickload(Arena arena, String filename, VipsOption... args) Read in an image using libMagick, the ImageMagick library.static VImagemagickloadBuffer(Arena arena, VBlob buffer, VipsOption... args) Read an image memory block using libMagick into a VIPS image.voidmagicksave(String filename, VipsOption... args) Write an image using libMagick.magicksaveBuffer(VipsOption... args) Asmagicksave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.mapim(VImage index, VipsOption... args) This operator resamplesinusingindexto look up pixels.maplut(VImage lut, VipsOption... args) Map an image through another image acting as a LUT (Look Up Table).static VImagemaskButterworth(Arena arena, int width, int height, double order, double frequencyCutoff, double amplitudeCutoff, VipsOption... args) Make an butterworth high- or low-pass filter, that is, one with a variable, smooth transition positioned atfrequency_cutoff, wherefrequency_cutoffis in range 0 - 1.static VImagemaskButterworthBand(Arena arena, int width, int height, double order, double frequencyCutoffX, double frequencyCutoffY, double radius, double amplitudeCutoff, VipsOption... args) Make an butterworth band-pass or band-reject filter, that is, one with a variable, smooth transition positioned atfrequency_cutoff_x,frequency_cutoff_y, of radiusradius.static VImagemaskButterworthRing(Arena arena, int width, int height, double order, double frequencyCutoff, double amplitudeCutoff, double ringwidth, VipsOption... args) Make a butterworth ring-pass or ring-reject filter, that is, one with a variable, smooth transition positioned atfrequency_cutoffof widthwidth, wherefrequency_cutoffis in the range 0 - 1.static VImagemaskFractal(Arena arena, int width, int height, double fractalDimension, VipsOption... args) This operation should be used to create fractal images by filtering the power spectrum of Gaussian white noise.static VImagemaskGaussian(Arena arena, int width, int height, double frequencyCutoff, double amplitudeCutoff, VipsOption... args) Make a gaussian high- or low-pass filter, that is, one with a variable, smooth transition positioned atfrequency_cutoff.static VImagemaskGaussianBand(Arena arena, int width, int height, double frequencyCutoffX, double frequencyCutoffY, double radius, double amplitudeCutoff, VipsOption... args) Make a gaussian band-pass or band-reject filter, that is, one with a variable, smooth transition positioned atfrequency_cutoff_x,frequency_cutoff_y, of radiusradius.static VImagemaskGaussianRing(Arena arena, int width, int height, double frequencyCutoff, double amplitudeCutoff, double ringwidth, VipsOption... args) Make a gaussian ring-pass or ring-reject filter, that is, one with a variable, smooth transition positioned atfrequency_cutoffof widthringwidth.static VImagemaskIdeal(Arena arena, int width, int height, double frequencyCutoff, VipsOption... args) Make an ideal high- or low-pass filter, that is, one with a sharp cutoff positioned atfrequency_cutoff, wherefrequency_cutoffis in the range 0 - 1.static VImagemaskIdealBand(Arena arena, int width, int height, double frequencyCutoffX, double frequencyCutoffY, double radius, VipsOption... args) Make an ideal band-pass or band-reject filter, that is, one with a sharp cutoff around the pointfrequency_cutoff_x,frequency_cutoff_y, of sizeradius.static VImagemaskIdealRing(Arena arena, int width, int height, double frequencyCutoff, double ringwidth, VipsOption... args) Make an ideal ring-pass or ring-reject filter, that is, one with a sharp ring positioned atfrequency_cutoffof widthwidth, wherefrequency_cutoffandwidthare expressed as the range 0 - 1.match(VImage sec, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, VipsOption... args) Scale, rotate and translatesecso that the tie-points line up.math(VipsOperationMath math, VipsOption... args) Perform various functions in -lm, the maths library, on images.math2(VImage right, VipsOperationMath2 math2, VipsOption... args) This operation calculates a 2-ary maths operation on a pair of images and writes the result toout.math2Const(VipsOperationMath2 math2, List<Double> c, VipsOption... args) This operation calculates various 2-ary maths operations on an image and an array of constants and writes the result toout.static VImagematload(Arena arena, String filename, VipsOption... args) Read a Matlab save file into a VIPS image.matrixinvert(VipsOption... args) This operation calculates the inverse of the matrix represented inm.static VImagematrixload(Arena arena, String filename, VipsOption... args) Reads a matrix from a file.static VImagematrixloadSource(Arena arena, VSource source, VipsOption... args) Exactly asmatrixload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.matrixmultiply(VImage right, VipsOption... args) Multiplies two matrix images.voidmatrixprint(VipsOption... args) Printinto %stdout in matrix format.voidmatrixsave(String filename, VipsOption... args) Writeintofilenamein matrix format.voidmatrixsaveTarget(VTarget target, VipsOption... args) Asmatrixsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.doublemax(VipsOption... args) This operation finds the maximum value in an image.maxpair(VImage right, VipsOption... args) For each pixel, pick the maximum of a pair of images.measure(int h, int v, VipsOption... args) Analyse a grid of colour patches, producing an array of patch averages.merge(VImage sec, VipsDirection direction, int dx, int dy, VipsOption... args) This operation joins two images left-right (withrefon the left) or up-down (withrefabove) with a smooth seam.doublemin(VipsOption... args) This operation finds the minimum value in an image.minpair(VImage right, VipsOption... args) For each pixel, pick the minimum of a pair of images.morph(VImage mask, VipsOperationMorphology morph, VipsOption... args) Performs a morphological operation oninusingmaskas a structuring element.mosaic(VImage sec, VipsDirection direction, int xref, int yref, int xsec, int ysec, VipsOption... args) This operation joins two images left-right (withrefon the left) or top-bottom (withrefabove) given an approximate overlap.mosaic1(VImage sec, VipsDirection direction, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, VipsOption... args) This operation joins two images top-bottom (withsecon the right) or left-right (withsecat the bottom) given an approximate pair of tie-points.msb(VipsOption... args) Turn any integer image to 8-bit unsigned char by discarding all but the most significant byte.multiply(VImage right, VipsOption... args) This operation calculatesleft*rightand writes the result toout.static VImagenewFromBytes(Arena arena, byte[] bytes, VipsOption... options) static VImagenewFromBytes(Arena arena, byte[] bytes, String optionString, VipsOption... options) Creates a new VImage from raw bytes.static VImagenewFromFile(Arena arena, String path, VipsOption... options) static VImagenewFromMemory(Arena arena, MemorySegment memorySegment, int width, int height, int bands, int format) Creates a new VImage from raw bytes, mapping directly to thevips_image_new_from_memoryfunction, with some checks.static VImagenewFromSource(Arena arena, VSource source, VipsOption... options) static VImagenewFromSource(Arena arena, VSource source, String optionString, VipsOption... options) static VImagenewFromStream(Arena arena, InputStream stream, VipsOption... options) static VImagenewFromStream(Arena arena, InputStream stream, String optionString, VipsOption... options) Creates a new VImage from anInputStream.static VImagestatic VImageopenexrload(Arena arena, String filename, VipsOption... args) Read a OpenEXR file into a VIPS image.static VImageopenslideload(Arena arena, String filename, VipsOption... args) Read a virtual slide supported by the OpenSlide library into a VIPS image.static VImageopenslideloadSource(Arena arena, VSource source, VipsOption... args) Exactly asopenslideload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.static VImagepdfload(Arena arena, String filename, VipsOption... args) Render a PDF file into a VIPS image.static VImagepdfloadBuffer(Arena arena, VBlob buffer, VipsOption... args) Read a PDF-formatted memory buffer into a VIPS image.static VImagepdfloadSource(Arena arena, VSource source, VipsOption... args) Exactly aspdfload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.intpercent(double percent, VipsOption... args) percent(double, app.photofox.vipsffm.VipsOption...)returns (through thethresholdparameter) the threshold below which there arepercentvalues ofin.static VImageperlin(Arena arena, int width, int height, VipsOption... args) Create a one-band float image of Perlin noise.phasecor(VImage in2, VipsOption... args) Convert the two input images to Fourier space, calculate phase-correlation, back to real space.static VImagepngload(Arena arena, String filename, VipsOption... args) Read a PNG file into a VIPS image.static VImagepngloadBuffer(Arena arena, VBlob buffer, VipsOption... args) Exactly aspngload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a PNG-formatted memory block.static VImagepngloadSource(Arena arena, VSource source, VipsOption... args) Exactly aspngload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.voidpngsave(String filename, VipsOption... args) Write a VIPS image to a file as PNG.pngsaveBuffer(VipsOption... args) Aspngsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.voidpngsaveTarget(VTarget target, VipsOption... args) Aspngsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.static VImageppmload(Arena arena, String filename, VipsOption... args) Read a PPM/PBM/PGM/PFM file into a VIPS image.static VImageppmloadBuffer(Arena arena, VBlob buffer, VipsOption... args) Exactly asppmload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a memory source.static VImageppmloadSource(Arena arena, VSource source, VipsOption... args) Exactly asppmload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.voidppmsave(String filename, VipsOption... args) Write a VIPS image to a file as PPM.voidppmsaveTarget(VTarget target, VipsOption... args) Asppmsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.premultiply(VipsOption... args) Premultiplies any alpha channel.prewitt(VipsOption... args) Prewitt edge detector.profile(VipsOption... args) profile(app.photofox.vipsffm.VipsOption...)searches inward from the edge ofinand finds the first non-zero pixel.project(VipsOption... args) Find the horizontal and vertical projections of an image, ie.quadratic(VImage coeff, VipsOption... args) Transform an image with a 0, 1, 2, or 3rd order polynomial.rad2float(VipsOption... args) Unpack a RAD (VipsCoding.CODING_RAD) image to a three-band float image.static VImageradload(Arena arena, String filename, VipsOption... args) Read a Radiance (HDR) file into a VIPS image.static VImageradloadBuffer(Arena arena, VBlob buffer, VipsOption... args) Exactly asradload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a HDR-formatted memory block.static VImageradloadSource(Arena arena, VSource source, VipsOption... args) Exactly asradload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.voidradsave(String filename, VipsOption... args) Write a VIPS image in Radiance (HDR) format.radsaveBuffer(VipsOption... args) Asradsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.voidradsaveTarget(VTarget target, VipsOption... args) Asradsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.rank(int width, int height, int index, VipsOption... args) rank(int, int, int, app.photofox.vipsffm.VipsOption...)does rank filtering on an image.static VImagerawload(Arena arena, String filename, int width, int height, int bands, VipsOption... args) This operation mmaps the file, setting upoutso that access to that image will read from the file.voidrawsave(String filename, VipsOption... args) Writes the pixels ininto the filefilenamewith no header or other metadata.rawsaveBuffer(VipsOption... args) Asrawsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.voidrawsaveTarget(VTarget target, VipsOption... args) Asrawsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.recomb(VImage m, VipsOption... args) This operation recombines an image's bands.reduce(double xshrink, double hshrink, double yshrink, double vshrink, VipsOption... args) Reduceinby a pair of factors with a pair of 1D kernels.reduceh(double xshrink, double hshrink, VipsOption... args) Reduceinhorizontally by a float factor.reducev(double yshrink, double vshrink, VipsOption... args) Reduceinvertically by a float factor.relational(VImage right, VipsOperationRelational relational, VipsOption... args) Perform various relational operations on pairs of images.relationalConst(VipsOperationRelational relational, List<Double> c, VipsOption... args) Perform various relational operations on an image and an array of constants.remainder(VImage right, VipsOption... args) This operation calculatesleft%right(remainder after integer division) and writes the result toout.remainderConst(List<Double> c, VipsOption... args) This operation calculatesin%c(remainder after division by an array of constants) and writes the result toout.remosaic(String oldStr, String newStr, VipsOption... args) booleanHelper function to remove the metadata stored atnameon this imagereplicate(int across, int down, VipsOption... args) Repeats an image many times.resize(double scale, VipsOption... args) Resize an image.rot(VipsAngle angle, VipsOption... args) Rotateinby a multiple of 90 degrees.rot45(VipsOption... args) Rotateinby a multiple of 45 degrees.rotate(double angle, VipsOption... args) This operator callsaffine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)for you, calculating the matrix for the affine transform fromscaleandangle.round(VipsOperationRound round, VipsOption... args) Round to an integral value.scale(VipsOption... args) Search the image for the maximum and minimum value, then return the image as unsigned 8-bit, scaled so that the maximum value is 255 and the minimum is zero.scharr(VipsOption... args) Scharr edge detector.scRGB2BW(VipsOption... args) Convert an scRGB image to greyscale.scRGB2sRGB(VipsOption... args) Convert an scRGB image to sRGB.scRGB2XYZ(VipsOption... args) Turn XYZ to scRGB.static VImagesdf(Arena arena, int width, int height, VipsSdfShape shape, VipsOption... args) Create a signed distance field (SDF) image of the givenshape.sequential(VipsOption... args) This operation behaves rather likecopy(app.photofox.vipsffm.VipsOption...)between imagesinandout, except that it checks that pixels oninare only requested top-to-bottom.Helper function to set the metadata stored atnameon this image, of typeblobHelper function to set the metadata stored atnameon this image, of typeimageHelper function to set the metadata stored atnameon this image, of typedoubleHelper function to set the metadata stored atnameon this image, of typeintHelper function to set the metadata stored atnameon this image, of typestringsharpen(VipsOption... args) Selectively sharpen the L channel of a LAB image.shrink(double xshrink, double hshrink, double yshrink, double vshrink, VipsOption... args) Shrinkinby a pair of factors with a simple box filter.shrinkh(int xshrink, int hshrink, VipsOption... args) Shrinkinhorizontally by an integer factor.shrinkv(int yshrink, int vshrink, VipsOption... args) Shrinkinvertically by an integer factor.sign(VipsOption... args) Finds the unit vector in the direction of the pixel value.similarity(VipsOption... args) This operator callsaffine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)for you, calculating the matrix for the affine transform fromscaleandangle.static VImagesines(Arena arena, int width, int height, VipsOption... args) Creates a float one band image of the a sine waveform in two dimensions.smartcrop(int width, int height, VipsOption... args) Crop an image down to a specified width and height by removing boring parts.sobel(VipsOption... args) Sobel edge detector.spcor(VImage ref, VipsOption... args) Calculate a correlation surface.spectrum(VipsOption... args) Make a displayable (ie. 8-bit unsigned int) power spectrum.sRGB2HSV(VipsOption... args) Convert to HSV.sRGB2scRGB(VipsOption... args) Convert an sRGB image to scRGB.stats(VipsOption... args) Find many image statistics in a single pass through the data.stdif(int width, int height, VipsOption... args) stdif(int, int, app.photofox.vipsffm.VipsOption...)performs statistical differencing according to the formula given in page 45 of the book "An Introduction to Digital Image Processing" by Wayne Niblack.subsample(int xfac, int yfac, VipsOption... args) Subsample an image by an integer fraction.subtract(VImage right, VipsOption... args) This operation calculatesin1-in2and writes the result toout.static VImagesum(Arena arena, List<VImage> in, VipsOption... args) This operation sums all images ininand writes the result toout.static VImagesvgload(Arena arena, String filename, VipsOption... args) Render a SVG file into a VIPS image.static VImagesvgloadBuffer(Arena arena, VBlob buffer, VipsOption... args) Read a SVG-formatted memory block into a VIPS image.static VImagesvgloadSource(Arena arena, VSource source, VipsOption... args) Exactly assvgload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.static VImageswitch1(Arena arena, List<VImage> tests, VipsOption... args) Thetestsimages are evaluated and at each point the index of the first non-zero value is written toout.static VImagetext(Arena arena, String text, VipsOption... args) Draw the stringtextto an image.static VImagethumbnail(Arena arena, String filename, int width, VipsOption... args) Make a thumbnail from a file.static VImagethumbnailBuffer(Arena arena, VBlob buffer, int width, VipsOption... args) Exactly asthumbnail(java.lang.foreign.Arena, java.lang.String, int, app.photofox.vipsffm.VipsOption...), but read from a memory buffer.thumbnailImage(int width, VipsOption... args) Exactly asthumbnail(java.lang.foreign.Arena, java.lang.String, int, app.photofox.vipsffm.VipsOption...), but read from an existing image.static VImagethumbnailSource(Arena arena, VSource source, int width, VipsOption... args) Exactly asthumbnail(java.lang.foreign.Arena, java.lang.String, int, app.photofox.vipsffm.VipsOption...), but read from a source.static VImagetiffload(Arena arena, String filename, VipsOption... args) Read a TIFF file into a VIPS image.static VImagetiffloadBuffer(Arena arena, VBlob buffer, VipsOption... args) Read a TIFF-formatted memory block into a VIPS image.static VImagetiffloadSource(Arena arena, VSource source, VipsOption... args) Exactly astiffload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.voidtiffsave(String filename, VipsOption... args) Write a VIPS image to a file as TIFF.tiffsaveBuffer(VipsOption... args) Astiffsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.voidtiffsaveTarget(VTarget target, VipsOption... args) Astiffsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.tilecache(VipsOption... args) This operation behaves rather likecopy(app.photofox.vipsffm.VipsOption...)between imagesinandout, except that it keeps a cache of computed pixels.static VImagetonelut(Arena arena, VipsOption... args) tonelut(java.lang.foreign.Arena, app.photofox.vipsffm.VipsOption...)generates a tone curve for the adjustment of image levels.transpose3d(VipsOption... args) Transpose a volumetric image.unpremultiply(VipsOption... args) Unpremultiplies any alpha channel.static VImagevipsload(Arena arena, String filename, VipsOption... args) Read in a vips image.static VImagevipsloadSource(Arena arena, VSource source, VipsOption... args) Exactly asvipsload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.voidvipssave(String filename, VipsOption... args) Writeintofilenamein VIPS format.voidvipssaveTarget(VTarget target, VipsOption... args) Asvipssave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.static VImagewebpload(Arena arena, String filename, VipsOption... args) Read a WebP file into a VIPS image.static VImagewebploadBuffer(Arena arena, VBlob buffer, VipsOption... args) Read a WebP-formatted memory block into a VIPS image.static VImagewebploadSource(Arena arena, VSource source, VipsOption... args) Exactly aswebpload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.voidwebpsave(String filename, VipsOption... args) Write an image to a file in WebP format.webpsaveBuffer(VipsOption... args) Aswebpsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.voidwebpsaveMime(VipsOption... args) Aswebpsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save as a mime webp on stdout.voidwebpsaveTarget(VTarget target, VipsOption... args) Aswebpsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.static VImageworley(Arena arena, int width, int height, VipsOption... args) Create a one-band float image of Worley noise.wrap(VipsOption... args) Slice an image up and move the segments about so that the pixel that was at 0, 0 is now atx,y.voidwriteToFile(String path, VipsOption... options) Writes this VImage's raw pixel values to aMemorySegment, in the following pixel order: RGBRGBRGB etc.voidwriteToStream(OutputStream stream, String suffix, VipsOption... options) Writes this VImage to anOutputStream.voidwriteToTarget(VTarget target, String suffix, VipsOption... options) static VImagexyz(Arena arena, int width, int height, VipsOption... args) Create a two-band uint32 image where the elements in the first band have the value of their x coordinate and elements in the second band have their y coordinate.XYZ2CMYK(VipsOption... args) Turn XYZ to CMYK.XYZ2Lab(VipsOption... args) Turn XYZ to Lab, optionally specifying the colour temperature.XYZ2scRGB(VipsOption... args) Turn XYZ to scRGB.XYZ2Yxy(VipsOption... args) Turn XYZ to Yxy.Yxy2XYZ(VipsOption... args) Turn XYZ to Yxy.static VImagezone(Arena arena, int width, int height, VipsOption... args) Create a one-band image of a zone plate.zoom(int xfac, int yfac, VipsOption... args) Zoom an image by repeating pixels.
-
Method Details
-
hashCode
-
equals
-
getUnsafeStructAddress
Gets the raw
MemorySegment(C pointer) for this VipsImage structThe memory address' lifetime is bound to the scope of the
arenaUsage of the memory address is strongly discouraged, but it is available if some functionality is missing and you need to use it with
VipsHelper -
CMC2LCh
Turn LCh to CMC.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
CMYK2XYZ
Turn CMYK to XYZ. If the image has an embedded ICC profile this will be used for the conversion. If there is no embedded profile, a generic fallback profile will be used.
Conversion is to D65 XYZ with relative intent. If you need more control over the process, use
iccImport(app.photofox.vipsffm.VipsOption...)instead.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
HSV2sRGB
Convert HSV to sRGB.
HSV is a crude polar coordinate system for RGB images. It is provided for compatibility with other image processing systems. See
Lab2LCh(app.photofox.vipsffm.VipsOption...)for a much better colour space.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
LCh2CMC
Turn LCh to CMC.
The CMC colourspace is described in "Uniform Colour Space Based on the CMC(l:c) Colour-difference Formula", M R Luo and B Rigg, Journal of the Society of Dyers and Colourists, vol 102, 1986. Distances in this colourspace approximate, within 10% or so, differences in the CMC(l:c) colour difference formula.
This operation generates CMC(1:1). For CMC(2:1), halve Lucs and double Cucs.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
LCh2Lab
Turn LCh to Lab.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
Lab2LCh
Turn Lab to LCh.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
Lab2LabQ
Convert a Lab three-band float image to LabQ (
VipsCoding.CODING_LABQ).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
Lab2LabS
Turn Lab to LabS, signed 16-bit int fixed point.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
Lab2XYZ
Turn Lab to XYZ. The colour temperature defaults to D65, but can be specified withtemp.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- temp
VipsOption.ArrayDoubleColor temperature
-
LabQ2Lab
Unpack a LabQ (
VipsCoding.CODING_LABQ) image to a three-band float image.See also:
LabQ2Lab(app.photofox.vipsffm.VipsOption...),LabQ2LabS(app.photofox.vipsffm.VipsOption...),rad2float(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
LabQ2LabS
Unpack a LabQ (
VipsCoding.CODING_LABQ) image to a three-band short image.See also:
LabS2LabQ(app.photofox.vipsffm.VipsOption...),LabQ2LabS(app.photofox.vipsffm.VipsOption...),rad2float(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
LabQ2sRGB
Unpack a LabQ (
VipsCoding.CODING_LABQ) image to a three-band short image.See also:
LabS2LabQ(app.photofox.vipsffm.VipsOption...),LabQ2sRGB(app.photofox.vipsffm.VipsOption...),rad2float(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
LabS2Lab
Convert a LabS three-band signed short image to a three-band float image.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
LabS2LabQ
Convert a LabS three-band signed short image to LabQ
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
XYZ2CMYK
Turn XYZ to CMYK.
Conversion is from D65 XYZ with relative intent. If you need more control over the process, use
iccExport(app.photofox.vipsffm.VipsOption...)instead.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
XYZ2Lab
Turn XYZ to Lab, optionally specifying the colour temperature.tempdefaults to D65.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- temp
VipsOption.ArrayDoubleColour temperature
-
XYZ2Yxy
Turn XYZ to Yxy.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
XYZ2scRGB
Turn XYZ to scRGB.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
Yxy2XYZ
Turn XYZ to Yxy.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
abs
This operation finds the absolute value of an image. It does a copy for unsigned integer types, negate for negative values in signed integer types,
fabs()for float types, and calculates modulus for complex types.See also:
sign(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
add
This operation calculates
in1+in2and writes the result toout.If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.
If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.
The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), then the following table is used to determine the output type:
add(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)type promotioninput type output type uchar ushort char short ushort uint short int uint uint int int float float double double complex complex double complex double complex In other words, the output type is just large enough to hold the whole range of possible values.
See also:
subtract(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...),linear(java.util.List<java.lang.Double>, java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)- Parameters:
right- Right-hand image argumentargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
addalpha
Append an alpha channel.
See also:
Image.hasalpha- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
affine
This operator performs an affine transform on an image using
interpolate.The transform is:
X = `a` * (x + `idx`) + `b` * (y + `idy`) + `odx` Y = `c` * (x + `idx`) + `d` * (y + `idy`) + `doy`where:
x and y are the coordinates in input image. X and Y are the coordinates in output image. (0,0) is the upper left corner.The section of the output space defined by
oareais written toout.oareais a four-element int array of left, top, width, height. By defaultoareais just large enough to cover the whole of the transformed input image.By default, new pixels are filled with
background. This defaults to zero (black). You can set other extend types withextend.VipsExtend.EXTEND_COPYis better for image upsizing.interpolatedefaults to bilinear.idx,idy,odx,odydefault to zero.Image are normally treated as unpremultiplied, so this operation can be used directly on PNG images. If your images have been through
premultiply(app.photofox.vipsffm.VipsOption...), setpremultiplied.This operation does not change xres or yres. The image resolution needs to be updated by the application.
See also:
shrink(double, double, double, double, app.photofox.vipsffm.VipsOption...),resize(double, app.photofox.vipsffm.VipsOption...),Interpolate- Parameters:
matrix- Transformation matrixargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- interpolate
VipsOption.InterpolateInterpolate pixels with this, oareaVipsOption.ArrayIntArea of output to generate, odxVipsOption.DoubleHorizontal output displacement, odyVipsOption.DoubleVertical output displacement, idxVipsOption.DoubleHorizontal input displacement, idyVipsOption.DoubleVertical input displacement, backgroundVipsOption.ArrayDoubleBackground value, premultipliedVipsOption.BooleanImages have premultiplied alpha, extendVipsOption.EnumVipsExtendHow to generate the extra pixels
-
analyzeload
Load an Analyze 6.0 file. If
filenameis "fred.img", this will look for an image header called "fred.hdr" and pixel data in "fred.img". You can also load "fred" or "fred.hdr".Images are loaded lazilly and byte-swapped, if necessary. The Analyze metadata is read and attached.
See also:
Image.new_from_file- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- flags
VipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
arrayjoin
Lay out the images in
inin a grid. The grid isacrossimages across and however high is necessary to use up all ofin. Images are set down left-to-right and top-to-bottom.acrossdefaults ton.Each input image is placed with a box of size
hspacingbyvspacingpixels and cropped. These default to the largest width and largest height of the input images.Space between images is filled with
background. This defaults to 0 (black).Images are positioned within their
hspacingbyvspacingbox at low, centre or high coordinate values, controlled byhalignandvalign. These default to left-top.Boxes are joined and separated by
shimpixels. This defaults to 0.If the number of bands in the input images differs, all but one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the n-band images are operated upon.
The input images are cast up to the smallest common type (see table Smallest common format in arithmetic).
colourspace(app.photofox.vipsffm.enums.VipsInterpretation, app.photofox.vipsffm.VipsOption...)can be useful for moving the images to a common colourspace for compositing.See also:
join(app.photofox.vipsffm.VImage, app.photofox.vipsffm.enums.VipsDirection, app.photofox.vipsffm.VipsOption...),insert(app.photofox.vipsffm.VImage, int, int, app.photofox.vipsffm.VipsOption...),colourspace(app.photofox.vipsffm.enums.VipsInterpretation, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationin- Array of input imagesargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- across
VipsOption.IntNumber of images across grid, shimVipsOption.IntPixels between images, backgroundVipsOption.ArrayDoubleColour for new pixels, halignVipsOption.EnumVipsAlignAlign on the left, centre or right, valignVipsOption.EnumVipsAlignAlign on the top, centre or bottom, hspacingVipsOption.IntHorizontal spacing between images, vspacingVipsOption.IntVertical spacing between images
-
autorot
Look at the image metadata and rotate and flip the image to make it upright. The
META_ORIENTATIONtag is removed fromoutto prevent accidental double rotation.Read
angleto find the amount the image was rotated by. Readflipto see if the image was also flipped.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- angle
VipsOption.EnumVipsAngleAngle image was rotated by, flipVipsOption.BooleanWhether the image was flipped or not
-
avg
This operation finds the average value in an image. It operates on all bands of the input image: use
stats(app.photofox.vipsffm.VipsOption...)if you need to calculate an average for each band. For complex images, return the average modulus.See also:
stats(app.photofox.vipsffm.VipsOption...),bandmean(app.photofox.vipsffm.VipsOption...),deviate(app.photofox.vipsffm.VipsOption...),rank(int, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
bandbool
Perform various boolean operations across the bands of an image. For example, a three-band uchar image operated on with
VipsOperationBoolean.OPERATION_BOOLEAN_ANDwill produce a one-band uchar image where each pixel is the bitwise and of the band elements of the corresponding pixel in the input image.The output image is the same format as the input image for integer types. Float types are cast to int before processing. Complex types are not supported.
The output image always has one band.
This operation is useful in conjunction with
relational(app.photofox.vipsffm.VImage, app.photofox.vipsffm.enums.VipsOperationRelational, app.photofox.vipsffm.VipsOption...). You can use it to see if all image bands match exactly.- Parameters:
boolean1-VipsOperationBooleanBoolean to performargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
bandfold
Fold up an image horizontally: width is collapsed into bands. Use
factorto set how much to fold by:factor3, for example, will make the output image three times narrower than the input, and with three times as many bands. By default the whole of the input width is folded up.See also:
csvload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...),bandunfold(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- factor
VipsOption.IntFold by this factor
-
bandjoin
Join a set of images together, bandwise.
If the images have n and m bands, then the output image will have n + m bands, with the first n coming from the first image and the last m from the second.
If the images differ in size, the smaller images are enlarged to match the larger by adding zero pixels along the bottom and right.
The input images are cast up to the smallest common type (see table Smallest common format in arithmetic).
See also:
insert(app.photofox.vipsffm.VImage, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationin- Array of input imagesargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
bandjoinConst
Append a set of constant bands to an image.
- Parameters:
c- Array of constants to addargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
bandmean
This operation writes a one-band image where each pixel is the average of the bands for that pixel in the input image. The output band format is the same as the input band format. Integer types use round-to-nearest averaging.
See also:
add(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...),avg(app.photofox.vipsffm.VipsOption...),recomb(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
bandrank
Sorts the images
inband-element-wise, then outputs an image in which each band element is selected from the sorted list by theindexparameter. For example, ifindexis zero, then each output band element will be the minimum of all the corresponding input band elements.By default,
indexis -1, meaning pick the median value.It works for any uncoded, non-complex image type. Images are cast up to the smallest common-format.
Any image can have either 1 band or n bands, where n is the same for all the non-1-band images. Single band images are then effectively copied to make n-band images.
Smaller input images are expanded by adding black pixels.
See also:
rank(int, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationin- Array of input imagesargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- index
VipsOption.IntSelect this band element from sorted list
-
bandunfold
Unfold image bands into x axis. Use
factorto set how much to unfold by:factor3, for example, will make the output image three times wider than the input, and with one third as many bands. By default, all bands are unfolded.See also:
csvload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...),bandfold(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- factor
VipsOption.IntUnfold by this factor
-
black
Make a black unsigned char image of a specified size.
See also:
xyz(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...),text(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...),gaussnoise(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- bands
VipsOption.IntNumber of bands in image
-
boolean1
public VImage boolean1(VImage right, VipsOperationBoolean boolean1, VipsOption... args) throws VipsError Perform various boolean operations on pairs of images.
The output image is the same format as the upcast input images for integer types. Float types are cast to int before processing. Complex types are not supported.
If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.
If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.
The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic).
- Parameters:
right- Right-hand image argumentboolean1-VipsOperationBooleanBoolean to performargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
booleanConst
public VImage booleanConst(VipsOperationBoolean boolean1, List<Double> c, VipsOption... args) throws VipsError Perform various boolean operations on an image against an array of constants.
The output type is always uchar, with 0 for
FALSEand 255 forTRUE.If the array of constants has just one element, that constant is used for all image bands. If the array has more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element.
See also:
boolean1(app.photofox.vipsffm.VImage, app.photofox.vipsffm.enums.VipsOperationBoolean, app.photofox.vipsffm.VipsOption...),Image.boolean_const1- Parameters:
boolean1-VipsOperationBooleanBoolean to performc- Array of constantsargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
buildlut
This operation builds a lookup table from a set of points. Intermediate values are generated by piecewise linear interpolation. The lookup table is always of type
VipsBandFormat.FORMAT_DOUBLE, usecast(app.photofox.vipsffm.enums.VipsBandFormat, app.photofox.vipsffm.VipsOption...)to change it to the type you need.For example, consider this 2 x 2 matrix of (x, y) coordinates:
2 2 0 0 255 100We then generate a 1 x 256 element LUT like this:
Index Value 0 0 1 0.4 etc. 0.4 255 100 This is then written as the output image, with the left column giving the index in the image to place the value.
The (x, y) points don't need to be sorted: we do that. You can have several Ys, each becomes a band in the output LUT. You don't need to start at zero, any integer will do, including negatives.
See also:
identity(java.lang.foreign.Arena, app.photofox.vipsffm.VipsOption...),invertlut(app.photofox.vipsffm.VipsOption...),cast(app.photofox.vipsffm.enums.VipsBandFormat, app.photofox.vipsffm.VipsOption...),maplut(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
byteswap
Swap the byte order in an image.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
canny
Find edges by Canny's method: The maximum of the derivative of the gradient in the direction of the gradient. Output is float, except for uchar input, where output is uchar, and double input, where output is double. Non-complex images only.
Use
sigmato control the scale over which gradient is measured. 1.4 is usually a good value.Use
precisionto set the precision of edge detection. For uchar images, setting this toVipsPrecision.PRECISION_INTEGERwill make edge detection much faster, but sacrifice some sensitivity.You will probably need to process the output further to eliminate weak edges.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- sigma
VipsOption.DoubleSigma of Gaussian, precisionVipsOption.EnumVipsPrecisionConvolve with this precision
-
case1
Use values in
indexto select pixels fromcases.indexmust have one band.casescan have up to 256 elements. Values inindexgreater than or equal tonuse the final image incases. The images incasesmust have either one band or the same number of bands. The output image is the same size asindex. Images incasesare expanded to the smallest common format and number of bands.Combine this with
switch1(java.lang.foreign.Arena, java.util.List<app.photofox.vipsffm.VImage>, app.photofox.vipsffm.VipsOption...)to make something like a case statement or a multi-wayifthenelse(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...).See also:
maplut(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...),switch1(java.lang.foreign.Arena, java.util.List<app.photofox.vipsffm.VImage>, app.photofox.vipsffm.VipsOption...),ifthenelse(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
cases- Array of case imagesargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
cast
Convert
intoformat. You can convert between any pair of formats. Floats are truncated (not rounded). Out of range values are clipped.Casting from complex to real returns the real part.
If
shiftisTRUE, integer values are shifted up and down. For example, casting from unsigned 8 bit to unsigned 16 bit would shift every value left by 8 bits. The bottom bit is copied into the new bits, so 255 would become 65535.See also:
scale(app.photofox.vipsffm.VipsOption...),complexform(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...),Image.real,Image.imag,Image.cast_uchar,msb(app.photofox.vipsffm.VipsOption...)- Parameters:
format-VipsBandFormatFormat to cast toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- shift
VipsOption.BooleanShift integer values up and down
-
clamp
This operation clamps pixel values to a range, by default 0 - 1.
Use
minandmaxto change the range.See also:
sign(app.photofox.vipsffm.VipsOption...),abs(app.photofox.vipsffm.VipsOption...),sdf(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.enums.VipsSdfShape, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- min
VipsOption.DoubleMinimum value, maxVipsOption.DoubleMaximum value
-
colourspace
This operation looks at the interpretation field of
in(or usessource_space, if set) and runs a set of colourspace conversion functions to move it tospace.For example, given an image tagged as
VipsInterpretation.INTERPRETATION_YXY, runningcolourspace(app.photofox.vipsffm.enums.VipsInterpretation, app.photofox.vipsffm.VipsOption...)withspaceset toVipsInterpretation.INTERPRETATION_LABwill convert withYxy2XYZ(app.photofox.vipsffm.VipsOption...)andXYZ2Lab(app.photofox.vipsffm.VipsOption...).See also:
Image.colourspace_issupported,Image.guess_interpretation- Parameters:
space-VipsInterpretationDestination color spaceargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- source-space
VipsOption.EnumVipsInterpretationSource color space
-
compass
This convolves
inwithmasktimestimes, rotatingmaskbyangleeach time. By default, it comvolves twice, rotating by 90 degrees, taking the maximum result.See also:
conv(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
mask- Input matrix imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- times
VipsOption.IntRotate and convolve this many times, angleVipsOption.EnumVipsAngle45Rotate mask by this much between convolutions, combineVipsOption.EnumVipsCombineCombine convolution results like this, precisionVipsOption.EnumVipsPrecisionConvolve with this precision, layersVipsOption.IntUse this many layers in approximation, clusterVipsOption.IntCluster lines closer than this in approximation
-
complex
Perform various operations on complex images.
Angles are expressed in degrees. The output type is complex unless the input is double or dpcomplex, in which case the output is dpcomplex.
- Parameters:
cmplx-VipsOperationComplexComplex to performargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
complex2
public VImage complex2(VImage right, VipsOperationComplex2 cmplx, VipsOption... args) throws VipsError Perform various binary operations on complex images.
Angles are expressed in degrees. The output type is complex unless the input is double or dpcomplex, in which case the output is dpcomplex.
- Parameters:
right- Right-hand image argumentcmplx-VipsOperationComplex2Binary complex operation to performargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
complexform
Compose two real images to make a complex image. If either
leftorrightareVipsBandFormat.FORMAT_DOUBLE,outisVipsBandFormat.FORMAT_DPCOMPLEX. OtherwiseoutisVipsBandFormat.FORMAT_COMPLEX.leftbecomes the real component ofoutandrightthe imaginary.If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.
See also:
complexget(app.photofox.vipsffm.enums.VipsOperationComplexget, app.photofox.vipsffm.VipsOption...)- Parameters:
right- Right-hand image argumentargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
complexget
Get components of complex images.
The output type is the same as the input type, except
VipsBandFormat.FORMAT_COMPLEXbecomesVipsBandFormat.FORMAT_FLOATandVipsBandFormat.FORMAT_DPCOMPLEXbecomesVipsBandFormat.FORMAT_DOUBLE.- Parameters:
get-VipsOperationComplexgetComplex to performargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
composite
public static VImage composite(Arena arena, List<VImage> in, List<Integer> mode, VipsOption... args) throws VipsError Composite an array of images together.
Images are placed in a stack, with
in[0] at the bottom andin[@n - 1] at the top. Pixels are blended together working from the bottom upwards, with the blend mode at each step being set by the correspondingVipsBlendModeinmode.Images are transformed to a compositing space before processing. This is
VipsInterpretation.INTERPRETATION_sRGB,Vips.Interpretation.B_W,VipsInterpretation.INTERPRETATION_RGB16, orVipsInterpretation.INTERPRETATION_GREY16by default, depending on how many bands and bits the input images have. You can select any other space, such asVipsInterpretation.INTERPRETATION_LABorVipsInterpretation.INTERPRETATION_scRGB.The output image is in the compositing space. It will always be
VipsBandFormat.FORMAT_FLOATunless one of the inputs isVipsBandFormat.FORMAT_DOUBLE, in which case the output will be double as well.Complex images are not supported.
The output image will always have an alpha band. A solid alpha is added to any input missing an alpha.
The images do not need to match in size or format. The output image is always the size of
in[0], with other images being positioned with thexandyparameters and clipped against that rectangle.Image are normally treated as unpremultiplied, so this operation can be used directly on PNG images. If your images have been through
premultiply(app.photofox.vipsffm.VipsOption...), setpremultiplied.See also:
insert(app.photofox.vipsffm.VImage, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationin- Array of input imagesmode- Array of VipsBlendMode to join withargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- x
VipsOption.ArrayIntArray of x coordinates to join at, yVipsOption.ArrayIntArray of y coordinates to join at, compositing-spaceVipsOption.EnumVipsInterpretationComposite images in this colour space, premultipliedVipsOption.BooleanImages have premultiplied alpha
-
composite2
Compositeoverlayon top ofbasewithmode. Seecomposite(java.lang.foreign.Arena, java.util.List<app.photofox.vipsffm.VImage>, java.util.List<java.lang.Integer>, app.photofox.vipsffm.VipsOption...).- Parameters:
overlay- Overlay imagemode-VipsBlendModeVipsBlendMode to join withargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- x
VipsOption.IntX position of overlay, yVipsOption.IntY position of overlay, compositing-spaceVipsOption.EnumVipsInterpretationComposite images in this colour space, premultipliedVipsOption.BooleanImages have premultiplied alpha
-
conv
Perform a convolution of
inwithmask.Each output pixel is calculated as:
sigma[i]{pixel[i] * mask[i]} / scale + offsetwhere scale and offset are part of
mask.By default,
precisionisVipsPrecision.PRECISION_FLOAT. The output image is alwaysVipsBandFormat.FORMAT_FLOATunlessinisVipsBandFormat.FORMAT_DOUBLE, in which caseoutis alsoVipsBandFormat.FORMAT_DOUBLE.If
precisionisVipsPrecision.PRECISION_INTEGER, then elements ofmaskare converted to integers before convolution, usingrint(), and the output image always has the sameVipsBandFormatas the input image.For
VipsBandFormat.FORMAT_UCHARimages andVipsPrecision.PRECISION_INTEGERprecision,conv(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)uses a fast vector path based on half-float arithmetic. This can produce slightly different results. Disable the vector path with--vips-novectororVIPS_NOVECTORorvector_set_enabled.If
precisionisVipsPrecision.PRECISION_APPROXIMATEthen, likeVipsPrecision.PRECISION_INTEGER,maskis converted to int before convolution, and the output image always has the sameVipsBandFormatas the input image.Larger values for
layersgive more accurate results, but are slower. Aslayersapproaches the mask radius, the accuracy will become close to exact convolution and the speed will drop to match. For many large masks, such as Gaussian,n_layersneed be only 10% of this value and accuracy will still be good.Smaller values of
clusterwill give more accurate results, but be slower and use more memory. 10% of the mask radius is a good rule of thumb.See also:
convsep(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
mask- Input matrix imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- precision
VipsOption.EnumVipsPrecisionConvolve with this precision, layersVipsOption.IntUse this many layers in approximation, clusterVipsOption.IntCluster lines closer than this in approximation
-
conva
Perform an approximate integer convolution of
inwithmask. This is a low-level operation, seeconv(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)for something more convenient.The output image always has the same
VipsBandFormatas the input image. Elements ofmaskare converted to integers before convolution.Larger values for
layersgive more accurate results, but are slower. Aslayersapproaches the mask radius, the accuracy will become close to exact convolution and the speed will drop to match. For many large masks, such as Gaussian,layersneed be only 10% of this value and accuracy will still be good.Smaller values of
clusterwill give more accurate results, but be slower and use more memory. 10% of the mask radius is a good rule of thumb.See also:
conv(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
mask- Input matrix imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- layers
VipsOption.IntUse this many layers in approximation, clusterVipsOption.IntCluster lines closer than this in approximation
-
convasep
Approximate separable integer convolution. This is a low-level operation, see
convsep(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)for something more convenient.The image is convolved twice: once with
maskand then again withmaskrotated by 90 degrees.maskmust be 1xn or nx1 elements. Elements ofmaskare converted to integers before convolution.Larger values for
layersgive more accurate results, but are slower. Aslayersapproaches the mask radius, the accuracy will become close to exact convolution and the speed will drop to match. For many large masks, such as Gaussian,layersneed be only 10% of this value and accuracy will still be good.The output image always has the same
VipsBandFormatas the input image.See also:
convsep(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
mask- Input matrix imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- layers
VipsOption.IntUse this many layers in approximation
-
convf
Convolution. This is a low-level operation, see
conv(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)for something more convenient.Perform a convolution of
inwithmask. Each output pixel is calculated as sigma{pixelinvalid reference
i* maskinvalid reference
i} / scale + offset, where scaleinvalid reference
iand offset are part of
mask.The convolution is performed with floating-point arithmetic. The output image is always
VipsBandFormat.FORMAT_FLOATunlessinisVipsBandFormat.FORMAT_DOUBLE, in which caseoutis also.invalid reference
VImage#FORMAT_DOUBLESee also:
invalid reference
VipsBandFormat#conv- Parameters:
mask- Input matrix imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
convi
Integer convolution. This is a low-level operation, see
conv(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)for something more convenient.maskis converted to an integer mask withrint()of each element, rint of scale and rint of offset. Each output pixel is then calculated assigma[i]{pixel[i] * mask[i]} / scale + offsetThe output image always has the same
VipsBandFormatas the input image.For
VipsBandFormat.FORMAT_UCHARimages,convi(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)uses a fast vector path based on half-float arithmetic. This can produce slightly different results. Disable the vector path with--vips-novectororVIPS_NOVECTORorvector_set_enabled.See also:
conv(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
mask- Input matrix imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
convsep
Perform a separable convolution of
inwithmask. Seeconv(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)for a detailed description.The mask must be 1xn or nx1 elements.
The image is convolved twice: once with
maskand then again withmaskrotated by 90 degrees. This is much faster for certain types of mask (gaussian blur, for example) than doing a full 2D convolution.See also:
conv(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...),gaussmat(java.lang.foreign.Arena, double, double, app.photofox.vipsffm.VipsOption...)- Parameters:
mask- Input matrix imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- precision
VipsOption.EnumVipsPrecisionConvolve with this precision, layersVipsOption.IntUse this many layers in approximation, clusterVipsOption.IntCluster lines closer than this in approximation
-
copy
Copy an image, optionally modifying the header. VIPS copies images by copying pointers, so this operation is instant, even for very large images.
You can optionally change any or all header fields during the copy. You can make any change which does not change the size of a pel, so for example you can turn a 4-band uchar image into a 2-band ushort image, but you cannot change a 100 x 100 RGB image into a 300 x 100 mono image.
See also:
byteswap(app.photofox.vipsffm.VipsOption...),bandfold(app.photofox.vipsffm.VipsOption...),bandunfold(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- swap
VipsOption.BooleanSwap bytes in image between little and big-endian, widthVipsOption.IntImage width in pixels, heightVipsOption.IntImage height in pixels, bandsVipsOption.IntNumber of bands in image, formatVipsOption.EnumVipsBandFormatPixel format in image, codingVipsOption.EnumVipsCodingPixel coding, interpretationVipsOption.EnumVipsInterpretationPixel interpretation, xresVipsOption.DoubleHorizontal resolution in pixels/mm, yresVipsOption.DoubleVertical resolution in pixels/mm, xoffsetVipsOption.IntHorizontal offset of origin, yoffsetVipsOption.IntVertical offset of origin
-
countlines
Function which calculates the number of transitions between black and white for the horizontal or the vertical direction of an image. black<128 , white>=128 The function calculates the number of transitions for all Xsize or Ysize and returns the mean of the result Input should be one band, 8-bit.
See also:
morph(app.photofox.vipsffm.VImage, app.photofox.vipsffm.enums.VipsOperationMorphology, app.photofox.vipsffm.VipsOption...),conv(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
direction-VipsDirectionCountlines left-right or up-downargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
csvload
Load a CSV (comma-separated values) file.
The output image is always 1 band (monochrome),
VipsBandFormat.FORMAT_DOUBLE. Usebandfold(app.photofox.vipsffm.VipsOption...)to turn RGBRGBRGB mono images into colour images.Items in lines can be either floating point numbers in the C locale, or strings enclosed in double-quotes ("), or empty. You can use a backslash () within the quotes to escape special characters, such as quote marks.
skipsets the number of lines to skip at the start of the file. Default zero.linessets the number of lines to read from the file. Default -1, meaning read all lines to end of file.whitespacesets the skippable whitespace characters. Default space. Whitespace characters are always run together.separatorsets the characters that separate fields. Default ;,tab. Separators are never run together.Use
fail_onto set the type of error that will cause load to fail. By default, loaders are permissive, that is,VipsFailOn.FAIL_ON_NONE.See also:
Image.new_from_file,bandfold(app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- skip
VipsOption.IntSkip this many lines at the start of the file, linesVipsOption.IntRead this many lines from the file, whitespaceVipsOption.StringSet of whitespace characters, separatorVipsOption.StringSet of separator characters, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
csvloadSource
public static VImage csvloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly as
csvload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
csvload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- skip
VipsOption.IntSkip this many lines at the start of the file, linesVipsOption.IntRead this many lines from the file, whitespaceVipsOption.StringSet of whitespace characters, separatorVipsOption.StringSet of separator characters, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
csvsave
Writes the pixels in
into thefilenameas CSV (comma-separated values).The image is written one line of text per scanline. Complex numbers are written as "(real,imaginary)" and will need extra parsing I guess. Only the first band is written.
separatorgives the string to use to separate numbers in the output. The default is "\t" (tab).See also:
Image.write_to_file- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- separator
VipsOption.StringSeparator characters, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
csvsaveTarget
As
csvsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.See also:
csvsave(java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- separator
VipsOption.StringSeparator characters, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
dE00
Calculate dE 00.- Parameters:
right- Right-hand input imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
dE76
Calculate dE 76.- Parameters:
right- Right-hand input imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
dECMC
Calculate dE CMC. The input images are transformed to CMC colour space and the euclidean distance between corresponding pixels calculated.
To calculate a colour difference with values for (l:c) other than (1:1), transform the two source images to CMC yourself, scale the channels appropriately, and call this function.
See also:
colourspace(app.photofox.vipsffm.enums.VipsInterpretation, app.photofox.vipsffm.VipsOption...)- Parameters:
right- Right-hand input imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
deviate
This operation finds the standard deviation of all pixels in
in. It operates on all bands of the input image: usestats(app.photofox.vipsffm.VipsOption...)if you need to calculate an average for each band.Non-complex images only.
See also:
avg(app.photofox.vipsffm.VipsOption...),stats(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
divide
This operation calculates
in1/in2and writes the result toout. If any pixels inin2are zero, the corresponding pixel inoutis also zero.If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.
If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.
The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), then the following table is used to determine the output type:
divide(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)type promotioninput type output type uchar float char float ushort float short float uint float int float float float double double complex complex double complex double complex In other words, the output type is just large enough to hold the whole range of possible values.
See also:
multiply(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...),linear(java.util.List<java.lang.Double>, java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...),Image.pow- Parameters:
right- Right-hand image argumentargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
drawCircle
public void drawCircle(List<Double> ink, int cx, int cy, int radius, VipsOption... args) throws VipsError Draws a circle on
image.If
fillisTRUEthen the circle is filled, otherwise a 1-pixel-wide perimeter is drawn.inkis an array of double containing values to draw.See also:
Image.draw_circle1,drawLine(java.util.List<java.lang.Double>, int, int, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
ink- Color for pixelscx- Centre of draw_circlecy- Centre of draw_circleradius- Radius in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- fill
VipsOption.BooleanDraw a solid object
-
drawFlood
Flood-fill
imagewithink, starting at positionx,y.The filled area is bounded by pixels that are equal to the ink colour, in other words, it searches for pixels enclosed by an edge of
ink.If
equalis set, it instead searches for pixels which are equal to the start point and fills them withink.Normally it will test and set pixels in
image. Iftestis set, it will test pixels intestand set pixels inimage. This lets you search an image (@test) for continuous areas of pixels without modifying it.left,top,width,heightoutput the bounding box of the modified pixels.inkis an array of double containing values to draw.See also:
Image.draw_flood1- Parameters:
ink- Color for pixelsx- DrawFlood start pointy- DrawFlood start pointargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- test
VipsOption.ImageTest pixels in this image, equalVipsOption.BooleanDrawFlood while equal to edge, leftVipsOption.IntLeft edge of modified area, topVipsOption.IntTop edge of modified area, widthVipsOption.IntWidth of modified area, heightVipsOption.IntHeight of modified area
-
drawImage
Draw
subon top ofimageat positionx,y.The two images must have the same Coding. If
subhas 1 band, the bands will be duplicated to match the number of bands inimage.subwill be converted toimage's format, seecast(app.photofox.vipsffm.enums.VipsBandFormat, app.photofox.vipsffm.VipsOption...).Use
modeto set how pixels are combined. If you useVipsCombineMode.COMBINE_MODE_ADD, both images must be uncoded.See also:
drawMask(java.util.List<java.lang.Double>, app.photofox.vipsffm.VImage, int, int, app.photofox.vipsffm.VipsOption...),insert(app.photofox.vipsffm.VImage, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
sub- Sub-image to insert into main imagex- Draw image herey- Draw image hereargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- mode
VipsOption.EnumVipsCombineModeCombining mode
-
drawLine
public void drawLine(List<Double> ink, int x1, int y1, int x2, int y2, VipsOption... args) throws VipsError Draws a 1-pixel-wide line on an image.
inkis an array of double containing values to draw.See also:
Image.draw_line1,drawCircle(java.util.List<java.lang.Double>, int, int, int, app.photofox.vipsffm.VipsOption...),drawMask(java.util.List<java.lang.Double>, app.photofox.vipsffm.VImage, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
ink- Color for pixelsx1- Start of draw_liney1- Start of draw_linex2- End of draw_liney2- End of draw_lineargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
drawMask
public void drawMask(List<Double> ink, VImage mask, int x, int y, VipsOption... args) throws VipsError Draw
maskon the image.maskis a monochrome 8-bit image with 0/255 for transparent orinkcoloured points. Intermediate values blend the ink with the pixel. Use withtext(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)to draw text on an image. Use in adrawLine(java.util.List<java.lang.Double>, int, int, int, int, app.photofox.vipsffm.VipsOption...)subclass to draw an object along a line.inkis an array of double containing values to draw.See also:
text(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...),drawLine(java.util.List<java.lang.Double>, int, int, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
ink- Color for pixelsmask- Mask of pixels to drawx- Draw mask herey- Draw mask hereargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
drawRect
public void drawRect(List<Double> ink, int left, int top, int width, int height, VipsOption... args) throws VipsError Paint pixels within
left,top,width,heightinimagewithink.If
fillis zero, just paint a 1-pixel-wide outline.See also:
drawCircle(java.util.List<java.lang.Double>, int, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
ink- Color for pixelsleft- Rect to filltop- Rect to fillwidth- Rect to fillheight- Rect to fillargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- fill
VipsOption.BooleanDraw a solid object
-
drawSmudge
public void drawSmudge(int left, int top, int width, int height, VipsOption... args) throws VipsError Smudge a section of
image. Each pixel in the arealeft,top,width,heightis replaced by the average of the surrounding 3x3 pixels.See also:
drawLine(java.util.List<java.lang.Double>, int, int, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
left- Rect to filltop- Rect to fillwidth- Rect to fillheight- Rect to fillargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
dzsave
Save an image as a set of tiles at various resolutions. By default dzsave uses DeepZoom layout -- use
layoutto pick other conventions.dzsave(java.lang.String, app.photofox.vipsffm.VipsOption...)creates a directory callednameto hold the tiles. Ifnameends.zip,dzsave(java.lang.String, app.photofox.vipsffm.VipsOption...)will create a zip file callednameto hold the tiles. You can usecontainerto force zip file output.Use
basenameto set the name of the image we are creating. The default value is set fromname.By default, tiles are written as JPEGs. Use
Qset set the JPEG quality factor.You can set
suffixto something like".png[bitdepth=4]"to write tiles in another format.In Google layout mode, edge tiles are expanded to
tile_sizebytile_sizepixels. Normally they are filled with white, but you can set another colour withbackground. Images are usually placed at the top-left of the tile, but you can have them centred by turning oncentre.You can set the size and overlap of tiles with
tile_sizeandoverlap. They default to the correct settings for the selectedlayout. The deepzoom defaults produce 256x256 jpeg files for centre tiles, the most efficient size.Use
depthto control how low the pyramid goes. This defaults to the correct setting for thelayoutyou select.You can rotate the image during write with the
angleargument. However, this will only work for images which support random access, like openslide, and not for things like JPEG. You'll need to rotate those images yourself withrot(app.photofox.vipsffm.enums.VipsAngle, app.photofox.vipsffm.VipsOption...). Note that theautorotateoption to the loader may do what you need.By default, all tiles are stripped since usually you do not want a copy of all metadata in every tile. Set
keepif you want to keep metadata.If
containeris set tozip, you can set a compression level from -1 (use zlib default), 0 (store, compression disabled) to 9 (max compression). If no value is given, the default is to store files without compression.You can use
region_shrinkto control the method for shrinking each 2x2 region. This defaults to using the average of the 4 input pixels but you can also use the median in cases where you want to preserve the range of values.If you set
skip_blanksto a value greater than or equal to zero, tiles which are all within that many pixel values to the background are skipped. This can save a lot of space for some image types. This option defaults to 5 in Google layout mode, -1 otherwise.In IIIF layout, you can set the base of the
idproperty ininfo.jsonwithid. The default ishttps://example.com/iiif.Use
layoutVipsForeignDzLayout.FOREIGN_DZ_LAYOUT_IIIF3for IIIF v3 layout.See also:
tiffsave(java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- dirname
VipsOption.StringDirectory name to save to, imagenameVipsOption.StringImage name, layoutVipsOption.EnumVipsForeignDzLayoutDirectory layout, suffixVipsOption.StringFilename suffix for tiles, overlapVipsOption.IntTile overlap in pixels, tile-sizeVipsOption.IntTile size in pixels, tile-heightVipsOption.IntTile height in pixels, tile-widthVipsOption.IntTile width in pixels, centreVipsOption.BooleanCenter image in tile, depthVipsOption.EnumVipsForeignDzDepthPyramid depth, angleVipsOption.EnumVipsAngleRotate image during save, containerVipsOption.EnumVipsForeignDzContainerPyramid container type, propertiesVipsOption.BooleanWrite a properties file to the output directory, compressionVipsOption.IntZIP deflate compression level, region-shrinkVipsOption.EnumVipsRegionShrinkMethod to shrink regions, skip-blanksVipsOption.IntSkip tiles which are nearly equal to the background, idVipsOption.StringResource ID, QVipsOption.IntQ factor, no-stripVipsOption.BooleanDon't strip tile metadata, basenameVipsOption.StringBase name to save to, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
dzsaveBuffer
As
dzsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.Output is always in a zip container. Use
basenameto set the name of the directory that the zip will create when unzipped.The address of the buffer is returned in
buf, the length of the buffer inlen. You are responsible for freeing the buffer withGLib.freewhen you are done with it.See also:
dzsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_file- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- dirname
VipsOption.StringDirectory name to save to, imagenameVipsOption.StringImage name, layoutVipsOption.EnumVipsForeignDzLayoutDirectory layout, suffixVipsOption.StringFilename suffix for tiles, overlapVipsOption.IntTile overlap in pixels, tile-sizeVipsOption.IntTile size in pixels, tile-heightVipsOption.IntTile height in pixels, tile-widthVipsOption.IntTile width in pixels, centreVipsOption.BooleanCenter image in tile, depthVipsOption.EnumVipsForeignDzDepthPyramid depth, angleVipsOption.EnumVipsAngleRotate image during save, containerVipsOption.EnumVipsForeignDzContainerPyramid container type, propertiesVipsOption.BooleanWrite a properties file to the output directory, compressionVipsOption.IntZIP deflate compression level, region-shrinkVipsOption.EnumVipsRegionShrinkMethod to shrink regions, skip-blanksVipsOption.IntSkip tiles which are nearly equal to the background, idVipsOption.StringResource ID, QVipsOption.IntQ factor, no-stripVipsOption.BooleanDon't strip tile metadata, basenameVipsOption.StringBase name to save to, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
dzsaveTarget
As
dzsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.See also:
dzsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_target- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- dirname
VipsOption.StringDirectory name to save to, imagenameVipsOption.StringImage name, layoutVipsOption.EnumVipsForeignDzLayoutDirectory layout, suffixVipsOption.StringFilename suffix for tiles, overlapVipsOption.IntTile overlap in pixels, tile-sizeVipsOption.IntTile size in pixels, tile-heightVipsOption.IntTile height in pixels, tile-widthVipsOption.IntTile width in pixels, centreVipsOption.BooleanCenter image in tile, depthVipsOption.EnumVipsForeignDzDepthPyramid depth, angleVipsOption.EnumVipsAngleRotate image during save, containerVipsOption.EnumVipsForeignDzContainerPyramid container type, propertiesVipsOption.BooleanWrite a properties file to the output directory, compressionVipsOption.IntZIP deflate compression level, region-shrinkVipsOption.EnumVipsRegionShrinkMethod to shrink regions, skip-blanksVipsOption.IntSkip tiles which are nearly equal to the background, idVipsOption.StringResource ID, QVipsOption.IntQ factor, no-stripVipsOption.BooleanDon't strip tile metadata, basenameVipsOption.StringBase name to save to, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
embed
The opposite of
extractArea(int, int, int, int, app.photofox.vipsffm.VipsOption...): embedinwithin an image of sizewidthbyheightat positionx,y.extendcontrols what appears in the new pels, seeVipsExtend.See also:
extractArea(int, int, int, int, app.photofox.vipsffm.VipsOption...),insert(app.photofox.vipsffm.VImage, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
x- Left edge of input in outputy- Top edge of input in outputwidth- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- extend
VipsOption.EnumVipsExtendHow to generate the extra pixels, backgroundVipsOption.ArrayDoubleColor for background pixels
-
extractArea
public VImage extractArea(int left, int top, int width, int height, VipsOption... args) throws VipsError Extract an area from an image. The area must fit within
in.See also:
extractBand(int, app.photofox.vipsffm.VipsOption...),smartcrop(int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
left- Left edge of extract areatop- Top edge of extract areawidth- Width of extract areaheight- Height of extract areaargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
extractBand
Extract a band or bands from an image. Extracting out of range is an error.
ndefaults to 1.See also:
extractArea(int, int, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
band- Band to extractargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- n
VipsOption.IntNumber of bands to extract
-
eye
Create a test pattern with increasing spatial frequency in X and amplitude in Y.
factorshould be between 0 and 1 and determines the maximum spatial frequency.Set
ucharto output a uchar image.See also:
zone(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- uchar
VipsOption.BooleanOutput an unsigned char image, factorVipsOption.DoubleMaximum spatial frequency
-
falsecolour
Force
into 1 band, 8-bit, then transform to a 3-band 8-bit image with a false colour map. The map is supposed to make small differences in brightness more obvious.See also:
maplut(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
fastcor
Calculate a fast correlation surface.
refis placed at every position ininand the sum of squares of differences calculated.The output image is the same size as the input. Extra input edge pixels are made by copying the existing edges outwards.
If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.
The output type is uint if both inputs are integer, float if both are float or complex, and double if either is double or double complex. In other words, the output type is just large enough to hold the whole range of possible values.
See also:
spcor(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
ref- Input reference imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
fillNearest
Fill outwards from every non-zero pixel in
in, setting pixels indistanceandvalue.At the position of zero pixels in
in,distancecontains the distance to the nearest non-zero pixel inin, andvaluecontains the value of that pixel.distanceis a one-band float image.valuehas the same number of bands and format asin.See also:
histFindIndexed(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- distance
VipsOption.ImageDistance to nearest non-zero pixel
-
findTrim
Search
infor the bounding box of the non-background area.Any alpha is flattened out, then the image is median-filtered (unless
line_artis set, see below). The absolute difference frombackgroundis computed and binarized according tothreshold. Row and column sums of the absolute difference are calculated from this binary image and searched for the first row or column in each direction to obtain the bounding box.If the image is entirely background,
findTrim(app.photofox.vipsffm.VipsOption...)returnswidth== 0 andheight== 0.backgrounddefaults to 255, or 65535 for 16-bit images. Set another value, or usegetpoint(int, int, app.photofox.vipsffm.VipsOption...)to pick a value from an edge. You'll need to flatten beforegetpoint(int, int, app.photofox.vipsffm.VipsOption...)to get a correct background value.thresholddefaults to 10.The detector is designed for photographic or compressed images where there is a degree of noise that needs filtering. If your images are synthetic (eg. rendered from vector art, perhaps), set
line_artto disable this filtering.The image needs to be at least 3x3 pixels in size.
See also:
getpoint(int, int, app.photofox.vipsffm.VipsOption...),extractArea(int, int, int, int, app.photofox.vipsffm.VipsOption...),smartcrop(int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- threshold
VipsOption.DoubleObject threshold, backgroundVipsOption.ArrayDoubleColor for background pixels, line-artVipsOption.BooleanEnable line art mode
-
fitsload
Read a FITS image file into a VIPS image.
This operation can read images with up to three dimensions. Any higher dimensions must be empty.
It can read 8, 16 and 32-bit integer images, signed and unsigned, float and double.
FITS metadata is attached with the "fits-" prefix.
See also:
Image.new_from_file- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- flags
VipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
fitsloadSource
public static VImage fitsloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly asfitsload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- flags
VipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
fitssave
Write a VIPS image to a file in FITS format.
See also:
Image.write_to_file- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- keep
VipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
flatten
Take the last band of
inas an alpha and use it to blend the remaining channels withbackground.The alpha channel is 0 -
max_alpha, wheremax_alphameans 100% image and 0 means 100% background.backgrounddefaults to zero (black).max_alphahas the default value 255, or 65535 for images tagged asVipsInterpretation.INTERPRETATION_RGB16orVipsInterpretation.INTERPRETATION_GREY16.Useful for flattening PNG images to RGB.
Non-complex images only.
See also:
premultiply(app.photofox.vipsffm.VipsOption...),pngload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- background
VipsOption.ArrayDoubleBackground value, max-alphaVipsOption.DoubleMaximum value of alpha channel
-
flip
Flips an image left-right or up-down.
See also:
rot(app.photofox.vipsffm.enums.VipsAngle, app.photofox.vipsffm.VipsOption...)- Parameters:
direction-VipsDirectionDirection to flip imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
float2rad
Convert a three-band float image to Radiance 32-bit packed format.
See also:
rad2float(app.photofox.vipsffm.VipsOption...),VipsCoding.CODING_RAD,LabQ2Lab(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
fractsurf
public static VImage fractsurf(Arena arena, int width, int height, double fractalDimension, VipsOption... args) throws VipsError Generate an image of size
widthbyheightand fractal dimensionfractal_dimension. The dimension should be between 2 and 3.See also:
gaussnoise(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...),maskFractal(java.lang.foreign.Arena, int, int, double, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsfractalDimension- Fractal dimensionargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
freqmult
Multiply
inbymaskin Fourier space.inis transformed to Fourier space, multiplied withmask, then transformed back to real space. Ifinis already a complex image, just multiply then inverse transform.See also:
invfft(app.photofox.vipsffm.VipsOption...),maskIdeal(java.lang.foreign.Arena, int, int, double, app.photofox.vipsffm.VipsOption...)- Parameters:
mask- Input mask imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
fwfft
Transform an image to Fourier space.
VIPS uses the fftw Fourier Transform library. If this library was not available when VIPS was configured, these functions will fail.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
gamma
Calculate
in** (1 /exponent), normalising to the maximum range of the input type. For float types use 1.0 as the maximum.See also:
identity(java.lang.foreign.Arena, app.photofox.vipsffm.VipsOption...),Image.pow_const1,maplut(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- exponent
VipsOption.DoubleGamma factor
-
gaussblur
This operator runs
gaussmat(java.lang.foreign.Arena, double, double, app.photofox.vipsffm.VipsOption...)andconvsep(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)for you on an image.Set
min_amplsmaller to generate a larger, more accurate mask. Setsigmalarger to make the blur more blurry.See also:
gaussmat(java.lang.foreign.Arena, double, double, app.photofox.vipsffm.VipsOption...),convsep(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
sigma- Sigma of Gaussianargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- min-ampl
VipsOption.DoubleMinimum amplitude of Gaussian, precisionVipsOption.EnumVipsPrecisionConvolve with this precision
-
gaussmat
public static VImage gaussmat(Arena arena, double sigma, double minAmpl, VipsOption... args) throws VipsError Creates a circularly symmetric Gaussian image of radius
sigma.The size of the mask is determined by the variable
min_ampl; if for instance the value .1 is entered this means that the produced mask is clipped at values less than 10 percent of the maximum amplitude.The program uses the following equation:
H(r) = exp(-(r * r) / (2 * `sigma` * `sigma`))The generated image has odd size and its maximum value is normalised to 1.0, unless
precisionisVipsPrecision.PRECISION_INTEGER.If
separableis set, only the centre horizontal is generated. This is useful for separable convolutions.If
precisionisVipsPrecision.PRECISION_INTEGER, an integer gaussian is generated. This is useful for integer convolutions."scale" is set to the sum of all the mask elements.
See also:
logmat(java.lang.foreign.Arena, double, double, app.photofox.vipsffm.VipsOption...),conv(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsigma- Sigma of GaussianminAmpl- Minimum amplitude of Gaussianargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- separable
VipsOption.BooleanGenerate separable Gaussian, integerVipsOption.BooleanGenerate integer Gaussian, precisionVipsOption.EnumVipsPrecisionGenerate with this precision
-
gaussnoise
public static VImage gaussnoise(Arena arena, int width, int height, VipsOption... args) throws VipsError Make a one band float image of gaussian noise with the specified distribution.
The gaussian distribution is created by averaging 12 random numbers from a linear generator, then weighting appropriately with
meanandsigma.See also:
black(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...),xyz(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...),text(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- sigma
VipsOption.DoubleStandard deviation of pixels in generated image, meanVipsOption.DoubleMean of pixels in generated image, seedVipsOption.IntRandom number seed
-
getpoint
Reads a single pixel on an image.
The pixel values are returned in
vector, the length of the array inn. You must free the array withGLib.freewhen you are done with it.The result array has an element for each band. If
unpack_complexis set, pixels in complex images are returned as double-length arrays.See also:
Image.draw_point- Parameters:
x- Point to ready- Point to readargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- unpack-complex
VipsOption.BooleanComplex pixels should be unpacked
-
gifload
Read a GIF file into a libvips image.
Use
pageto select a page to render, numbering from zero.Use
nto select the number of pages to render. The default is 1. Pages are rendered in a vertical column. Set to -1 to mean "until the end of the document". Usegrid(int, int, int, app.photofox.vipsffm.VipsOption...)to change page layout.Use
fail_onto set the type of error that will cause load to fail. By default, loaders are permissive, that is,VipsFailOn.FAIL_ON_NONE.The output image is RGBA for GIFs containing transparent elements, RGB otherwise.
See also:
Image.new_from_file- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- n
VipsOption.IntNumber of pages to load, -1 for all, pageVipsOption.IntFirst page to load, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
gifloadBuffer
Exactly as
gifload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a memory buffer.You must not free the buffer while
outis active. TheObject::postclosesignal onoutis a good place to free.See also:
gifload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationbuffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- n
VipsOption.IntNumber of pages to load, -1 for all, pageVipsOption.IntFirst page to load, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
gifloadSource
public static VImage gifloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly as
gifload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
gifload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- n
VipsOption.IntNumber of pages to load, -1 for all, pageVipsOption.IntFirst page to load, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
gifsave
Write to a file in GIF format.
Use
ditherto set the degree of Floyd-Steinberg dithering andeffortto control the CPU effort (1 is the fastest, 10 is the slowest, 7 is the default).Use
bitdepth(from 1 to 8, default 8) to control the number of colours in the palette. The first entry in the palette is always reserved for transparency. For example, a bitdepth of 4 will allow the output to contain up to 15 colours.Use
interframe_maxerrorto set the threshold below which pixels are considered equal. Pixels which don't change from frame to frame can be made transparent, improving the compression rate. Default 0.Use
interpalette_maxerrorto set the threshold below which the previously generated palette will be reused.If
reuseisTRUE, the GIF will be saved with a single global palette taken from the metadata inin, and no new palette optimisation will be done.If
interlaceisTRUE, the GIF file will be interlaced (progressive GIF). These files may be better for display over a slow network connection, but need more memory to encode.If
keep_duplicate_framesisTRUE, duplicate frames in the input will be kept in the output instead of combining them.See also:
Image.new_from_file- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- dither
VipsOption.DoubleAmount of dithering, effortVipsOption.IntQuantisation effort, bitdepthVipsOption.IntNumber of bits per pixel, interframe-maxerrorVipsOption.DoubleMaximum inter-frame error for transparency, reuseVipsOption.BooleanReuse palette from input, interpalette-maxerrorVipsOption.DoubleMaximum inter-palette error for palette reusage, interlaceVipsOption.BooleanGenerate an interlaced (progressive) GIF, reoptimiseVipsOption.BooleanReoptimise colour palettes, keep-duplicate-framesVipsOption.BooleanKeep duplicate frames in the output instead of combining them, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
gifsaveBuffer
As
gifsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.The address of the buffer is returned in
buf, the length of the buffer inlen. You are responsible for freeing the buffer withGLib.freewhen you are done with it.See also:
gifsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_file- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- dither
VipsOption.DoubleAmount of dithering, effortVipsOption.IntQuantisation effort, bitdepthVipsOption.IntNumber of bits per pixel, interframe-maxerrorVipsOption.DoubleMaximum inter-frame error for transparency, reuseVipsOption.BooleanReuse palette from input, interpalette-maxerrorVipsOption.DoubleMaximum inter-palette error for palette reusage, interlaceVipsOption.BooleanGenerate an interlaced (progressive) GIF, reoptimiseVipsOption.BooleanReoptimise colour palettes, keep-duplicate-framesVipsOption.BooleanKeep duplicate frames in the output instead of combining them, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
gifsaveTarget
As
gifsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.See also:
gifsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_target- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- dither
VipsOption.DoubleAmount of dithering, effortVipsOption.IntQuantisation effort, bitdepthVipsOption.IntNumber of bits per pixel, interframe-maxerrorVipsOption.DoubleMaximum inter-frame error for transparency, reuseVipsOption.BooleanReuse palette from input, interpalette-maxerrorVipsOption.DoubleMaximum inter-palette error for palette reusage, interlaceVipsOption.BooleanGenerate an interlaced (progressive) GIF, reoptimiseVipsOption.BooleanReoptimise colour palettes, keep-duplicate-framesVipsOption.BooleanKeep duplicate frames in the output instead of combining them, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
globalbalance
globalbalance(app.photofox.vipsffm.VipsOption...)can be used to remove contrast differences in an assembled mosaic.It reads the History field attached to
inand builds a list of the source images that were used to make the mosaic and the position that each ended up at in the final image.It opens each of the source images in turn and extracts all parts which overlap with any of the other images. It finds the average values in the overlap areas and uses least-mean-square to find a set of correction factors which will minimise overlap differences. It uses
gammato gamma-correct the source images before calculating the factors. A value of 1.0 will stop this.Each of the source images is transformed with the appropriate correction factor, then the mosaic is reassembled.
outisVipsBandFormat.FORMAT_FLOAT, but ifint_outputis set, the output image is the same format as the input images.There are some conditions that must be met before this operation can work: the source images must all be present under the filenames recorded in the history on
in, and the mosaic must have been built using only operations in this package.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- gamma
VipsOption.DoubleImage gamma, int-outputVipsOption.BooleanInteger output
-
gravity
public VImage gravity(VipsCompassDirection direction, int width, int height, VipsOption... args) throws VipsError The opposite of
extractArea(int, int, int, int, app.photofox.vipsffm.VipsOption...): placeinwithin an image of sizewidthbyheightat a certain gravity.extendcontrols what appears in the new pels, seeVImage.See also:
extractArea(int, int, int, int, app.photofox.vipsffm.VipsOption...),invalid reference
VipsExtend#insert- Parameters:
direction-VipsCompassDirectionDirection to place image within width/heightwidth- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- extend
VipsOption.EnumVipsExtendHow to generate the extra pixels, backgroundVipsOption.ArrayDoubleColor for background pixels
-
grey
Create a one-band float image with the left-most column zero and the right-most 1.
Intermediate pixels are a linear ramp.
Set
ucharto output a uchar image with the leftmost pixel 0 and the rightmost 255.See also:
xyz(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...),identity(java.lang.foreign.Arena, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- uchar
VipsOption.BooleanOutput an unsigned char image
-
grid
Chop a tall thin image up into a set of tiles, lay the tiles out in a grid.
The input image should be a very tall, thin image containing a list of smaller images. Volumetric or time-sequence images are often laid out like this. This image is chopped into a series of tiles, each
tile_heightpixels high and the width ofin. The tiles are then rearranged into a gridacrosstiles across anddowntiles down in row-major order.Supplying
tile_height,acrossanddownis not strictly necessary, we only really need two of these. Requiring three is a double-check that the image has the expected geometry.See also:
embed(int, int, int, int, app.photofox.vipsffm.VipsOption...),insert(app.photofox.vipsffm.VImage, int, int, app.photofox.vipsffm.VipsOption...),join(app.photofox.vipsffm.VImage, app.photofox.vipsffm.enums.VipsDirection, app.photofox.vipsffm.VipsOption...)- Parameters:
tileHeight- Chop into tiles this highacross- Number of tiles acrossdown- Number of tiles downargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
heifload
Read a HEIF image file into a VIPS image.
Use
pageto select a page to render, numbering from zero. If neithernnorpageare set,pagedefaults to the primary page, otherwise to 0.Use
nto select the number of pages to render. The default is 1. Pages are rendered in a vertical column. Set to -1 to mean "until the end of the document". Usegrid(int, int, int, app.photofox.vipsffm.VipsOption...)to reorganise pages.HEIF images have a primary image. The metadata item
heif-primarygives the page number of the primary.If
thumbnailisTRUE, then fetch a stored thumbnail rather than the image.By default, input image dimensions are limited to 16384x16384. If
unlimitedisTRUE, this increases to the maximum of 65535x65535.The bitdepth of the heic image is recorded in the metadata item
heif-bitdepth.See also:
Image.new_from_file- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, thumbnailVipsOption.BooleanFetch thumbnail image, autorotateVipsOption.BooleanRotate image using exif orientation, unlimitedVipsOption.BooleanRemove all denial of service limits, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
heifloadBuffer
Read a HEIF image file into a VIPS image. Exactly as
heifload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a memory buffer.You must not free the buffer while
outis active. TheObject::postclosesignal onoutis a good place to free.See also:
heifload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationbuffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, thumbnailVipsOption.BooleanFetch thumbnail image, autorotateVipsOption.BooleanRotate image using exif orientation, unlimitedVipsOption.BooleanRemove all denial of service limits, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
heifloadSource
public static VImage heifloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly as
heifload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
heifload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, thumbnailVipsOption.BooleanFetch thumbnail image, autorotateVipsOption.BooleanRotate image using exif orientation, unlimitedVipsOption.BooleanRemove all denial of service limits, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
heifsave
Write a VIPS image to a file in HEIF format.
Use
Qto set the compression factor. Default 50, which seems to be roughly what the iphone uses. Q 30 gives about the same quality as JPEG Q 75.Set
losslessTRUEto switch to lossless compression.Use
compressionto set the compression format e.g. HEVC, AVC, AV1 to use. It defaults to AV1 if the target filename ends with ".avif", otherwise HEVC.Use
effortto control the CPU effort spent improving compression. This is currently only applicable to AV1 encoders. Defaults to 4, 0 is fastest, 9 is slowest.Chroma subsampling is normally automatically disabled for Q >= 90. You can force the subsampling mode with
subsample_mode.Use
bitdepthto set the bitdepth of the output file. HEIC supports at least 8, 10 and 12 bits; other codecs may support more or fewer options.Use
encoderto set the encode library to use, e.g. aom, SVT-AV1, rav1e etc.See also:
Image.write_to_file,heifload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- Q
VipsOption.IntQ factor, bitdepthVipsOption.IntNumber of bits per pixel, losslessVipsOption.BooleanEnable lossless compression, compressionVipsOption.EnumVipsForeignHeifCompressionCompression format, effortVipsOption.IntCPU effort, subsample-modeVipsOption.EnumVipsForeignSubsampleSelect chroma subsample operation mode, speedVipsOption.IntCPU effort, encoderVipsOption.EnumVipsForeignHeifEncoderSelect encoder to use, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
heifsaveBuffer
As
heifsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.The address of the buffer is returned in
obuf, the length of the buffer inolen. You are responsible for freeing the buffer withGLib.freewhen you are done with it.See also:
heifsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_file- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- Q
VipsOption.IntQ factor, bitdepthVipsOption.IntNumber of bits per pixel, losslessVipsOption.BooleanEnable lossless compression, compressionVipsOption.EnumVipsForeignHeifCompressionCompression format, effortVipsOption.IntCPU effort, subsample-modeVipsOption.EnumVipsForeignSubsampleSelect chroma subsample operation mode, speedVipsOption.IntCPU effort, encoderVipsOption.EnumVipsForeignHeifEncoderSelect encoder to use, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
heifsaveTarget
As
heifsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.See also:
heifsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_target- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- Q
VipsOption.IntQ factor, bitdepthVipsOption.IntNumber of bits per pixel, losslessVipsOption.BooleanEnable lossless compression, compressionVipsOption.EnumVipsForeignHeifCompressionCompression format, effortVipsOption.IntCPU effort, subsample-modeVipsOption.EnumVipsForeignSubsampleSelect chroma subsample operation mode, speedVipsOption.IntCPU effort, encoderVipsOption.EnumVipsForeignHeifEncoderSelect encoder to use, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
histCum
Form cumulative histogram.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
histEntropy
Estimate image entropy from a histogram. Entropy is calculated as:
-sum(p * log2(p))where p is histogram-value / sum-of-histogram-values.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
histEqual
Histogram-equalise
in.Equalise using band
bandno, or ifbandnois -1, equalise bands independently. The output format is always the same as the input format.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- band
VipsOption.IntEqualise with this band
-
histFind
Find the histogram of
in. Find the histogram for bandband(producing a one-band histogram), or for all bands (producing an n-band histogram) ifbandis -1.char and uchar images are cast to uchar before histogramming, all other image types are cast to ushort.
See also:
histFindNdim(app.photofox.vipsffm.VipsOption...),histFindIndexed(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- band
VipsOption.IntFind histogram of band
-
histFindIndexed
Make a histogram of
in, but use imageindexto pick the bins. In other words, element zero inoutcontains the combination of all the pixels ininwhose corresponding pixel inindexis zero.char and uchar
indeximages are cast to uchar before histogramming, all other image types are cast to ushort.indexmust have just one band.inmust be non-complex.outalways has the same size and format asin.Normally, bins are summed, but you can use
combineto set other combine modes.This operation is useful in conjunction with
labelregions(app.photofox.vipsffm.VipsOption...). You can use it to find the centre of gravity of blobs in an image, for example.See also:
histFind(app.photofox.vipsffm.VipsOption...),labelregions(app.photofox.vipsffm.VipsOption...)- Parameters:
index- Index imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- combine
VipsOption.EnumVipsCombineCombine bins like this
-
histFindNdim
Make a one, two or three dimensional histogram of a 1, 2 or 3 band image. Divide each axis into
binsbins .. ie. output is 1 x bins, bins x bins, or bins x bins x bins bands.binsdefaults to 10.char and uchar images are cast to uchar before histogramming, all other image types are cast to ushort.
See also:
histFind(app.photofox.vipsffm.VipsOption...),histFindIndexed(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- bins
VipsOption.IntNumber of bins in each dimension
-
histIsmonotonic
Testinfor monotonicity.outis set non-zero ifinis monotonic.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
histLocal
Performs local histogram equalisation on
inusing a window of sizewidthbyheightcentered on the input pixel.The output image is the same size as the input image. The edge pixels are created by mirroring the input image outwards.
If
max_slopeis greater than 0, it sets the maximum value for the slope of the cumulative histogram, that is, the maximum brightening that is performed. A value of 3 is often used. Local histogram equalization with contrast limiting is usually called CLAHE.- Parameters:
width- Window width in pixelsheight- Window height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- max-slope
VipsOption.IntMaximum slope (CLAHE)
-
histMatch
Adjust
into matchref. Ifinandrefare normalised cumulative histograms,outwill be a LUT that adjusts the PDF of the image from whichinwas made to match the PDF ofref's image.See also:
maplut(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...),histFind(app.photofox.vipsffm.VipsOption...),histNorm(app.photofox.vipsffm.VipsOption...),histCum(app.photofox.vipsffm.VipsOption...)- Parameters:
ref- Reference histogramargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
histNorm
Normalise histogram. The maximum of each band becomes equal to the maximum index, so for example the max for a uchar image becomes 255. Normalise each band separately.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
histPlot
Plot a 1 by any or any by 1 image file as a max by any or any by max image using these rules:
unsigned char max is always 256
other unsigned integer types output 0 - maximum value of
in.signed int types min moved to 0, max moved to max + min.
float types min moved to 0, max moved to any (square output)
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
houghCircle
Find the circular Hough transform of an image.
inmust be one band, with non-zero pixels for image edges.outis three-band, with the third channel representing the detected circle radius. The operation scales the number of votes by circle circumference so circles of differing size are given equal weight.The output pixel at (x, y, band) is the strength of the circle centred on (x, y) and with radius (band).
Use
max_radiusandmin_radiusto set the range of radii to search for.Use
scaleto set howincoordinates are scaled tooutcoordinates. Ascaleof 3, for example, will makeout1/3rd of the width and height ofin, and reduce the number of radii tested (and hence the number of bands intout) by a factor of three as well.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- scale
VipsOption.IntScale down dimensions by this factor, min-radiusVipsOption.IntSmallest radius to search for, max-radiusVipsOption.IntLargest radius to search for
-
houghLine
Find the line Hough transform for
in.inmust have one band.outhas one band, with pixels being the number of votes for that line. The X dimension ofoutis the line angle in 0 - 180 degrees, the Y dimension is the distance of the closest part of that line to the origin in the top-left.Use
widthheightto set the size of the parameter space image (@out), that is, how accurate the line determination should be.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- width
VipsOption.IntHorizontal size of parameter space, heightVipsOption.IntVertical size of parameter space
-
iccExport
Export an image from D65 LAB to device space with an ICC profile.
If
pcsis set toVipsPCS.PCS_XYZ, use CIE XYZ PCS instead. Ifoutput_profileis not set, use the embedded profile, if any. Ifoutput_profileis set, export with that and attach it to the output image.If
black_point_compensationis set, LCMS black point compensation is enabled.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- pcs
VipsOption.EnumVipsPCSSet Profile Connection Space, intentVipsOption.EnumVipsIntentRendering intent, black-point-compensationVipsOption.BooleanEnable black point compensation, output-profileVipsOption.StringFilename to load output profile from, depthVipsOption.IntOutput device space depth in bits
-
iccImport
Import an image from device space to D65 LAB with an ICC profile.
If
pcsis set toVipsPCS.PCS_XYZ, use CIE XYZ PCS instead.The input profile is searched for in three places:
-
If
embeddedis set, libvips will try to use any profile in the input image metadata. You can test for the presence of an embedded profile withImage.get_typeofwithMETA_ICC_NAMEas an argument. This will returnGObject.Type0 if there is no profile. -
Otherwise, if
input_profileis set, libvips will try to load a profile from the named file. This can also be the name of one of the built-in profiles. -
Otherwise, libvips will try to pick a compatible profile from the set of built-in profiles.
If
black_point_compensationis set, LCMS black point compensation is enabled.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- pcs
VipsOption.EnumVipsPCSSet Profile Connection Space, intentVipsOption.EnumVipsIntentRendering intent, black-point-compensationVipsOption.BooleanEnable black point compensation, embeddedVipsOption.BooleanUse embedded input profile, if available, input-profileVipsOption.StringFilename to load input profile from
-
-
iccTransform
Transform an image with a pair of ICC profiles.
The input image is moved to profile-connection space with the input profile and then to the output space with the output profile.
The input profile is searched for in three places:
-
If
embeddedis set, libvips will try to use any profile in the input image metadata. You can test for the presence of an embedded profile withImage.get_typeofwithMETA_ICC_NAMEas an argument. This will returnGObject.Type0 if there is no profile. -
Otherwise, if
input_profileis set, libvips will try to load a profile from the named file. This can also be the name of one of the built-in profiles. -
Otherwise, libvips will try to pick a compatible profile from the set of built-in profiles.
If
black_point_compensationis set, LCMS black point compensation is enabled.depthdefaults to 8, or 16 ifinis a 16-bit image.The output image has the output profile attached to the
META_ICC_NAMEfield.Use
iccImport(app.photofox.vipsffm.VipsOption...)andiccExport(app.photofox.vipsffm.VipsOption...)to do either the first or second half of this operation in isolation.- Parameters:
outputProfile- Filename to load output profile fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- pcs
VipsOption.EnumVipsPCSSet Profile Connection Space, intentVipsOption.EnumVipsIntentRendering intent, black-point-compensationVipsOption.BooleanEnable black point compensation, embeddedVipsOption.BooleanUse embedded input profile, if available, input-profileVipsOption.StringFilename to load input profile from, depthVipsOption.IntOutput device space depth in bits
-
-
identity
Creates an identity lookup table, ie. one which will leave an image unchanged when applied with
maplut(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...). Each entry in the table has a value equal to its position.Use the arithmetic operations on these tables to make LUTs representing arbitrary functions.
Normally LUTs are 8-bit. Set
ushortto create a 16-bit table.Normally 16-bit tables have 65536 entries. You can set this smaller with
size.See also:
xyz(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...),maplut(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- bands
VipsOption.IntNumber of bands in LUT, ushortVipsOption.BooleanCreate a 16-bit LUT, sizeVipsOption.IntSize of 16-bit LUT
-
ifthenelse
This operation scans the condition image
condand uses it to select pixels from either the then imagein1or the else imagein2. Non-zero meansin1, 0 meansin2.Any image can have either 1 band or n bands, where n is the same for all the non-1-band images. Single band images are then effectively copied to make n-band images.
Images
in1andin2are cast up to the smallest common format.condis cast to uchar.If the images differ in size, the smaller images are enlarged to match the largest by adding zero pixels along the bottom and right.
If
blendisTRUE, then values inoutare smoothly blended betweenin1andin2using the formula:out = (cond / 255) * in1 + (1 - cond / 255) * in2See also:
Image.equal- Parameters:
in1- Source for TRUE pixelsin2- Source for FALSE pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- blend
VipsOption.BooleanBlend smoothly between then and else parts
-
insert
Insert
subintomainat positionx,y.Normally
outshows the whole ofmain. IfexpandisTRUEthenoutis made large enough to hold all ofmainandsub. Any areas ofoutnot coming from eithermainorsubare set tobackground(default 0).If
suboverlapsmain,subwill appear on top ofmain.If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.
The two input images are cast up to the smallest common type (see table Smallest common format in arithmetic).
See also:
join(app.photofox.vipsffm.VImage, app.photofox.vipsffm.enums.VipsDirection, app.photofox.vipsffm.VipsOption...),embed(int, int, int, int, app.photofox.vipsffm.VipsOption...),extractArea(int, int, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
sub- Sub-image to insert into main imagex- Left edge of sub in mainy- Top edge of sub in mainargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- expand
VipsOption.BooleanExpand output to hold all of both inputs, backgroundVipsOption.ArrayDoubleColor for new pixels
-
invert
For unsigned formats, this operation calculates (max -
in), eg. (255 -in) for uchar. For signed and float formats, this operation calculates (-1in).For complex images, only the real part is inverted. See also
Image.conj.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
invertlut
Given a mask of target values and real values, generate a LUT which will map reals to targets.
Handy for linearising images from measurements of a colour chart. All values in [0,1]. Piecewise linear interpolation, extrapolate head and tail to 0 and 1.
Eg. input like this:
4 3 0.1 0.2 0.3 0.1 0.2 0.4 0.4 0.2 0.7 0.5 0.6 0.3Means a patch with 10% reflectance produces an image with 20% in channel 1, 30% in channel 2, and 10% in channel 3, and so on.
Inputs don't need to be sorted (we do that). Generate any precision LUT, default to 256 elements.
It won't work too well for non-monotonic camera responses (we should fix this). Interpolation is simple piecewise linear; we ought to do something better really.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- size
VipsOption.IntLUT size to generate
-
invfft
Transform an image from Fourier space to real space.
The result is complex. If you are OK with a real result, set
real, it's quicker.VIPS uses the fftw Fourier Transform library. If this library was not available when VIPS was configured, these functions will fail.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- real
VipsOption.BooleanOutput only the real part of the transform
-
join
Join
in1andin2together, left-right or up-down depending on the value ofdirection.If one is taller or wider than the other,
outwill be has high as the smaller. IfexpandisTRUE, then the output will be expanded to contain all of the input pixels.Use
alignto set the edge that the images align on. By default, they align on the edge with the lower value coordinate.Use
backgroundto set the colour of any pixels inoutwhich are not present in eitherin1orin2.Use
shimto set the spacing between the images. By default this is 0.If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.
The two input images are cast up to the smallest common type (see table Smallest common format in arithmetic).
If you are going to be joining many thousands of images in a regular grid,
arrayjoin(java.lang.foreign.Arena, java.util.List<app.photofox.vipsffm.VImage>, app.photofox.vipsffm.VipsOption...)is a better choice.See also:
arrayjoin(java.lang.foreign.Arena, java.util.List<app.photofox.vipsffm.VImage>, app.photofox.vipsffm.VipsOption...),insert(app.photofox.vipsffm.VImage, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
in2- Second input imagedirection-VipsDirectionJoin left-right or up-downargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- expand
VipsOption.BooleanExpand output to hold all of both inputs, shimVipsOption.IntPixels between images, backgroundVipsOption.ArrayDoubleColour for new pixels, alignVipsOption.EnumVipsAlignAlign on the low, centre or high coordinate edge
-
jp2kload
Read a JPEG2000 image.
The loader supports 8, 16 and 32-bit int pixel values, signed and unsigned. It supports greyscale, RGB, YCC, CMYK and multispectral colour spaces. It will read any ICC profile on the image.
It will only load images where all channels have the same format.
Use
pageto set the page to load, where page 0 is the base resolution image and higher-numbered pages are x2 reductions. Use the metadata item "n-pages" to find the number of pyramid layers.Some versions of openjpeg can fail to decode some tiled images correctly. Setting
oneshotwill force the loader to decode tiled images in a single operation and can improve compatibility.Use
fail_onto set the type of error that will cause load to fail. By default, loaders are permissive, that is,VipsFailOn.FAIL_ON_NONE.See also:
Image.new_from_file- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntLoad this page from the image, oneshotVipsOption.BooleanLoad images a frame at a time, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
jp2kloadBuffer
Exactly as
jp2kload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a buffer.You must not free the buffer while
outis active. TheObject::postclosesignal onoutis a good place to free.- Parameters:
arena- The arena that bounds resulting memory allocations during this operationbuffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntLoad this page from the image, oneshotVipsOption.BooleanLoad images a frame at a time, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
jp2kloadSource
public static VImage jp2kloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly asjp2kload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntLoad this page from the image, oneshotVipsOption.BooleanLoad images a frame at a time, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
jp2ksave
Write a VIPS image to a file in JPEG2000 format.
The saver supports 8, 16 and 32-bit int pixel values, signed and unsigned. It supports greyscale, RGB, CMYK and multispectral images.
Use
Qto set the compression quality factor. The default value produces file with approximately the same size as regular JPEG Q 75.Set
losslessto enable lossless compression.Use
tile_widthandtile_heightto set the tile size. The default is 512.Chroma subsampling is normally disabled for compatibility. Set
subsample_modeto auto to enable chroma subsample for Q < 90. Subsample mode uses YCC rather than RGB colourspace, and many jpeg2000 decoders do not support this.This operation always writes a pyramid.
See also:
Image.write_to_file,jp2kload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- tile-width
VipsOption.IntTile width in pixels, tile-heightVipsOption.IntTile height in pixels, losslessVipsOption.BooleanEnable lossless compression, QVipsOption.IntQ factor, subsample-modeVipsOption.EnumVipsForeignSubsampleSelect chroma subsample operation mode, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
jp2ksaveBuffer
As
jp2ksave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.See also:
jp2ksave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_target- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- tile-width
VipsOption.IntTile width in pixels, tile-heightVipsOption.IntTile height in pixels, losslessVipsOption.BooleanEnable lossless compression, QVipsOption.IntQ factor, subsample-modeVipsOption.EnumVipsForeignSubsampleSelect chroma subsample operation mode, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
jp2ksaveTarget
As
jp2ksave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.See also:
jp2ksave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_target- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- tile-width
VipsOption.IntTile width in pixels, tile-heightVipsOption.IntTile height in pixels, losslessVipsOption.BooleanEnable lossless compression, QVipsOption.IntQ factor, subsample-modeVipsOption.EnumVipsForeignSubsampleSelect chroma subsample operation mode, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
jpegload
Read a JPEG file into a VIPS image. It can read most 8-bit JPEG images, including CMYK and YCbCr.
shrinkmeans shrink by this integer factor during load. Possible values are 1, 2, 4 and 8. Shrinking during read is very much faster than decompressing the whole image and then shrinking later.Use
fail_onto set the type of error that will cause load to fail. By default, loaders are permissive, that is,VipsFailOn.FAIL_ON_NONE.Setting
autorotatetoTRUEwill make the loader interpret the orientation tag and automatically rotate the image appropriately during load.If
autorotateisFALSE, the metadata fieldMETA_ORIENTATIONis set to the value of the orientation tag. Applications may read and interpret this field as they wish later in processing. Seeautorot(app.photofox.vipsffm.VipsOption...). Save operations will useMETA_ORIENTATION, if present, to set the orientation of output images.Example:
vips_jpegload("fred.jpg", &out, "shrink", 8, "fail_on", VIPS_FAIL_ON_TRUNCATED, NULL);Any embedded ICC profiles are ignored: you always just get the RGB from the file. Instead, the embedded profile will be attached to the image as
META_ICC_NAME. You need to use something likeiccImport(app.photofox.vipsffm.VipsOption...)to get CIE values from the file.EXIF metadata is attached as
META_EXIF_NAME, IPTC asMETA_IPTC_NAME, and XMP asMETA_XMP_NAME.The int metadata item "jpeg-multiscan" is set to the result of
jpeg_has_multiple_scans(). Interlaced jpeg images need a large amount of memory to load, so this field gives callers a chance to handle these images differently.The string-valued field "jpeg-chroma-subsample" gives the chroma subsample in standard notation. 4:4:4 means no subsample, 4:2:0 means YCbCr with Cb and Cr subsampled horizontally and vertically, 4:4:4:4 means a CMYK image with no subsampling.
The EXIF thumbnail, if present, is attached to the image as "jpeg-thumbnail-data". See
Image.get_blob.See also:
jpegloadBuffer(java.lang.foreign.Arena, app.photofox.vipsffm.VBlob, app.photofox.vipsffm.VipsOption...),autorot(app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- shrink
VipsOption.IntShrink factor on load, autorotateVipsOption.BooleanRotate image using exif orientation, unlimitedVipsOption.BooleanRemove all denial of service limits, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
jpegloadBuffer
Read a JPEG-formatted memory block into a VIPS image. Exactly as
jpegload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a memory buffer.You must not free the buffer while
outis active. TheObject::postclosesignal onoutis a good place to free.See also:
jpegload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationbuffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- shrink
VipsOption.IntShrink factor on load, autorotateVipsOption.BooleanRotate image using exif orientation, unlimitedVipsOption.BooleanRemove all denial of service limits, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
jpegloadSource
public static VImage jpegloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Read a JPEG-formatted memory block into a VIPS image. Exactly as
jpegload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
jpegload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- shrink
VipsOption.IntShrink factor on load, autorotateVipsOption.BooleanRotate image using exif orientation, unlimitedVipsOption.BooleanRemove all denial of service limits, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
jpegsave
Write a VIPS image to a file as JPEG.
Use
Qto set the JPEG compression factor. Default 75.If
optimize_codingis set, the Huffman tables are optimized. This is slightly slower and produces slightly smaller files.If
interlaceis set, the jpeg files will be interlaced (progressive jpeg, in jpg parlance). These files may be better for display over a slow network connection, but need much more memory to encode and decode.Chroma subsampling is normally automatically disabled for Q >= 90. You can force the subsampling mode with
subsample_mode.If
trellis_quantis set and the version of libjpeg supports it (e.g. mozjpeg >= 3.0), apply trellis quantisation to each 8x8 block. Reduces file size but increases compression time.If
overshoot_deringingis set and the version of libjpeg supports it (e.g. mozjpeg >= 3.0), apply overshooting to samples with extreme values for example 0 and 255 for 8-bit. Overshooting may reduce ringing artifacts from compression, in particular in areas where black text appears on a white background.If
optimize_scansis set and the version of libjpeg supports it (e.g. mozjpeg >= 3.0), split the spectrum of DCT coefficients into separate scans. Reduces file size but increases compression time.If
quant_tableis set and the version of libjpeg supports it (e.g. mozjpeg >= 3.0) it selects the quantization table to use:- 0 — Tables from JPEG Annex K (vips and libjpeg default)
- 1 — Flat table
- 2 — Table tuned for MSSIM on Kodak image set
- 3 — Table from ImageMagick by N. Robidoux (current mozjpeg default)
- 4 — Table tuned for PSNR-HVS-M on Kodak image set
- 5 — Table from Relevance of Human Vision to JPEG-DCT Compression (1992)
- 6 — Table from DCTune Perceptual Optimization of Compressed Dental X-Rays (1997)
- 7 — Table from A Visual Detection Model for DCT Coefficient Quantization (1993)
- 8 — Table from An Improved Detection Model for DCT Coefficient Quantization (1993)
Quantization table 0 is the default in vips and libjpeg(-turbo), but it tends to favor detail over color accuracy, producing colored patches and stripes as well as heavy banding in flat areas at high compression ratios. Quantization table 2 is a good candidate to try if the default quantization table produces banding or color shifts and is well suited for hires images. Quantization table 3 is the default in mozjpeg and has been tuned to produce good results at the default quality setting; banding at high compression. Quantization table 4 is the most accurate at the cost of compression ratio. Tables 5-7 are based on older research papers, but generally achieve worse compression ratios and/or quality than 2 or 4.
For maximum compression with mozjpeg, a useful set of options is
strip, optimize-coding, interlace, optimize-scans, trellis-quant, quant_table=3.By default, the output stream won't have restart markers. If a non-zero restart_interval is specified, a restart marker will be added after each specified number of MCU blocks. This makes the stream more recoverable if there are transmission errors, but also allows for some decoders to read part of the JPEG without decoding the whole stream.
The image is automatically converted to RGB, Monochrome or CMYK before saving.
EXIF data is constructed from
META_EXIF_NAME, then modified with any other related tags on the image before being written to the file.META_RESOLUTION_UNITis used to set the EXIF resolution unit.META_ORIENTATIONis used to set the EXIF orientation tag.IPTC as
META_IPTC_NAMEand XMP asMETA_XMP_NAMEare coded and attached.See also:
jpegsaveBuffer(app.photofox.vipsffm.VipsOption...),Image.write_to_file- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- Q
VipsOption.IntQ factor, optimize-codingVipsOption.BooleanCompute optimal Huffman coding tables, interlaceVipsOption.BooleanGenerate an interlaced (progressive) jpeg, no-subsampleVipsOption.BooleanDisable chroma subsample, trellis-quantVipsOption.BooleanApply trellis quantisation to each 8x8 block, overshoot-deringingVipsOption.BooleanApply overshooting to samples with extreme values, optimize-scansVipsOption.BooleanSplit spectrum of DCT coefficients into separate scans, quant-tableVipsOption.IntUse predefined quantization table with given index, subsample-modeVipsOption.EnumVipsForeignSubsampleSelect chroma subsample operation mode, restart-intervalVipsOption.IntAdd restart markers every specified number of mcu, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
jpegsaveBuffer
As
jpegsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.The address of the buffer is returned in
obuf, the length of the buffer inolen. You are responsible for freeing the buffer withGLib.freewhen you are done with it.See also:
jpegsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_file- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- Q
VipsOption.IntQ factor, optimize-codingVipsOption.BooleanCompute optimal Huffman coding tables, interlaceVipsOption.BooleanGenerate an interlaced (progressive) jpeg, no-subsampleVipsOption.BooleanDisable chroma subsample, trellis-quantVipsOption.BooleanApply trellis quantisation to each 8x8 block, overshoot-deringingVipsOption.BooleanApply overshooting to samples with extreme values, optimize-scansVipsOption.BooleanSplit spectrum of DCT coefficients into separate scans, quant-tableVipsOption.IntUse predefined quantization table with given index, subsample-modeVipsOption.EnumVipsForeignSubsampleSelect chroma subsample operation mode, restart-intervalVipsOption.IntAdd restart markers every specified number of mcu, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
jpegsaveMime
As
jpegsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save as a mime jpeg on stdout.See also:
jpegsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_file- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- Q
VipsOption.IntQ factor, optimize-codingVipsOption.BooleanCompute optimal Huffman coding tables, interlaceVipsOption.BooleanGenerate an interlaced (progressive) jpeg, no-subsampleVipsOption.BooleanDisable chroma subsample, trellis-quantVipsOption.BooleanApply trellis quantisation to each 8x8 block, overshoot-deringingVipsOption.BooleanApply overshooting to samples with extreme values, optimize-scansVipsOption.BooleanSplit spectrum of DCT coefficients into separate scans, quant-tableVipsOption.IntUse predefined quantization table with given index, subsample-modeVipsOption.EnumVipsForeignSubsampleSelect chroma subsample operation mode, restart-intervalVipsOption.IntAdd restart markers every specified number of mcu, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
jpegsaveTarget
As
jpegsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.See also:
jpegsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_target- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- Q
VipsOption.IntQ factor, optimize-codingVipsOption.BooleanCompute optimal Huffman coding tables, interlaceVipsOption.BooleanGenerate an interlaced (progressive) jpeg, no-subsampleVipsOption.BooleanDisable chroma subsample, trellis-quantVipsOption.BooleanApply trellis quantisation to each 8x8 block, overshoot-deringingVipsOption.BooleanApply overshooting to samples with extreme values, optimize-scansVipsOption.BooleanSplit spectrum of DCT coefficients into separate scans, quant-tableVipsOption.IntUse predefined quantization table with given index, subsample-modeVipsOption.EnumVipsForeignSubsampleSelect chroma subsample operation mode, restart-intervalVipsOption.IntAdd restart markers every specified number of mcu, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
jxlload
Read a JPEG-XL image.
The JPEG-XL loader and saver are experimental features and may change in future libvips versions.
See also:
Image.new_from_file- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
jxlloadBuffer
Exactly asjxlload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a buffer.- Parameters:
arena- The arena that bounds resulting memory allocations during this operationbuffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
jxlloadSource
public static VImage jxlloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly asjxlload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
jxlsave
Write a VIPS image to a file in JPEG-XL format.
The JPEG-XL loader and saver are experimental features and may change in future libvips versions.
tiersets the overall decode speed the encoder will target. Minimum is 0 (highest quality), and maximum is 4 (lowest quality). Default is 0.distancesets the target maximum encoding error. Minimum is 0 (highest quality), and maximum is 15 (lowest quality). Default is 1.0 (visually lossless).As a convenience, you can also use
Qto setdistance.Quses approximately the same scale as regular JPEG.Set
losslessto enable lossless compression.- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- tier
VipsOption.IntDecode speed tier, distanceVipsOption.DoubleTarget butteraugli distance, effortVipsOption.IntEncoding effort, losslessVipsOption.BooleanEnable lossless compression, QVipsOption.IntQuality factor, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
jxlsaveBuffer
As
jxlsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.See also:
jxlsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_target- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- tier
VipsOption.IntDecode speed tier, distanceVipsOption.DoubleTarget butteraugli distance, effortVipsOption.IntEncoding effort, losslessVipsOption.BooleanEnable lossless compression, QVipsOption.IntQuality factor, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
jxlsaveTarget
As
jxlsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.See also:
jxlsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_target- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- tier
VipsOption.IntDecode speed tier, distanceVipsOption.DoubleTarget butteraugli distance, effortVipsOption.IntEncoding effort, losslessVipsOption.BooleanEnable lossless compression, QVipsOption.IntQuality factor, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
labelregions
Label regions of equal pixels in an image.
Repeatedly scans
infor regions of 4-connected pixels with the same pixel value. Every time a region is discovered, those pixels are marked inmaskwith a unique serial number. Once all pixels have been labelled, the operation returns, settingsegmentsto the number of discrete regions which were detected.maskis always a 1-bandVipsBandFormat.FORMAT_INTimage of the same dimensions asin.This operation is useful for, for example, blob counting. You can use the morphological operators to detect and isolate a series of objects, then use
labelregions(app.photofox.vipsffm.VipsOption...)to number them all.Use
histFindIndexed(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)to (for example) find blob coordinates.See also:
histFindIndexed(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- segments
VipsOption.IntNumber of discrete contiguous regions
-
linear
Pass an image through a linear transform, ie. (@out =
in*a+b). Output is float for integer input, double for double input, complex for complex input and double complex for double complex input. Setucharto output uchar pixels.If the arrays of constants have just one element, that constant is used for all image bands. If the arrays have more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element.
See also:
Image.linear1,add(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
a- Multiply by thisb- Add thisargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- uchar
VipsOption.BooleanOutput should be uchar
-
linecache
This operation behaves rather like
copy(app.photofox.vipsffm.VipsOption...)between imagesinandout, except that it keeps a cache of computed scanlines.The number of lines cached is enough for a small amount of non-local access.
Each cache tile is made with a single call to
Region.prepare.When the cache fills, a tile is chosen for reuse. If
accessisVipsAccess.ACCESS_RANDOM, then the least-recently-used tile is reused. IfaccessisVipsAccess.ACCESS_SEQUENTIAL, then the top-most tile is reused.accessdefaults toVipsAccess.ACCESS_RANDOM.tile_heightcan be used to set the size of the strips thatlinecache(app.photofox.vipsffm.VipsOption...)uses. The default is 1 (a single scanline).Normally, only a single thread at once is allowed to calculate tiles. If you set
threadedtoTRUE,linecache(app.photofox.vipsffm.VipsOption...)will allow many threads to calculate tiles at once and share the cache between them.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- tile-height
VipsOption.IntTile height in pixels, accessVipsOption.EnumVipsAccessExpected access pattern, threadedVipsOption.BooleanAllow threaded access, persistentVipsOption.BooleanKeep cache between evaluations
-
logmat
public static VImage logmat(Arena arena, double sigma, double minAmpl, VipsOption... args) throws VipsError Create a circularly symmetric Laplacian of Gaussian mask of radius
sigma.The size of the mask is determined by the variable
min_ampl; if for instance the value .1 is entered this means that the produced mask is clipped at values within 10 percent of zero, and where the change between mask elements is less than 10%.The program uses the following equation: (from Handbook of Pattern Recognition and image processing by Young and Fu, AP 1986 pages 220-221):
H(r) = (1 / (2 * M_PI * s4)) * (2 - (r2 / s2)) * exp(-r2 / (2 * s2))where:
2 = `sigma` * `sigma`, s4 = s2 * s2 r2 = r * r.The generated mask has odd size and its maximum value is normalised to 1.0, unless
precisionisVipsPrecision.PRECISION_INTEGER.If
separableis set, only the centre horizontal is generated. This is useful for separable convolutions.If
precisionisVipsPrecision.PRECISION_INTEGER, an integer mask is generated. This is useful for integer convolutions."scale" is set to the sum of all the mask elements.
See also:
gaussmat(java.lang.foreign.Arena, double, double, app.photofox.vipsffm.VipsOption...),conv(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsigma- Radius of GaussianminAmpl- Minimum amplitude of Gaussianargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- separable
VipsOption.BooleanGenerate separable Gaussian, integerVipsOption.BooleanGenerate integer Gaussian, precisionVipsOption.EnumVipsPrecisionGenerate with this precision
-
magickload
Read in an image using libMagick, the ImageMagick library.
This library can read more than 80 file formats, including BMP, EPS, DICOM and many others. The reader can handle any ImageMagick image, including the float and double formats. It will work with any quantum size, including HDR. Any metadata attached to the libMagick image is copied on to the VIPS image.
The reader should also work with most versions of GraphicsMagick. See the
-Dmagick-packageconfigure option.The file format is usually guessed from the filename suffix, or sniffed from the file contents.
Normally it will only load the first image in a many-image sequence (such as a GIF or a PDF). Use
pageandnto set the start page and number of pages to load. Setnto -1 to load all pages frompageonwards.densityis "WxH" in DPI, e.g. "600x300" or "600" (default is "72x72"). See the density docs on the imagemagick website.See also:
Image.new_from_file- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- density
VipsOption.StringCanvas resolution for rendering vector formats like SVG, pageVipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, all-framesVipsOption.BooleanRead all frames from an image, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
magickloadBuffer
public static VImage magickloadBuffer(Arena arena, VBlob buffer, VipsOption... args) throws VipsError Read an image memory block using libMagick into a VIPS image. Exactly as
magickload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a memory source.You must not free the buffer while
outis active. TheObject::postclosesignal onoutis a good place to free.See also:
magickload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationbuffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- density
VipsOption.StringCanvas resolution for rendering vector formats like SVG, pageVipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, all-framesVipsOption.BooleanRead all frames from an image, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
magicksave
Write an image using libMagick.
Use
qualityto set the quality factor. Default 0.Use
formatto explicitly set the save format, for example, "BMP". Otherwise the format is guessed from the filename suffix.If
optimize_gif_framesis set, GIF frames are cropped to the smallest size while preserving the results of the GIF animation. This takes some time for computation but saves some time on encoding and produces smaller files in some cases.If
optimize_gif_transparencyis set, pixels that don't change the image through animation are made transparent. This takes some time for computation but saves some time on encoding and produces smaller files in some cases.bitdepthspecifies the number of bits per pixel. The image will be quantized and dithered if the value is within the valid range (1 to 8).See also:
magicksaveBuffer(app.photofox.vipsffm.VipsOption...),magickload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- format
VipsOption.StringFormat to save in, qualityVipsOption.IntQuality to use, optimize-gif-framesVipsOption.BooleanApply GIF frames optimization, optimize-gif-transparencyVipsOption.BooleanApply GIF transparency optimization, bitdepthVipsOption.IntNumber of bits per pixel, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
magicksaveBuffer
As
magicksave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.The address of the buffer is returned in
obuf, the length of the buffer inolen. You are responsible for freeing the buffer withGLib.freewhen you are done with it.See also:
magicksave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_file- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- format
VipsOption.StringFormat to save in, qualityVipsOption.IntQuality to use, optimize-gif-framesVipsOption.BooleanApply GIF frames optimization, optimize-gif-transparencyVipsOption.BooleanApply GIF transparency optimization, bitdepthVipsOption.IntNumber of bits per pixel, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
mapim
This operator resamples
inusingindexto look up pixels.outis the same size asindex, with each pixel being fetched from that position inin. That is:out[x, y] = in[index[x, y]]If
indexhas one band, that band must be complex. Otherwise,indexmust have two bands of any format.Coordinates in
indexare in pixels, with (0, 0) being the top-left corner ofin, and with y increasing down the image. Usexyz(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...)to build index images.interpolatedefaults to bilinear.By default, new pixels are filled with
background. This defaults to zero (black). You can set other extend types withextend.VipsExtend.EXTEND_COPYis better for image upsizing.Image are normally treated as unpremultiplied, so this operation can be used directly on PNG images. If your images have been through
premultiply(app.photofox.vipsffm.VipsOption...), setpremultiplied.This operation does not change xres or yres. The image resolution needs to be updated by the application.
See
maplut(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)for a 1D equivalent of this operation.See also:
xyz(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...),affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...),resize(double, app.photofox.vipsffm.VipsOption...),maplut(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...),Interpolate- Parameters:
index- Index pixels with thisargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- interpolate
VipsOption.InterpolateInterpolate pixels with this, backgroundVipsOption.ArrayDoubleBackground value, premultipliedVipsOption.BooleanImages have premultiplied alpha, extendVipsOption.EnumVipsExtendHow to generate the extra pixels
-
maplut
Map an image through another image acting as a LUT (Look Up Table). The lut may have any type and the output image will be that type.
The input image will be cast to one of the unsigned integer types, that is,
VipsBandFormat.FORMAT_UCHAR,VipsBandFormat.FORMAT_USHORTorVipsBandFormat.FORMAT_UINT.If
lutis too small for the input type (for example, ifinisVipsBandFormat.FORMAT_UCHARbutlutonly has 100 elements), the lut is padded out by copying the last element. Overflows are reported at the end of computation. Iflutis too large, extra values are ignored.If
luthas one band andbandis -1 (the default), then all bands ofinpass throughlut. Ifbandis >= 0, then just that band ofinpasses throughlutand other bands are just copied.If
luthas same number of bands asin, then each band is mapped separately. Ifinhas one band, thenlutmay have many bands and the output will have the same number of bands aslut.See also:
histFind(app.photofox.vipsffm.VipsOption...),identity(java.lang.foreign.Arena, app.photofox.vipsffm.VipsOption...)- Parameters:
lut- Look-up table imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- band
VipsOption.IntApply one-band lut to this band of in
-
maskButterworth
public static VImage maskButterworth(Arena arena, int width, int height, double order, double frequencyCutoff, double amplitudeCutoff, VipsOption... args) throws VipsError Make an butterworth high- or low-pass filter, that is, one with a variable, smooth transition positioned at
frequency_cutoff, wherefrequency_cutoffis in range 0 - 1.The shape of the curve is controlled by
order-- higher values give a sharper transition. See Gonzalez and Wintz, Digital Image Processing, 1987.See also:
maskIdeal(java.lang.foreign.Arena, int, int, double, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsorder- Filter orderfrequencyCutoff- Frequency cutoffamplitudeCutoff- Amplitude cutoffargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- uchar
VipsOption.BooleanOutput an unsigned char image, nodcVipsOption.BooleanRemove DC component, rejectVipsOption.BooleanInvert the sense of the filter, opticalVipsOption.BooleanRotate quadrants to optical space
-
maskButterworthBand
public static VImage maskButterworthBand(Arena arena, int width, int height, double order, double frequencyCutoffX, double frequencyCutoffY, double radius, double amplitudeCutoff, VipsOption... args) throws VipsError Make an butterworth band-pass or band-reject filter, that is, one with a variable, smooth transition positioned at
frequency_cutoff_x,frequency_cutoff_y, of radiusradius.The shape of the curve is controlled by
order-- higher values give a sharper transition. See Gonzalez and Wintz, Digital Image Processing, 1987.See also:
maskIdeal(java.lang.foreign.Arena, int, int, double, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsorder- Filter orderfrequencyCutoffX- Frequency cutoff xfrequencyCutoffY- Frequency cutoff yradius- Radius of circleamplitudeCutoff- Amplitude cutoffargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- uchar
VipsOption.BooleanOutput an unsigned char image, nodcVipsOption.BooleanRemove DC component, rejectVipsOption.BooleanInvert the sense of the filter, opticalVipsOption.BooleanRotate quadrants to optical space
-
maskButterworthRing
public static VImage maskButterworthRing(Arena arena, int width, int height, double order, double frequencyCutoff, double amplitudeCutoff, double ringwidth, VipsOption... args) throws VipsError Make a butterworth ring-pass or ring-reject filter, that is, one with a variable, smooth transition positioned at
frequency_cutoffof widthwidth, wherefrequency_cutoffis in the range 0 - 1.The shape of the curve is controlled by
order-- higher values give a sharper transition. See Gonzalez and Wintz, Digital Image Processing, 1987.See also:
maskIdeal(java.lang.foreign.Arena, int, int, double, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsorder- Filter orderfrequencyCutoff- Frequency cutoffamplitudeCutoff- Amplitude cutoffringwidth- Ringwidthargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- uchar
VipsOption.BooleanOutput an unsigned char image, nodcVipsOption.BooleanRemove DC component, rejectVipsOption.BooleanInvert the sense of the filter, opticalVipsOption.BooleanRotate quadrants to optical space
-
maskFractal
public static VImage maskFractal(Arena arena, int width, int height, double fractalDimension, VipsOption... args) throws VipsError This operation should be used to create fractal images by filtering the power spectrum of Gaussian white noise.
See
gaussnoise(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...).See also:
maskIdeal(java.lang.foreign.Arena, int, int, double, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsfractalDimension- Fractal dimensionargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- uchar
VipsOption.BooleanOutput an unsigned char image, nodcVipsOption.BooleanRemove DC component, rejectVipsOption.BooleanInvert the sense of the filter, opticalVipsOption.BooleanRotate quadrants to optical space
-
maskGaussian
public static VImage maskGaussian(Arena arena, int width, int height, double frequencyCutoff, double amplitudeCutoff, VipsOption... args) throws VipsError Make a gaussian high- or low-pass filter, that is, one with a variable, smooth transition positioned at
frequency_cutoff.See also:
maskIdeal(java.lang.foreign.Arena, int, int, double, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsfrequencyCutoff- Frequency cutoffamplitudeCutoff- Amplitude cutoffargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- uchar
VipsOption.BooleanOutput an unsigned char image, nodcVipsOption.BooleanRemove DC component, rejectVipsOption.BooleanInvert the sense of the filter, opticalVipsOption.BooleanRotate quadrants to optical space
-
maskGaussianBand
public static VImage maskGaussianBand(Arena arena, int width, int height, double frequencyCutoffX, double frequencyCutoffY, double radius, double amplitudeCutoff, VipsOption... args) throws VipsError Make a gaussian band-pass or band-reject filter, that is, one with a variable, smooth transition positioned at
frequency_cutoff_x,frequency_cutoff_y, of radiusradius.See also:
maskIdeal(java.lang.foreign.Arena, int, int, double, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsfrequencyCutoffX- Frequency cutoff xfrequencyCutoffY- Frequency cutoff yradius- Radius of circleamplitudeCutoff- Amplitude cutoffargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- uchar
VipsOption.BooleanOutput an unsigned char image, nodcVipsOption.BooleanRemove DC component, rejectVipsOption.BooleanInvert the sense of the filter, opticalVipsOption.BooleanRotate quadrants to optical space
-
maskGaussianRing
public static VImage maskGaussianRing(Arena arena, int width, int height, double frequencyCutoff, double amplitudeCutoff, double ringwidth, VipsOption... args) throws VipsError Make a gaussian ring-pass or ring-reject filter, that is, one with a variable, smooth transition positioned at
frequency_cutoffof widthringwidth.See also:
maskIdeal(java.lang.foreign.Arena, int, int, double, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsfrequencyCutoff- Frequency cutoffamplitudeCutoff- Amplitude cutoffringwidth- Ringwidthargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- uchar
VipsOption.BooleanOutput an unsigned char image, nodcVipsOption.BooleanRemove DC component, rejectVipsOption.BooleanInvert the sense of the filter, opticalVipsOption.BooleanRotate quadrants to optical space
-
maskIdeal
public static VImage maskIdeal(Arena arena, int width, int height, double frequencyCutoff, VipsOption... args) throws VipsError Make an ideal high- or low-pass filter, that is, one with a sharp cutoff positioned at
frequency_cutoff, wherefrequency_cutoffis in the range 0 - 1.This operation creates a one-band float image of the specified size. The image has values in the range [0, 1] and is typically used for multiplying against frequency domain images to filter them. Masks are created with the DC component at (0, 0). The DC pixel always has the value 1.0.
Set
nodcto not set the DC pixel.Set
opticalto position the DC component in the centre of the image. This makes the mask suitable for multiplying against optical Fourier transforms. Seewrap(app.photofox.vipsffm.VipsOption...).Set
rejectto invert the sense of the filter. For example, low-pass becomes low-reject.Set
ucharto output an 8-bit unsigned char image rather than a float image. In this case, pixels are in the range [0 - 255].See also:
maskIdeal(java.lang.foreign.Arena, int, int, double, app.photofox.vipsffm.VipsOption...),maskIdealRing(java.lang.foreign.Arena, int, int, double, double, app.photofox.vipsffm.VipsOption...),maskIdealBand(java.lang.foreign.Arena, int, int, double, double, double, app.photofox.vipsffm.VipsOption...),maskButterworth(java.lang.foreign.Arena, int, int, double, double, double, app.photofox.vipsffm.VipsOption...),maskButterworthRing(java.lang.foreign.Arena, int, int, double, double, double, double, app.photofox.vipsffm.VipsOption...),maskButterworthBand(java.lang.foreign.Arena, int, int, double, double, double, double, double, app.photofox.vipsffm.VipsOption...),maskGaussian(java.lang.foreign.Arena, int, int, double, double, app.photofox.vipsffm.VipsOption...),maskGaussianRing(java.lang.foreign.Arena, int, int, double, double, double, app.photofox.vipsffm.VipsOption...),maskGaussianBand(java.lang.foreign.Arena, int, int, double, double, double, double, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsfrequencyCutoff- Frequency cutoffargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- uchar
VipsOption.BooleanOutput an unsigned char image, nodcVipsOption.BooleanRemove DC component, rejectVipsOption.BooleanInvert the sense of the filter, opticalVipsOption.BooleanRotate quadrants to optical space
-
maskIdealBand
public static VImage maskIdealBand(Arena arena, int width, int height, double frequencyCutoffX, double frequencyCutoffY, double radius, VipsOption... args) throws VipsError Make an ideal band-pass or band-reject filter, that is, one with a sharp cutoff around the point
frequency_cutoff_x,frequency_cutoff_y, of sizeradius.See also:
maskIdeal(java.lang.foreign.Arena, int, int, double, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsfrequencyCutoffX- Frequency cutoff xfrequencyCutoffY- Frequency cutoff yradius- Radius of circleargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- uchar
VipsOption.BooleanOutput an unsigned char image, nodcVipsOption.BooleanRemove DC component, rejectVipsOption.BooleanInvert the sense of the filter, opticalVipsOption.BooleanRotate quadrants to optical space
-
maskIdealRing
public static VImage maskIdealRing(Arena arena, int width, int height, double frequencyCutoff, double ringwidth, VipsOption... args) throws VipsError Make an ideal ring-pass or ring-reject filter, that is, one with a sharp ring positioned at
frequency_cutoffof widthwidth, wherefrequency_cutoffandwidthare expressed as the range 0 - 1.See also:
maskIdeal(java.lang.foreign.Arena, int, int, double, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsfrequencyCutoff- Frequency cutoffringwidth- Ringwidthargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- uchar
VipsOption.BooleanOutput an unsigned char image, nodcVipsOption.BooleanRemove DC component, rejectVipsOption.BooleanInvert the sense of the filter, opticalVipsOption.BooleanRotate quadrants to optical space
-
match
public VImage match(VImage sec, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, VipsOption... args) throws VipsError Scale, rotate and translate
secso that the tie-points line up.If
searchisTRUE, before performing the transformation, the tie-points are improved by searching an area ofsecof sizehareafor a match of sizehwindowtoref.This function will only work well for small rotates and scales.
- Parameters:
sec- Secondary imagexr1- Position of first reference tie-pointyr1- Position of first reference tie-pointxs1- Position of first secondary tie-pointys1- Position of first secondary tie-pointxr2- Position of second reference tie-pointyr2- Position of second reference tie-pointxs2- Position of second secondary tie-pointys2- Position of second secondary tie-pointargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- hwindow
VipsOption.IntHalf window size, hareaVipsOption.IntHalf area size, searchVipsOption.BooleanSearch to improve tie-points, interpolateVipsOption.InterpolateInterpolate pixels with this
-
math
Perform various functions in -lm, the maths library, on images.
Angles are expressed in degrees. The output type is float unless the input is double, in which case the output is double.
Non-complex images only.
- Parameters:
math-VipsOperationMathMath to performargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
math2
This operation calculates a 2-ary maths operation on a pair of images and writes the result to
out. The images may have any non-complex format.outis float except in the case that either ofleftorrightare double, in which caseoutis also double.It detects division by zero, setting those pixels to zero in the output. Beware: it does this silently!
If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.
If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.
The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), and that format is the result type.
- Parameters:
right- Right-hand image argumentmath2-VipsOperationMath2Math to performargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
math2Const
public VImage math2Const(VipsOperationMath2 math2, List<Double> c, VipsOption... args) throws VipsError This operation calculates various 2-ary maths operations on an image and an array of constants and writes the result to
out. The image may have any non-complex format.outis float except in the case thatinis double, in which caseoutis also double.It detects division by zero, setting those pixels to zero in the output. Beware: it does this silently!
If the array of constants has just one element, that constant is used for all image bands. If the array has more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element.
See also:
math2(app.photofox.vipsffm.VImage, app.photofox.vipsffm.enums.VipsOperationMath2, app.photofox.vipsffm.VipsOption...),math(app.photofox.vipsffm.enums.VipsOperationMath, app.photofox.vipsffm.VipsOption...)- Parameters:
math2-VipsOperationMath2Math to performc- Array of constantsargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
matload
Read a Matlab save file into a VIPS image.
This operation searches the save file for the first array variable with between 1 and 3 dimensions and loads it as an image. It will not handle complex images. It does not handle sparse matrices.
See also:
Image.new_from_file- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- flags
VipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
matrixinvert
This operation calculates the inverse of the matrix represented in
m. The scale and offset members of the input matrix are ignored.See also:
matrixload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...),matrixmultiply(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
matrixload
Reads a matrix from a file.
Matrix files have a simple format that's supposed to be easy to create with a text editor or a spreadsheet.
The first line has four numbers for width, height, scale and offset (scale and offset may be omitted, in which case they default to 1.0 and 0.0). Scale must be non-zero. Width and height must be positive integers. The numbers are separated by any mixture of spaces, commas, tabs and quotation marks ("). The scale and offset fields may be floating-point, and must use '.' as a decimal separator.
Subsequent lines each hold one row of matrix data, with numbers again separated by any mixture of spaces, commas, tabs and quotation marks ("). The numbers may be floating-point, and must use '.' as a decimal separator.
Extra characters at the ends of lines or at the end of the file are ignored.
See also:
matrixload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- flags
VipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
matrixloadSource
public static VImage matrixloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly as
matrixload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
matrixload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- flags
VipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
matrixmultiply
Multiplies two matrix images.
The scale and offset members of
leftandrightare ignored.- Parameters:
right- Second matrix to multiplyargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
matrixprint
Print
into %stdout in matrix format. Seematrixload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)for a description of the format.See also:
matrixload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- keep
VipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
matrixsave
Write
intofilenamein matrix format. Seematrixload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)for a description of the format.See also:
matrixload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- keep
VipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
matrixsaveTarget
As
matrixsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.See also:
matrixsave(java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- keep
VipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
max
This operation finds the maximum value in an image.
By default it finds the single largest value. If
sizeis set >1, it will find thesizelargest values. It will stop searching early if has found enough values. Equal values will be sorted by y then x.It operates on all bands of the input image: use
stats(app.photofox.vipsffm.VipsOption...)if you need to find an maximum for each band.For complex images, this operation finds the maximum modulus.
You can read out the position of the maximum with
xandy. You can read out arrays of the values and positions of the topsizemaxima without_array,x_arrayandy_array. These values are returned sorted from largest to smallest.If there are more than
sizemaxima, the maxima returned will be a random selection of the maxima in the image.See also:
min(app.photofox.vipsffm.VipsOption...),stats(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- x
VipsOption.IntHorizontal position of maximum, yVipsOption.IntVertical position of maximum, sizeVipsOption.IntNumber of maximum values to find, out-arrayVipsOption.ArrayDoubleArray of output values, x-arrayVipsOption.ArrayIntArray of horizontal positions, y-arrayVipsOption.ArrayIntArray of vertical positions
-
maxpair
For each pixel, pick the maximum of a pair of images.
See also:
minpair(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
right- Right-hand image argumentargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
measure
Analyse a grid of colour patches, producing an array of patch averages. The mask has a row for each measured patch and a column for each image band. The operations issues a warning if any patch has a deviation more than 20% of the mean. Only the central 50% of each patch is averaged.
If the chart does not fill the whole image, use the optional
left,top,width,heightarguments to indicate the position of the chart.See also:
avg(app.photofox.vipsffm.VipsOption...),deviate(app.photofox.vipsffm.VipsOption...)- Parameters:
h- Number of patches across chartv- Number of patches down chartargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- left
VipsOption.IntLeft edge of extract area, topVipsOption.IntTop edge of extract area, widthVipsOption.IntWidth of extract area, heightVipsOption.IntHeight of extract area
-
merge
public VImage merge(VImage sec, VipsDirection direction, int dx, int dy, VipsOption... args) throws VipsError This operation joins two images left-right (with
refon the left) or up-down (withrefabove) with a smooth seam.If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.
The two input images are cast up to the smallest common type (see table Smallest common format in arithmetic).
dxanddygive the displacement ofsecrelative toref, in other words, the vector to get from the origin ofsecto the origin ofref, in other words,dxwill generally be a negative number.mblendlimits the maximum width of the blend area. A value of "-1" means "unlimited". The two images are blended with a raised cosine.Pixels with all bands equal to zero are "transparent", that is, zero pixels in the overlap area do not contribute to the merge. This makes it possible to join non-rectangular images.
See also:
mosaic(app.photofox.vipsffm.VImage, app.photofox.vipsffm.enums.VipsDirection, int, int, int, int, app.photofox.vipsffm.VipsOption...),insert(app.photofox.vipsffm.VImage, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
sec- Secondary imagedirection-VipsDirectionHorizontal or vertical mergedx- Horizontal displacement from sec to refdy- Vertical displacement from sec to refargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- mblend
VipsOption.IntMaximum blend size
-
min
This operation finds the minimum value in an image.
By default it finds the single smallest value. If
sizeis set >1, it will find thesizesmallest values. It will stop searching early if has found enough values. Equal values will be sorted by y then x.It operates on all bands of the input image: use
stats(app.photofox.vipsffm.VipsOption...)if you need to find an minimum for each band.For complex images, this operation finds the minimum modulus.
You can read out the position of the minimum with
xandy. You can read out arrays of the values and positions of the topsizeminima without_array,x_arrayandy_array. These values are returned sorted from smallest to largest.If there are more than
sizeminima, the minima returned will be a random selection of the minima in the image.See also:
min(app.photofox.vipsffm.VipsOption...),stats(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- x
VipsOption.IntHorizontal position of minimum, yVipsOption.IntVertical position of minimum, sizeVipsOption.IntNumber of minimum values to find, out-arrayVipsOption.ArrayDoubleArray of output values, x-arrayVipsOption.ArrayIntArray of horizontal positions, y-arrayVipsOption.ArrayIntArray of vertical positions
-
minpair
For each pixel, pick the minimum of a pair of images.
See also:
minpair(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
right- Right-hand image argumentargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
morph
public VImage morph(VImage mask, VipsOperationMorphology morph, VipsOption... args) throws VipsError Performs a morphological operation on
inusingmaskas a structuring element.The image should have 0 (black) for no object and 255 (non-zero) for an object. Note that this is the reverse of the usual convention for these operations, but more convenient when combined with the boolean operators. The output image is the same size as the input image: edge pxels are made by expanding the input image as necessary.
Mask coefficients can be either 0 (for object) or 255 (for background) or 128 (for do not care). The origin of the mask is at location (m.xsize / 2, m.ysize / 2), integer division. All algorithms have been based on the book "Fundamentals of Digital Image Processing" by A. Jain, pp 384-388, Prentice-Hall, 1989.
For
VipsOperationMorphology.OPERATION_MORPHOLOGY_ERODE, the whole mask must match for the output pixel to be set, that is, the result is the logical AND of the selected input pixels.For
VipsOperationMorphology.OPERATION_MORPHOLOGY_DILATE, the output pixel is set if any part of the mask matches, that is, the result is the logical OR of the selected input pixels.See the boolean operations
Image.andimage,Image.orimageandImage.eorimagefor analogues of the usual set difference and set union operations.Operations are performed using the processor's vector unit, if possible. Disable this with
--vips-novectororVIPS_NOVECTORorvector_set_enabled.- Parameters:
mask- Input matrix imagemorph-VipsOperationMorphologyMorphological operation to performargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
mosaic
public VImage mosaic(VImage sec, VipsDirection direction, int xref, int yref, int xsec, int ysec, VipsOption... args) throws VipsError This operation joins two images left-right (with
refon the left) or top-bottom (withrefabove) given an approximate overlap.secis positioned so that the pixel (@xsec,ysec) inseclies on top of the pixel (@xref,yref) inref. The overlap area is divided into three sections, 20 high-contrast points in bandbandnoof imagerefare found in each, and a window of pixels of sizehwindowaround each high-contrast point is searched for insecover an area ofharea.A linear model is fitted to the 60 tie-points, points a long way from the fit are discarded, and the model refitted until either too few points remain or the model reaches good agreement.
The detected displacement is used with
merge(app.photofox.vipsffm.VImage, app.photofox.vipsffm.enums.VipsDirection, int, int, app.photofox.vipsffm.VipsOption...)to join the two images together.You can read out the detected transform with
dx0,dy0,scale1,angle1,dx1,dy1.See also:
merge(app.photofox.vipsffm.VImage, app.photofox.vipsffm.enums.VipsDirection, int, int, app.photofox.vipsffm.VipsOption...),insert(app.photofox.vipsffm.VImage, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
sec- Secondary imagedirection-VipsDirectionHorizontal or vertical mosaicxref- Position of reference tie-pointyref- Position of reference tie-pointxsec- Position of secondary tie-pointysec- Position of secondary tie-pointargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- hwindow
VipsOption.IntHalf window size, hareaVipsOption.IntHalf area size, mblendVipsOption.IntMaximum blend size, bandnoVipsOption.IntBand to search for features on, dx0VipsOption.IntDetected integer offset, dy0VipsOption.IntDetected integer offset, scale1VipsOption.DoubleDetected scale, angle1VipsOption.DoubleDetected rotation, dy1VipsOption.DoubleDetected first-order displacement, dx1VipsOption.DoubleDetected first-order displacement
-
mosaic1
public VImage mosaic1(VImage sec, VipsDirection direction, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, VipsOption... args) throws VipsError This operation joins two images top-bottom (with
secon the right) or left-right (withsecat the bottom) given an approximate pair of tie-points.secis scaled and rotated as necessary before the join.If
searchisTRUE, before performing the transformation, the tie-points are improved by searching an area ofsecof sizehareafor a object of sizehwindowinref.mblendlimits the maximum size of the blend area. A value of "-1" means "unlimited". The two images are blended with a raised cosine.Pixels with all bands equal to zero are "transparent", that is, zero pixels in the overlap area do not contribute to the merge. This makes it possible to join non-rectangular images.
If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.
The two input images are cast up to the smallest common type (see table Smallest common format in arithmetic).
See also:
merge(app.photofox.vipsffm.VImage, app.photofox.vipsffm.enums.VipsDirection, int, int, app.photofox.vipsffm.VipsOption...),insert(app.photofox.vipsffm.VImage, int, int, app.photofox.vipsffm.VipsOption...),globalbalance(app.photofox.vipsffm.VipsOption...)- Parameters:
sec- Secondary imagedirection-VipsDirectionHorizontal or vertical mosaicxr1- Position of first reference tie-pointyr1- Position of first reference tie-pointxs1- Position of first secondary tie-pointys1- Position of first secondary tie-pointxr2- Position of second reference tie-pointyr2- Position of second reference tie-pointxs2- Position of second secondary tie-pointys2- Position of second secondary tie-pointargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- hwindow
VipsOption.IntHalf window size, hareaVipsOption.IntHalf area size, searchVipsOption.BooleanSearch to improve tie-points, interpolateVipsOption.InterpolateInterpolate pixels with this, mblendVipsOption.IntMaximum blend size, bandnoVipsOption.IntBand to search for features on
-
msb
Turn any integer image to 8-bit unsigned char by discarding all but the most significant byte. Signed values are converted to unsigned by adding 128.
Use
bandto make a one-band 8-bit image.This operator also works for LABQ coding.
See also:
scale(app.photofox.vipsffm.VipsOption...),cast(app.photofox.vipsffm.enums.VipsBandFormat, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- band
VipsOption.IntBand to msb
-
multiply
This operation calculates
left*rightand writes the result toout.If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.
If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.
The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), then the following table is used to determine the output type:
multiply(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)type promotioninput type output type uchar ushort char short ushort uint short int uint uint int int float float double double complex complex double complex double complex In other words, the output type is just large enough to hold the whole range of possible values.
See also:
add(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...),linear(java.util.List<java.lang.Double>, java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)- Parameters:
right- Right-hand image argumentargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
openexrload
Read a OpenEXR file into a VIPS image.
The reader can handle scanline and tiled OpenEXR images. It can't handle OpenEXR colour management, image attributes, many pixel formats, anything other than RGBA.
This reader uses the rather limited OpenEXR C API. It should really be redone in C++.
See also:
Image.new_from_file- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- flags
VipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
openslideload
public static VImage openslideload(Arena arena, String filename, VipsOption... args) throws VipsError Read a virtual slide supported by the OpenSlide library into a VIPS image. OpenSlide supports images in Aperio, Hamamatsu, MIRAX, Sakura, Trestle, and Ventana formats.
To facilitate zooming, virtual slide formats include multiple scaled-down versions of the high-resolution image. These are typically called "levels". By default,
openslideload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)reads the highest-resolution level (level 0). Setlevelto the level number you want.In addition to the slide image itself, virtual slide formats sometimes include additional images, such as a scan of the slide's barcode. OpenSlide calls these "associated images". To read an associated image, set
associatedto the image's name. A slide's associated images are listed in the "slide-associated-images" metadata item.If you set
attach_associated, then all associated images are attached as metadata items. UseImage.get_imageonoutto retrieve them. Images are attached as "openslide-associated-XXXXX", where XXXXX is the name of the associated image.By default, the output of this operator is RGBA. Set
rgbto enable RGB output.See also:
Image.new_from_file- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- level
VipsOption.IntLoad this level from the file, autocropVipsOption.BooleanCrop to image bounds, associatedVipsOption.StringLoad this associated image, attach-associatedVipsOption.BooleanAttach all associated images, rgbVipsOption.BooleanOutput RGB (not RGBA), flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
openslideloadSource
public static VImage openslideloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly asopenslideload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- level
VipsOption.IntLoad this level from the file, autocropVipsOption.BooleanCrop to image bounds, associatedVipsOption.StringLoad this associated image, attach-associatedVipsOption.BooleanAttach all associated images, rgbVipsOption.BooleanOutput RGB (not RGBA), flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
pdfload
Render a PDF file into a VIPS image.
The output image is always RGBA -- CMYK PDFs will be converted. If you need CMYK bitmaps, you should use
magickload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)instead.Use
pageto select a page to render, numbering from zero.Use
nto select the number of pages to render. The default is 1. Pages are rendered in a vertical column, with each individual page aligned to the left. Set to -1 to mean "until the end of the document". Usegrid(int, int, int, app.photofox.vipsffm.VipsOption...)to change page layout.Use
dpito set the rendering resolution. The default is 72. Additionally, you can scale by settingscale. If you set both, they combine.Use
backgroundto set the background RGBA colour. The default is 255 (solid white), use eg. 0 for a transparent background.Use
passwordto supply a decryption password.The operation fills a number of header fields with metadata, for example "pdf-author". They may be useful.
This function only reads the image header and does not render any pixel data. Rendering occurs when pixels are accessed.
See also:
Image.new_from_file,magickload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, dpiVipsOption.DoubleDPI to render at, scaleVipsOption.DoubleFactor to scale by, backgroundVipsOption.ArrayDoubleBackground colour, passwordVipsOption.StringPassword to decrypt with, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
pdfloadBuffer
Read a PDF-formatted memory buffer into a VIPS image. Exactly as
pdfload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from memory.You must not free the buffer while
outis active. TheObject::postclosesignal onoutis a good place to free.See also:
pdfload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationbuffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, dpiVipsOption.DoubleDPI to render at, scaleVipsOption.DoubleFactor to scale by, backgroundVipsOption.ArrayDoubleBackground colour, passwordVipsOption.StringPassword to decrypt with, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
pdfloadSource
public static VImage pdfloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly as
pdfload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
pdfload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, dpiVipsOption.DoubleDPI to render at, scaleVipsOption.DoubleFactor to scale by, backgroundVipsOption.ArrayDoubleBackground colour, passwordVipsOption.StringPassword to decrypt with, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
percent
percent(double, app.photofox.vipsffm.VipsOption...)returns (through thethresholdparameter) the threshold below which there arepercentvalues ofin. For example:$ vips percent k2.jpg 90 214Means that 90% of pixels in
k2.jpghave a value less than 214.The function works for uchar and ushort images only. It can be used to threshold the scaled result of a filtering operation.
See also:
histFind(app.photofox.vipsffm.VipsOption...),profile(app.photofox.vipsffm.VipsOption...)- Parameters:
percent- Percent of pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
perlin
public static VImage perlin(Arena arena, int width, int height, VipsOption... args) throws VipsError Create a one-band float image of Perlin noise.
Use
cell_sizeto set the size of the cells from which the image is constructed. The default is 256 x 256.If
widthandheightare multiples ofcell_size, the image will tessellate.Normally, output pixels are
VipsBandFormat.FORMAT_FLOATin the range [-1, +1]. Setucharto output a uchar image with pixels in [0, 255].See also:
worley(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...),fractsurf(java.lang.foreign.Arena, int, int, double, app.photofox.vipsffm.VipsOption...),gaussnoise(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- cell-size
VipsOption.IntSize of Perlin cells, ucharVipsOption.BooleanOutput an unsigned char image, seedVipsOption.IntRandom number seed
-
phasecor
Convert the two input images to Fourier space, calculate phase-correlation, back to real space.
See also:
fwfft(app.photofox.vipsffm.VipsOption...),Image.cross_phase- Parameters:
in2- Second input imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
pngload
Read a PNG file into a VIPS image. It can read all png images, including 8- and 16-bit images, 1 and 3 channel, with and without an alpha channel.
Any ICC profile is read and attached to the VIPS image. It also supports XMP metadata.
Use
fail_onto set the type of error that will cause load to fail. By default, loaders are permissive, that is,VipsFailOn.FAIL_ON_NONE.By default, the PNG loader limits the number of text and data chunks to block some denial of service attacks. Set
unlimitedto disable these limits.See also:
Image.new_from_file- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- unlimited
VipsOption.BooleanRemove all denial of service limits, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
pngloadBuffer
Exactly as
pngload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a PNG-formatted memory block.You must not free the buffer while
outis active. TheObject::postclosesignal onoutis a good place to free.See also:
pngload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationbuffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- unlimited
VipsOption.BooleanRemove all denial of service limits, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
pngloadSource
public static VImage pngloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly as
pngload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
pngload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- unlimited
VipsOption.BooleanRemove all denial of service limits, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
pngsave
Write a VIPS image to a file as PNG.
compressionmeans compress with this much effort (0 - 9). Default 6.Set
interlacetoTRUEto interlace the image with ADAM7 interlacing. Beware than an interlaced PNG can be up to 7 times slower to write than a non-interlaced image.Use
filterto specify one or more filters, defaults to none, seeForeignPngFilter.The image is automatically converted to RGB, RGBA, Monochrome or Mono + alpha before saving. Images with more than one byte per band element are saved as 16-bit PNG, others are saved as 8-bit PNG.
Set
palettetoTRUEto enable palette mode for RGB or RGBA images. A palette will be computed with enough space forbitdepth(1, 2, 4 or 8) bits. UseQto set the optimisation effort,ditherto set the degree of Floyd-Steinberg dithering andeffortto control the CPU effort (1 is the fastest, 10 is the slowest, 7 is the default). This feature requires libvips to be compiled with libimagequant.The default
bitdepthis either 8 or 16 depending on the interpretation. You can also setbitdepthfor mono and mono + alpha images, and the image will be quantized.XMP metadata is written to the XMP chunk. PNG comments are written to separate text chunks.
See also:
Image.new_from_file- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- compression
VipsOption.IntCompression factor, interlaceVipsOption.BooleanInterlace image, filterVipsOption.IntLibspng row filter flag(s), paletteVipsOption.BooleanQuantise to 8bpp palette, coloursVipsOption.IntMax number of palette colours, QVipsOption.IntQuantisation quality, ditherVipsOption.DoubleAmount of dithering, bitdepthVipsOption.IntWrite as a 1, 2, 4, 8 or 16 bit image, effortVipsOption.IntQuantisation CPU effort, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
pngsaveBuffer
As
pngsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.The address of the buffer is returned in
buf, the length of the buffer inlen. You are responsible for freeing the buffer withGLib.freewhen you are done with it.See also:
pngsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_file- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- compression
VipsOption.IntCompression factor, interlaceVipsOption.BooleanInterlace image, filterVipsOption.IntLibspng row filter flag(s), paletteVipsOption.BooleanQuantise to 8bpp palette, coloursVipsOption.IntMax number of palette colours, QVipsOption.IntQuantisation quality, ditherVipsOption.DoubleAmount of dithering, bitdepthVipsOption.IntWrite as a 1, 2, 4, 8 or 16 bit image, effortVipsOption.IntQuantisation CPU effort, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
pngsaveTarget
As
pngsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.See also:
pngsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_target- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- compression
VipsOption.IntCompression factor, interlaceVipsOption.BooleanInterlace image, filterVipsOption.IntLibspng row filter flag(s), paletteVipsOption.BooleanQuantise to 8bpp palette, coloursVipsOption.IntMax number of palette colours, QVipsOption.IntQuantisation quality, ditherVipsOption.DoubleAmount of dithering, bitdepthVipsOption.IntWrite as a 1, 2, 4, 8 or 16 bit image, effortVipsOption.IntQuantisation CPU effort, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
ppmload
Read a PPM/PBM/PGM/PFM file into a VIPS image.
It can read 1, 8, 16 and 32 bit images, colour or monochrome, stored in binary or in ASCII. One bit images become 8 bit VIPS images, with 0 and 255 for 0 and 1.
See also:
Image.new_from_file- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- flags
VipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
ppmloadBuffer
Exactly as
ppmload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a memory source.See also:
ppmload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationbuffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- flags
VipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
ppmloadSource
public static VImage ppmloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly as
ppmload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
ppmload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- flags
VipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
ppmsave
Write a VIPS image to a file as PPM.
It can write 1, 8, 16 or 32 bit unsigned integer images, float images, colour or monochrome, stored as binary or ASCII. Integer images of more than 8 bits can only be stored in ASCII.
When writing float (PFM) images the scale factor is set from the "pfm-scale" metadata.
Set
asciitoTRUEto write as human-readable ASCII. Normally data is written in binary.Set
bitdepthto 1 to write a one-bit image.formatdefaults to the sub-type for this filename suffix.See also:
Image.write_to_file- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- format
VipsOption.EnumVipsForeignPpmFormatFormat to save in, asciiVipsOption.BooleanSave as ascii, squashVipsOption.BooleanSave as one bit, bitdepthVipsOption.IntSet to 1 to write as a 1 bit image, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
ppmsaveTarget
As
ppmsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.See also:
ppmsave(java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- format
VipsOption.EnumVipsForeignPpmFormatFormat to save in, asciiVipsOption.BooleanSave as ascii, squashVipsOption.BooleanSave as one bit, bitdepthVipsOption.IntSet to 1 to write as a 1 bit image, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
premultiply
Premultiplies any alpha channel.
The final band is taken to be the alpha and the bands are transformed as:
alpha = clip(0, in[in.bands - 1], max_alpha) norm = alpha / max_alpha out = [in[0] * norm, ..., in[in.bands - 1] * norm, alpha]So for an N-band image, the first N - 1 bands are multiplied by the clipped and normalised final band, the final band is clipped. If there is only a single band, the image is passed through unaltered.
The result is
VipsBandFormat.FORMAT_FLOATunless the input format isVipsBandFormat.FORMAT_DOUBLE, in which case the output is double as well.max_alphahas the default value 255, or 65535 for images tagged asVipsInterpretation.INTERPRETATION_RGB16orVipsInterpretation.INTERPRETATION_GREY16, and 1.0 for images tagged asVipsInterpretation.INTERPRETATION_scRGB.Non-complex images only.
See also:
unpremultiply(app.photofox.vipsffm.VipsOption...),flatten(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- max-alpha
VipsOption.DoubleMaximum value of alpha channel
-
prewitt
Prewitt edge detector.
uchar images are computed using a fast, low-precision path. Cast to float for a high-precision implementation.
See also:
canny(app.photofox.vipsffm.VipsOption...),sobel(app.photofox.vipsffm.VipsOption...),prewitt(app.photofox.vipsffm.VipsOption...),scharr(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
profile
profile(app.photofox.vipsffm.VipsOption...)searches inward from the edge ofinand finds the first non-zero pixel. Pixels incolumnshave the distance from the top edge to the first non-zero pixel in that column,rowshas the distance from the left edge to the first non-zero pixel in that row.See also:
project(app.photofox.vipsffm.VipsOption...),histFind(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
project
Find the horizontal and vertical projections of an image, ie. the sum of every row of pixels, and the sum of every column of pixels. The output format is uint, int or double, depending on the input format.
Non-complex images only.
See also:
histFind(app.photofox.vipsffm.VipsOption...),profile(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
quadratic
Transform an image with a 0, 1, 2, or 3rd order polynomial.
The transform we compute:
x = x' + a : order 0 image shift only + b x' + c y' : order 1 + affine transf. + d x' y' : order 2 + bilinear transf. + e x' x' + f y' y' : order 3 + quadratic transf. y = y' + g + h y' + i x' + j y' x' + k y' y' + l x' x'where:
x', y' = coordinates of srcim x, y = coordinates of dstim a .. l = coefficientsThe coefficients are in the input matrix, ordered as:
a g -- b h c i -- d j -- e k f lThe matrix height may be 1, 3, 4, 6
See also:
affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)- Parameters:
coeff- Coefficient matrixargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- interpolate
VipsOption.InterpolateInterpolate values with this
-
rad2float
Unpack a RAD (
VipsCoding.CODING_RAD) image to a three-band float image.See also:
float2rad(app.photofox.vipsffm.VipsOption...),LabQ2LabS(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
radload
Read a Radiance (HDR) file into a VIPS image.
Radiance files are read as
VipsCoding.CODING_RAD. They have one byte for each of red, green and blue, and one byte of shared exponent. Some operations (likeextractArea(int, int, int, int, app.photofox.vipsffm.VipsOption...)) can work directly with images in this format, but mmany (all the arithmetic operations, for example) will not. UnpackVipsCoding.CODING_RADimages to 3 band float withrad2float(app.photofox.vipsffm.VipsOption...)if you want to do arithmetic on them.This operation ignores some header fields, like VIEW and DATE. It will not rotate/flip as the FORMAT string asks.
Sections of this reader from Greg Ward and Radiance with kind permission.
See also:
Image.new_from_file- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- flags
VipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
radloadBuffer
Exactly as
radload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a HDR-formatted memory block.You must not free the buffer while
outis active. TheObject::postclosesignal onoutis a good place to free.See also:
radload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationbuffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- flags
VipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
radloadSource
public static VImage radloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly as
radload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
radload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- flags
VipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
radsave
Write a VIPS image in Radiance (HDR) format.
Sections of this reader from Greg Ward and Radiance with kind permission.
See also:
Image.write_to_file- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- keep
VipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
radsaveBuffer
As
radsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.The address of the buffer is returned in
buf, the length of the buffer inlen. You are responsible for freeing the buffer withGLib.freewhen you are done with it.See also:
radsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_file- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- keep
VipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
radsaveTarget
As
radsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.See also:
radsave(java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- keep
VipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
rank
rank(int, int, int, app.photofox.vipsffm.VipsOption...)does rank filtering on an image. A window of sizewidthbyheightis passed over the image. At each position, the pixels inside the window are sorted into ascending order and the pixel at positionindexis output.indexnumbers from 0.It works for any non-complex image type, with any number of bands. The input is expanded by copying edge pixels before performing the operation so that the output image has the same size as the input. Edge pixels in the output image are therefore only approximate.
For a median filter with mask size m (3 for 3x3, 5 for 5x5, etc.) use
vips_rank(in, out, m, m, m * m / 2);The special cases n == 0 and n == m * m - 1 are useful dilate and expand operators.
See also:
conv(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...),Image.median,spcor(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
width- Window width in pixelsheight- Window height in pixelsindex- Select pixel at indexargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
rawload
public static VImage rawload(Arena arena, String filename, int width, int height, int bands, VipsOption... args) throws VipsError This operation mmaps the file, setting up
outso that access to that image will read from the file.By default, it assumes uchar pixels. Use
formatto select something else.The image will be tagged as
VipsInterpretation.INTERPRETATION_MULTIBAND. Useinterpretationto select something else.Use
byteswap(app.photofox.vipsffm.VipsOption...)to reverse the byte ordering if necessary.See also:
Image.new_from_file,copy(app.photofox.vipsffm.VipsOption...),byteswap(app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromwidth- Image width in pixelsheight- Image height in pixelsbands- Number of bands in imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- offset
VipsOption.LongOffset in bytes from start of file, formatVipsOption.EnumVipsBandFormatPixel format in image, interpretationVipsOption.EnumVipsInterpretationPixel interpretation, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
rawsave
Writes the pixels in
into the filefilenamewith no header or other metadata.See also:
Image.write_to_file- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- keep
VipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
rawsaveBuffer
As
rawsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.The address of the buffer is returned in
buf, the length of the buffer inlen. You are responsible for freeing the buffer withGLib.freewhen you are done with it.See also:
rawsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_memory,Image.write_to_file- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- keep
VipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
rawsaveTarget
As
rawsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.See also:
rawsave(java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- keep
VipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
recomb
This operation recombines an image's bands. Each pixel in
inis treated as an n-element vector, where n is the number of bands inin, and multiplied by the n x m matrixmto produce the m-band imageout.outis always float, unlessinis double, in which caseoutis double too. No complex images allowed.It's useful for various sorts of colour space conversions.
- Parameters:
m- Matrix of coefficientsargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
reduce
public VImage reduce(double xshrink, double hshrink, double yshrink, double vshrink, VipsOption... args) throws VipsError Reduce
inby a pair of factors with a pair of 1D kernels.This will not work well for shrink factors greater than three.
Set
gapto speed up reducing by havingshrink(double, double, double, double, app.photofox.vipsffm.VipsOption...)to shrink with a box filter first. The biggergap, the closer the result to the fair resampling. The smallergap, the faster resizing. The default value is 0.0 (no optimization).This is a very low-level operation: see
resize(double, app.photofox.vipsffm.VipsOption...)for a more convenient way to resize images.This operation does not change xres or yres. The image resolution needs to be updated by the application.
See also:
shrink(double, double, double, double, app.photofox.vipsffm.VipsOption...),resize(double, app.photofox.vipsffm.VipsOption...),affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)- Parameters:
xshrink- Horizontal shrink factorhshrink- Horizontal shrink factoryshrink- Vertical shrink factorvshrink- Vertical shrink factorargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- kernel
VipsOption.EnumVipsKernelResampling kernel, gapVipsOption.DoubleReducing gap, centreVipsOption.BooleanUse centre sampling convention
-
reduceh
Reduce
inhorizontally by a float factor.The pixels in
outare interpolated with a 1D mask generated bykernel.Set
gapto speed up reducing by havingshrinkh(int, int, app.photofox.vipsffm.VipsOption...)to shrink with a box filter first. The biggergap, the closer the result to the fair resampling. The smallergap, the faster resizing. The default value is 0.0 (no optimization).This is a very low-level operation: see
resize(double, app.photofox.vipsffm.VipsOption...)for a more convenient way to resize images.This operation does not change xres or yres. The image resolution needs to be updated by the application.
See also:
shrink(double, double, double, double, app.photofox.vipsffm.VipsOption...),resize(double, app.photofox.vipsffm.VipsOption...),affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)- Parameters:
xshrink- Horizontal shrink factorhshrink- Horizontal shrink factorargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- kernel
VipsOption.EnumVipsKernelResampling kernel, gapVipsOption.DoubleReducing gap, centreVipsOption.BooleanUse centre sampling convention
-
reducev
Reduce
invertically by a float factor.The pixels in
outare interpolated with a 1D mask generated bykernel.Set
gapto speed up reducing by havingshrinkv(int, int, app.photofox.vipsffm.VipsOption...)to shrink with a box filter first. The biggergap, the closer the result to the fair resampling. The smallergap, the faster resizing. The default value is 0.0 (no optimization).This is a very low-level operation: see
resize(double, app.photofox.vipsffm.VipsOption...)for a more convenient way to resize images.This operation does not change xres or yres. The image resolution needs to be updated by the application.
See also:
shrink(double, double, double, double, app.photofox.vipsffm.VipsOption...),resize(double, app.photofox.vipsffm.VipsOption...),affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)- Parameters:
yshrink- Vertical shrink factorvshrink- Vertical shrink factorargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- kernel
VipsOption.EnumVipsKernelResampling kernel, gapVipsOption.DoubleReducing gap, centreVipsOption.BooleanUse centre sampling convention
-
relational
public VImage relational(VImage right, VipsOperationRelational relational, VipsOption... args) throws VipsError Perform various relational operations on pairs of images.
The output type is always uchar, with 0 for
FALSEand 255 forTRUE.Less-than and greater-than for complex images compare the modulus.
If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.
If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.
The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic).
To decide if pixels match exactly, that is have the same value in every band, use
bandbool(app.photofox.vipsffm.enums.VipsOperationBoolean, app.photofox.vipsffm.VipsOption...)after this operation to AND or OR image bands together.See also:
boolean1(app.photofox.vipsffm.VImage, app.photofox.vipsffm.enums.VipsOperationBoolean, app.photofox.vipsffm.VipsOption...),bandbool(app.photofox.vipsffm.enums.VipsOperationBoolean, app.photofox.vipsffm.VipsOption...),relationalConst(app.photofox.vipsffm.enums.VipsOperationRelational, java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)- Parameters:
right- Right-hand image argumentrelational-VipsOperationRelationalRelational to performargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
relationalConst
public VImage relationalConst(VipsOperationRelational relational, List<Double> c, VipsOption... args) throws VipsError Perform various relational operations on an image and an array of constants.
The output type is always uchar, with 0 for
FALSEand 255 forTRUE.If the array of constants has just one element, that constant is used for all image bands. If the array has more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element.
See also:
boolean1(app.photofox.vipsffm.VImage, app.photofox.vipsffm.enums.VipsOperationBoolean, app.photofox.vipsffm.VipsOption...),relational(app.photofox.vipsffm.VImage, app.photofox.vipsffm.enums.VipsOperationRelational, app.photofox.vipsffm.VipsOption...)- Parameters:
relational-VipsOperationRelationalRelational to performc- Array of constantsargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
remainder
This operation calculates
left%right(remainder after integer division) and writes the result toout. The images may have any non-complex format. For float formats,remainder(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)calculatesin1-in2* floor (@in1 /in2).If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.
If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.
The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), and that format is the result type.
See also:
remainderConst(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...),divide(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...),round(app.photofox.vipsffm.enums.VipsOperationRound, app.photofox.vipsffm.VipsOption...)- Parameters:
right- Right-hand image argumentargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
remainderConst
This operation calculates
in%c(remainder after division by an array of constants) and writes the result toout. The image may have any non-complex format. For float formats,remainderConst(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)calculatesin-c* floor (@in /c).If the array of constants has just one element, that constant is used for all image bands. If the array has more than one element and they have the same number of elements as there are bands in the image, then one array element is used for each band. If the arrays have more than one element and the image only has a single band, the result is a many-band image where each band corresponds to one array element.
See also:
remainder(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...),divide(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...),round(app.photofox.vipsffm.enums.VipsOperationRound, app.photofox.vipsffm.VipsOption...)- Parameters:
c- Array of constantsargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
remosaic
remosaic(java.lang.String, java.lang.String, app.photofox.vipsffm.VipsOption...)works rather asglobalbalance(app.photofox.vipsffm.VipsOption...). It takes apart the mosaiced imageinand rebuilds it, substituting images.Unlike
globalbalance(app.photofox.vipsffm.VipsOption...), images are substituted based on their filenames. The rightmost occurrence of the stringold_stris swapped fornew_str, that file is opened, and that image substituted for the old image.It's convenient for multispectral images. You can mosaic one band, then use that mosaic as a template for mosaicing the others automatically.
- Parameters:
oldStr- Search for this stringnewStr- And swap for this stringargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
replicate
Repeats an image many times.
See also:
extractArea(int, int, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
across- Repeat this many times horizontallydown- Repeat this many times verticallyargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
resize
Resize an image.
Set
gapto speed up downsizing by havingshrink(double, double, double, double, app.photofox.vipsffm.VipsOption...)to shrink with a box filter first. The biggergap, the closer the result to the fair resampling. The smallergap, the faster resizing. The default value is 2.0 (very close to fair resampling while still being faster in many cases).resize(double, app.photofox.vipsffm.VipsOption...)normally usesVipsKernel.KERNEL_LANCZOS3for the final reduce, you can change this withkernel. Downsizing is done with centre convention.When upsizing (@scale > 1), the operation uses
affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)with aInterpolateselected depending onkernel. It will useInterpolate"bicubic" forVipsKernel.KERNEL_CUBICand above. It adds a 0.5 pixel displacement to the input pixels to get centre convention scaling.resize(double, app.photofox.vipsffm.VipsOption...)normally maintains the image aspect ratio. If you setvscale, that factor is used for the vertical scale andscalefor the horizontal.If either axis would drop below 1px in size, the shrink in that dimension is limited. This breaks the image aspect ratio, but prevents errors due to fractional pixel sizes.
This operation does not change xres or yres. The image resolution needs to be updated by the application.
This operation does not premultiply alpha. If your image has an alpha channel, you should use
premultiply(app.photofox.vipsffm.VipsOption...)on it first.See also:
premultiply(app.photofox.vipsffm.VipsOption...),shrink(double, double, double, double, app.photofox.vipsffm.VipsOption...),reduce(double, double, double, double, app.photofox.vipsffm.VipsOption...)- Parameters:
scale- Scale image by this factorargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- interpolate
VipsOption.InterpolateInterpolate pixels with this, kernelVipsOption.EnumVipsKernelResampling kernel, gapVipsOption.DoubleReducing gap, centreVipsOption.BooleanUse centre sampling convention, vscaleVipsOption.DoubleVertical scale image by this factor, idxVipsOption.DoubleHorizontal input displacement, idyVipsOption.DoubleVertical input displacement
-
rot
Rotate
inby a multiple of 90 degrees.Use
similarity(app.photofox.vipsffm.VipsOption...)to rotate by an arbitrary angle.rot45(app.photofox.vipsffm.VipsOption...)is useful for rotating convolution masks by 45 degrees.See also:
flip(app.photofox.vipsffm.enums.VipsDirection, app.photofox.vipsffm.VipsOption...),similarity(app.photofox.vipsffm.VipsOption...),rot45(app.photofox.vipsffm.VipsOption...) -
rot45
Rotate
inby a multiple of 45 degrees. Odd-length sides and square images only.This operation is useful for rotating convolution masks. Use
similarity(app.photofox.vipsffm.VipsOption...)to rotate images by arbitrary angles.See also:
rot(app.photofox.vipsffm.enums.VipsAngle, app.photofox.vipsffm.VipsOption...),similarity(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- angle
VipsOption.EnumVipsAngle45Angle to rotate image
-
rotate
This operator calls
affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)for you, calculating the matrix for the affine transform fromscaleandangle.Other parameters are passed on to
affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)unaltered.See also:
affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...),Interpolate- Parameters:
angle- Rotate clockwise by this many degreesargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- interpolate
VipsOption.InterpolateInterpolate pixels with this, backgroundVipsOption.ArrayDoubleBackground value, odxVipsOption.DoubleHorizontal output displacement, odyVipsOption.DoubleVertical output displacement, idxVipsOption.DoubleHorizontal input displacement, idyVipsOption.DoubleVertical input displacement
-
round
Round to an integral value.
Copy for integer types, round float and complex types.
The format of
outis always the same asin, so you may wish to cast to an integer format afterwards.See also:
cast(app.photofox.vipsffm.enums.VipsBandFormat, app.photofox.vipsffm.VipsOption...)- Parameters:
round-VipsOperationRoundRounding operation to performargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
sRGB2HSV
Convert to HSV.
HSV is a crude polar coordinate system for RGB images. It is provided for compatibility with other image processing systems. See
Lab2LCh(app.photofox.vipsffm.VipsOption...)for a much better colour space.See also:
HSV2sRGB(app.photofox.vipsffm.VipsOption...),Lab2LCh(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
sRGB2scRGB
Convert an sRGB image to scRGB.
RGB16 images are also handled.
See also:
scRGB2XYZ(app.photofox.vipsffm.VipsOption...),scRGB2sRGB(app.photofox.vipsffm.VipsOption...),rad2float(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
scRGB2BW
Convert an scRGB image to greyscale. Set
depthto 16 to get 16-bit output.See also:
LabS2LabQ(app.photofox.vipsffm.VipsOption...),sRGB2scRGB(app.photofox.vipsffm.VipsOption...),rad2float(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- depth
VipsOption.IntOutput device space depth in bits
-
scRGB2XYZ
Turn XYZ to scRGB.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
scRGB2sRGB
Convert an scRGB image to sRGB. Set
depthto 16 to get 16-bit output.See also:
LabS2LabQ(app.photofox.vipsffm.VipsOption...),sRGB2scRGB(app.photofox.vipsffm.VipsOption...),rad2float(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- depth
VipsOption.IntOutput device space depth in bits
-
scale
Search the image for the maximum and minimum value, then return the image as unsigned 8-bit, scaled so that the maximum value is 255 and the minimum is zero.
If
logis set, transform with log10(1.0 + pow(x,exp)) + .5, then scale so max == 255. By default,expis 0.25.See also:
cast(app.photofox.vipsffm.enums.VipsBandFormat, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- exp
VipsOption.DoubleExponent for log scale, logVipsOption.BooleanLog scale
-
scharr
Scharr edge detector.
uchar images are computed using a fast, low-precision path. Cast to float for a high-precision implementation.
See also:
canny(app.photofox.vipsffm.VipsOption...),sobel(app.photofox.vipsffm.VipsOption...),prewitt(app.photofox.vipsffm.VipsOption...),scharr(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
sdf
public static VImage sdf(Arena arena, int width, int height, VipsSdfShape shape, VipsOption... args) throws VipsError Create a signed distance field (SDF) image of the given
shape.Different shapes use different combinations of the optional arguments, see below.
shapeVipsSdfShape.SDF_SHAPE_CIRCLE: create a circle centred ona, radiusr.shapeVipsSdfShape.SDF_SHAPE_BOX: create a box with top-left corneraand bottom-right cornerb.shapeVips.SdfShape.ROUNDED_BOX: create a box with top-left corneraand bottom-right cornerb, whose four corners are rounded by the four-element float arraycorners.cornerswill default to 0.0.shapeVipsSdfShape.SDF_SHAPE_LINE: draw a line fromatob.See also:
grey(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...),grid(int, int, int, app.photofox.vipsffm.VipsOption...),xyz(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsshape-VipsSdfShapeSDF shape to createargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- r
VipsOption.DoubleRadius, aVipsOption.ArrayDoublePoint a, bVipsOption.ArrayDoublePoint b, cornersVipsOption.ArrayDoubleCorner radii
-
sequential
This operation behaves rather like
copy(app.photofox.vipsffm.VipsOption...)between imagesinandout, except that it checks that pixels oninare only requested top-to-bottom. This operation is useful for loading file formats which are strictly top-to-bottom, like PNG.tile_heightcan be used to set the size of the tiles thatsequential(app.photofox.vipsffm.VipsOption...)uses. The default value is 1.See also:
linecache(app.photofox.vipsffm.VipsOption...),tilecache(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- trace
VipsOption.BooleanTrace pixel requests, tile-heightVipsOption.IntTile height in pixels, accessVipsOption.EnumVipsAccessExpected access pattern
-
sharpen
Selectively sharpen the L channel of a LAB image. The input image is transformed to
VipsInterpretation.INTERPRETATION_LABS.The operation performs a gaussian blur and subtracts from
into generate a high-frequency signal. This signal is passed through a lookup table formed from the five parameters and added back toin.The lookup table is formed like this:
^ y2 |- - - - - ----------- | / | / slope m2 | .../ -x1 | ... | -------------------...----------------------> | ... | x1 |... slope m1 / | / m2 | / | / | / | / | ______/ _ _ _ _ _ _ | -y3 |For screen output, we suggest the following settings (the defaults):
sigma == 0.5 x1 == 2 y2 == 10 (don't brighten by more than 10 L*) y3 == 20 (can darken by up to 20 L*) m1 == 0 (no sharpening in flat areas) m2 == 3 (some sharpening in jaggy areas)If you want more or less sharpening, we suggest you just change the m2 parameter.
The
sigmaparameter changes the width of the fringe and can be adjusted according to the output printing resolution. As an approximate guideline, use 0.5 for 4 pixels/mm (display resolution), 1.0 for 12 pixels/mm and 1.5 for 16 pixels/mm (300 dpi == 12 pixels/mm). These figures refer to the image raster, not the half-tone resolution.See also:
conv(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- radius
VipsOption.IntRadius of Gaussian, sigmaVipsOption.DoubleSigma of Gaussian, x1VipsOption.DoubleFlat/jaggy threshold, y2VipsOption.DoubleMaximum brightening, y3VipsOption.DoubleMaximum darkening, m1VipsOption.DoubleSlope for flat areas, m2VipsOption.DoubleSlope for jaggy areas
-
shrink
public VImage shrink(double xshrink, double hshrink, double yshrink, double vshrink, VipsOption... args) throws VipsError Shrink
inby a pair of factors with a simple box filter.For non-integer factors,
shrink(double, double, double, double, app.photofox.vipsffm.VipsOption...)will first shrink by the integer part with a box filter, then usereduce(double, double, double, double, app.photofox.vipsffm.VipsOption...)to shrink by the remaining fractional part.This is a very low-level operation: see
resize(double, app.photofox.vipsffm.VipsOption...)for a more convenient way to resize images.This operation does not change xres or yres. The image resolution needs to be updated by the application.
See also:
resize(double, app.photofox.vipsffm.VipsOption...),reduce(double, double, double, double, app.photofox.vipsffm.VipsOption...)- Parameters:
xshrink- Horizontal shrink factorhshrink- Horizontal shrink factoryshrink- Vertical shrink factorvshrink- Vertical shrink factorargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- ceil
VipsOption.BooleanRound-up output dimensions
-
shrinkh
Shrink
inhorizontally by an integer factor. Each pixel in the output is the average of the corresponding line ofhshrinkpixels in the input.This is a very low-level operation: see
resize(double, app.photofox.vipsffm.VipsOption...)for a more convenient way to resize images.This operation does not change xres or yres. The image resolution needs to be updated by the application.
See also:
shrinkv(int, int, app.photofox.vipsffm.VipsOption...),shrink(double, double, double, double, app.photofox.vipsffm.VipsOption...),resize(double, app.photofox.vipsffm.VipsOption...),affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)- Parameters:
xshrink- Horizontal shrink factorhshrink- Horizontal shrink factorargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- ceil
VipsOption.BooleanRound-up output dimensions
-
shrinkv
Shrink
invertically by an integer factor.Each pixel in the output is the average of the corresponding column of
vshrinkpixels in the input.This is a very low-level operation: see
resize(double, app.photofox.vipsffm.VipsOption...)for a more convenient way to resize images.This operation does not change xres or yres. The image resolution needs to be updated by the application.
See also:
shrinkh(int, int, app.photofox.vipsffm.VipsOption...),shrink(double, double, double, double, app.photofox.vipsffm.VipsOption...),resize(double, app.photofox.vipsffm.VipsOption...),affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)- Parameters:
yshrink- Vertical shrink factorvshrink- Vertical shrink factorargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- ceil
VipsOption.BooleanRound-up output dimensions
-
sign
Finds the unit vector in the direction of the pixel value. For non-complex images, it returns a signed char image with values -1, 0, and 1 for negative, zero and positive pixels. For complex images, it returns a complex normalised to length 1.
See also:
abs(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
similarity
This operator calls
affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)for you, calculating the matrix for the affine transform fromscaleandangle. Other parameters are passed on toaffine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)unaltered.See also:
affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...),Interpolate- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- scale
VipsOption.DoubleScale by this factor, angleVipsOption.DoubleRotate clockwise by this many degrees, interpolateVipsOption.InterpolateInterpolate pixels with this, backgroundVipsOption.ArrayDoubleBackground value, odxVipsOption.DoubleHorizontal output displacement, odyVipsOption.DoubleVertical output displacement, idxVipsOption.DoubleHorizontal input displacement, idyVipsOption.DoubleVertical input displacement
-
sines
Creates a float one band image of the a sine waveform in two dimensions.
The number of horizontal and vertical spatial frequencies are determined by the variables
hfreqandvfreqrespectively. The function is useful for creating displayable sine waves and square waves in two dimensions.If horfreq and verfreq are integers the resultant image is periodical and therefore the Fourier transform does not present spikes
Pixels are normally in [-1, +1], set
ucharto output [0, 255].See also:
grey(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...),xyz(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- uchar
VipsOption.BooleanOutput an unsigned char image, hfreqVipsOption.DoubleHorizontal spatial frequency, vfreqVipsOption.DoubleVertical spatial frequency
-
smartcrop
Crop an image down to a specified width and height by removing boring parts.
Use
interestingto pick the method vips uses to decide which bits of the image should be kept.You can test xoffset / yoffset on
outto find the location of the crop within the input image.See also:
extractArea(int, int, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
width- Width of extract areaheight- Height of extract areaargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- attention-x
VipsOption.IntHorizontal position of attention centre, attention-yVipsOption.IntVertical position of attention centre, interestingVipsOption.EnumVipsInterestingHow to measure interestingness, premultipliedVipsOption.BooleanInput image already has premultiplied alpha
-
sobel
Sobel edge detector.
uchar images are computed using a fast, low-precision path. Cast to float for a high-precision implementation.
See also:
canny(app.photofox.vipsffm.VipsOption...),sobel(app.photofox.vipsffm.VipsOption...),prewitt(app.photofox.vipsffm.VipsOption...),scharr(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
spcor
Calculate a correlation surface.
refis placed at every position ininand the correlation coefficient calculated. The output image is always float.The output image is the same size as the input. Extra input edge pixels are made by copying the existing edges outwards.
The correlation coefficient is calculated as:
sumij (ref(i,j)-mean(ref))(inkl(i,j)-mean(inkl)) c(k,l) = ------------------------------------------------ sqrt(sumij (ref(i,j)-mean(ref))^2) * sqrt(sumij (inkl(i,j)-mean(inkl))^2)where inkl is the area of
incentred at position (k,l).from Niblack "An Introduction to Digital Image Processing", Prentice/Hall, pp 138.
If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.
The output image is always float, unless either of the two inputs is double, in which case the output is also double.
See also:
fastcor(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
ref- Input reference imageargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
spectrum
Make a displayable (ie. 8-bit unsigned int) power spectrum.
If
inis non-complex, it is transformed to Fourier space. Then the absolute value is passed throughscale(app.photofox.vipsffm.VipsOption...)in log mode, andwrap(app.photofox.vipsffm.VipsOption...).See also:
fwfft(app.photofox.vipsffm.VipsOption...),scale(app.photofox.vipsffm.VipsOption...),wrap(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
stats
Find many image statistics in a single pass through the data.
outis a one-bandVipsBandFormat.FORMAT_DOUBLEimage of at least 10 columns by n + 1 (where n is number of bands in imagein) rows. Columns are statistics, and are, in order: minimum, maximum, sum, sum of squares, mean, standard deviation, x coordinate of minimum, y coordinate of minimum, x coordinate of maximum, y coordinate of maximum. Later versions ofstats(app.photofox.vipsffm.VipsOption...)may add more columns.Row 0 has statistics for all bands together, row 1 has stats for band 1, and so on.
If there is more than one maxima or minima, one of them will be chosen at random.
See also:
avg(app.photofox.vipsffm.VipsOption...),min(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
stdif
stdif(int, int, app.photofox.vipsffm.VipsOption...)performs statistical differencing according to the formula given in page 45 of the book "An Introduction to Digital Image Processing" by Wayne Niblack.This transformation emphasises the way in which a pel differs statistically from its neighbours. It is useful for enhancing low-contrast images with lots of detail, such as X-ray plates.
At point (i,j) the output is given by the equation:
vout(i,j) = `a` * `m0` + (1 - `a`) * meanv + (vin(i,j) - meanv) * (@b * `s0`) / (@s0 + `b` * stdv)Values
a,m0,bands0are entered, while meanv and stdv are the values calculated over a moving window of sizewidth,heightcentred on pixel (i,j).m0is the new mean,ais the weight given to it.s0is the new standard deviation,bis the weight given to it.Try:
vips stdif $VIPSHOME/pics/huysum.v fred.v 0.5 128 0.5 50 11 11The operation works on one-band uchar images only, and writes a one-band uchar image as its result. The output image has the same size as the input.
See also:
histLocal(int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
width- Window width in pixelsheight- Window height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- s0
VipsOption.DoubleNew deviation, bVipsOption.DoubleWeight of new deviation, m0VipsOption.DoubleNew mean, aVipsOption.DoubleWeight of new mean
-
subsample
Subsample an image by an integer fraction. This is fast, nearest-neighbour shrink.
For small horizontal shrinks, this operation will fetch lines of pixels from
inand then subsample that line. For large shrinks it will fetch single pixels.If
pointis set,inwill always be sampled in points. This can be faster if the previous operations in the pipeline are very slow.See also:
affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...),shrink(double, double, double, double, app.photofox.vipsffm.VipsOption...),zoom(int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
xfac- Horizontal subsample factoryfac- Vertical subsample factorargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- point
VipsOption.BooleanPoint sample
-
subtract
This operation calculates
in1-in2and writes the result toout.If the images differ in size, the smaller image is enlarged to match the larger by adding zero pixels along the bottom and right.
If the number of bands differs, one of the images must have one band. In this case, an n-band image is formed from the one-band image by joining n copies of the one-band image together, and then the two n-band images are operated upon.
The two input images are cast up to the smallest common format (see table Smallest common format in arithmetic), then the following table is used to determine the output type:
subtract(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)type promotioninput type output type uchar short char short ushort int short int uint int int int float float double double complex complex double complex double complex In other words, the output type is just large enough to hold the whole range of possible values.
See also:
add(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...),linear(java.util.List<java.lang.Double>, java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)- Parameters:
right- Right-hand image argumentargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
sum
This operation sums all images in
inand writes the result toout.If the images differ in size, the smaller images are enlarged to match the largest by adding zero pixels along the bottom and right.
If the number of bands differs, all but one of the images must have one band. In this case, n-band images are formed from the one-band images by joining n copies of the one-band images together, and then the n-band images are operated upon.
The input images are cast up to the smallest common format (see table Smallest common format in arithmetic), then the following table is used to determine the output type:
sum(java.lang.foreign.Arena, java.util.List<app.photofox.vipsffm.VImage>, app.photofox.vipsffm.VipsOption...)type promotioninput type output type uchar uint char int ushort uint short int uint uint int int float float double double complex complex double complex double complex In other words, the output type is just large enough to hold the whole range of possible values.
See also:
add(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationin- Array of input imagesargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
svgload
Render a SVG file into a VIPS image.
Rendering uses the librsvg library and should be fast.
Use
dpito set the rendering resolution. The default is 72. Additionally, you can scale by settingscale. If you set both, they combine.This function only reads the image header and does not render any pixel data. Rendering occurs when pixels are accessed.
SVGs larger than 10MB are normally blocked for security. Set
unlimitedto allow SVGs of any size.A UTF-8 string containing custom CSS can be provided via
stylesheet. During the CSS cascade, the specified stylesheet will be applied with a User Origin. This feature requires librsvg 2.48.0 or later.If
high_bitdepthis set and the version of cairo supports it (e.g. cairo >= 1.17.2), enable 128-bit scRGB output (32-bit per channel).See also:
Image.new_from_file- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- dpi
VipsOption.DoubleRender at this DPI, scaleVipsOption.DoubleScale output by this factor, unlimitedVipsOption.BooleanAllow SVG of any size, stylesheetVipsOption.StringCustom CSS, high-bitdepthVipsOption.BooleanEnable scRGB 128-bit output (32-bit per channel), flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
svgloadBuffer
Read a SVG-formatted memory block into a VIPS image. Exactly as
svgload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a memory buffer.You must not free the buffer while
outis active. TheObject::postclosesignal onoutis a good place to free.See also:
svgload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationbuffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- dpi
VipsOption.DoubleRender at this DPI, scaleVipsOption.DoubleScale output by this factor, unlimitedVipsOption.BooleanAllow SVG of any size, stylesheetVipsOption.StringCustom CSS, high-bitdepthVipsOption.BooleanEnable scRGB 128-bit output (32-bit per channel), flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
svgloadSource
public static VImage svgloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly as
svgload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
svgload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- dpi
VipsOption.DoubleRender at this DPI, scaleVipsOption.DoubleScale output by this factor, unlimitedVipsOption.BooleanAllow SVG of any size, stylesheetVipsOption.StringCustom CSS, high-bitdepthVipsOption.BooleanEnable scRGB 128-bit output (32-bit per channel), flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
switch1
The
testsimages are evaluated and at each point the index of the first non-zero value is written toout. If alltestsare false, the value (@n + 1) is written.Images in
testsmust have one band. They are expanded to the bounding box of the set of images intests, and that size is used forout.testscan have up to 255 elements.Combine with
case1(java.util.List<app.photofox.vipsffm.VImage>, app.photofox.vipsffm.VipsOption...)to make an efficient multi-wayifthenelse(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...).See also:
maplut(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...),case1(java.util.List<app.photofox.vipsffm.VImage>, app.photofox.vipsffm.VipsOption...),ifthenelse(app.photofox.vipsffm.VImage, app.photofox.vipsffm.VImage, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationtests- Table of images to testargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
text
Draw the string
textto an image.outis normally a one-band 8-bit unsigned char image, with 0 for no text and 255 for text. Values between are used for anti-aliasing.Set
rgbato enable RGBA output. This is useful for colour emoji rendering, or support for pango markup features like<span foreground="red">Red!</span>.textis the text to render as a UTF-8 string. It can contain Pango markup, for example<i>The</i>Guardian.fontis the font to render with, as a fontconfig name. Examples might besans 12or perhapsbitstream charter bold 10.You can specify a font to load with
fontfile. You'll need to also set the name of the font withfont.widthis the number of pixels to word-wrap at. By default, lines of text wider than this will be broken at word boundaries. Usewrapto set lines to wrap on word or character boundaries, or to disable line breaks.Set
justifyto turn on line justification.aligncan be used to set the alignment style for multi-line text to the low (left) edge centre, or high (right) edge. Note that the output image can be wider thanwidthif there are no word breaks, or narrower if the lines don't break exactly atwidth.heightis the maximum number of pixels high the generated text can be. This only takes effect whendpiis not set, andwidthis set, making a box. In this case,text(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)will search for adpiand set of line breaks which will just fit the text intowidthandheight.You can use
autofit_dpito read out the DPI selected by auto fit.dpisets the resolution to render at. "sans 12" at 72 dpi draws characters approximately 12 pixels high.spacingsets the line spacing, in points. It would typically be something like font size times 1.2.You can read the coordinate of the top edge of the character from
Xoffset/Yoffset. This can be helpful if you need to line up the output of severaltext(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...).See also:
bandjoin(java.lang.foreign.Arena, java.util.List<app.photofox.vipsffm.VImage>, app.photofox.vipsffm.VipsOption...),composite(java.lang.foreign.Arena, java.util.List<app.photofox.vipsffm.VImage>, java.util.List<java.lang.Integer>, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationtext- Text to renderargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- font
VipsOption.StringFont to render with, widthVipsOption.IntMaximum image width in pixels, heightVipsOption.IntMaximum image height in pixels, alignVipsOption.EnumVipsAlignAlign on the low, centre or high edge, justifyVipsOption.BooleanJustify lines, dpiVipsOption.IntDPI to render at, autofit-dpiVipsOption.IntDPI selected by autofit, spacingVipsOption.IntLine spacing, fontfileVipsOption.StringLoad this font file, rgbaVipsOption.BooleanEnable RGBA output, wrapVipsOption.EnumVipsTextWrapWrap lines on word or character boundaries
-
thumbnail
public static VImage thumbnail(Arena arena, String filename, int width, VipsOption... args) throws VipsError Make a thumbnail from a file.
Shrinking is done in three stages: using any shrink-on-load features available in the image load library, using a block shrink, and using a lanczos3 shrink. At least the final 200% is done with lanczos3. The output should be high quality, and the operation should be quick.
See
thumbnailBuffer(java.lang.foreign.Arena, app.photofox.vipsffm.VBlob, int, app.photofox.vipsffm.VipsOption...)to thumbnail from a memory buffer, orthumbnailSource(java.lang.foreign.Arena, app.photofox.vipsffm.VSource, int, app.photofox.vipsffm.VipsOption...)to thumbnail from an arbitrary byte source.By default, libvips will only use the first frame of animated or multipage images. To thumbnail all pages or frames, pass
n=-1to the loader infilename, for example"x.gif[n=-1]".The output image will fit within a square of size
widthxwidth. You can specify a separate height with theheightoption. Set eitherwidthorheightto a very large number to ignore that dimension.If you set
crop, then the output image will fill the whole of thewidthxheightrectangle, with any excess cropped away. Seesmartcrop(int, int, app.photofox.vipsffm.VipsOption...)for details on the cropping strategy.Normally the operation will upsize or downsize as required to fit the image inside or outside the target size. If
sizeis set toVipsSize.SIZE_UP, the operation will only upsize and will just copy if asked to downsize. Ifsizeis set toVipsSize.SIZE_DOWN, the operation will only downsize and will just copy if asked to upsize. IfsizeisVipsSize.SIZE_FORCE, the image aspect ratio will be broken and the image will be forced to fit the target.Normally any orientation tags on the input image (such as EXIF tags) are interpreted to rotate the image upright. If you set
no_rotatetoTRUE, these tags will not be interpreted.Shrinking is normally done in sRGB colourspace. Set
linearto shrink in linear light colourspace instead. This can give better results, but can also be far slower, since tricks like JPEG shrink-on-load cannot be used in linear space.If you set
output_profileto the filename of an ICC profile, the image will be transformed to the target colourspace before writing to the output. You can also give aninput_profilewhich will be used if the input image has no ICC profile, or if the profile embedded in the input image is broken.Use
intentto set the rendering intent for any ICC transform. The default isVipsIntent.INTENT_RELATIVE.Use
fail_onto control the types of error that will cause loading to fail. The default isVipsFailOn.FAIL_ON_NONE, ie. thumbnail is permissive.- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to read fromwidth- Size to this widthargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- height
VipsOption.IntSize to this height, sizeVipsOption.EnumVipsSizeOnly upsize, only downsize, or both, no-rotateVipsOption.BooleanDon't use orientation tags to rotate image upright, cropVipsOption.EnumVipsInterestingReduce to fill target rectangle, then crop, linearVipsOption.BooleanReduce in linear light, input-profileVipsOption.StringFallback input profile, output-profileVipsOption.StringFallback output profile, intentVipsOption.EnumVipsIntentRendering intent, fail-onVipsOption.EnumVipsFailOnError level to fail on, auto-rotateVipsOption.BooleanUse orientation tags to rotate image upright, import-profileVipsOption.StringFallback import profile, export-profileVipsOption.StringFallback export profile
-
thumbnailBuffer
public static VImage thumbnailBuffer(Arena arena, VBlob buffer, int width, VipsOption... args) throws VipsError Exactly as
thumbnail(java.lang.foreign.Arena, java.lang.String, int, app.photofox.vipsffm.VipsOption...), but read from a memory buffer.One extra optional argument,
option_string, lets you pass options to the underlying loader.See also:
thumbnail(java.lang.foreign.Arena, java.lang.String, int, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationbuffer- Buffer to load fromwidth- Size to this widthargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- option-string
VipsOption.StringOptions that are passed on to the underlying loader, heightVipsOption.IntSize to this height, sizeVipsOption.EnumVipsSizeOnly upsize, only downsize, or both, no-rotateVipsOption.BooleanDon't use orientation tags to rotate image upright, cropVipsOption.EnumVipsInterestingReduce to fill target rectangle, then crop, linearVipsOption.BooleanReduce in linear light, input-profileVipsOption.StringFallback input profile, output-profileVipsOption.StringFallback output profile, intentVipsOption.EnumVipsIntentRendering intent, fail-onVipsOption.EnumVipsFailOnError level to fail on, auto-rotateVipsOption.BooleanUse orientation tags to rotate image upright, import-profileVipsOption.StringFallback import profile, export-profileVipsOption.StringFallback export profile
-
thumbnailImage
Exactly as
thumbnail(java.lang.foreign.Arena, java.lang.String, int, app.photofox.vipsffm.VipsOption...), but read from an existing image.This operation is not able to exploit shrink-on-load features of image load libraries, so it can be much slower than
thumbnail(java.lang.foreign.Arena, java.lang.String, int, app.photofox.vipsffm.VipsOption...)and produce poorer quality output. Only use this operation if you really have to.See also:
thumbnail(java.lang.foreign.Arena, java.lang.String, int, app.photofox.vipsffm.VipsOption...)- Parameters:
width- Size to this widthargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- height
VipsOption.IntSize to this height, sizeVipsOption.EnumVipsSizeOnly upsize, only downsize, or both, no-rotateVipsOption.BooleanDon't use orientation tags to rotate image upright, cropVipsOption.EnumVipsInterestingReduce to fill target rectangle, then crop, linearVipsOption.BooleanReduce in linear light, input-profileVipsOption.StringFallback input profile, output-profileVipsOption.StringFallback output profile, intentVipsOption.EnumVipsIntentRendering intent, fail-onVipsOption.EnumVipsFailOnError level to fail on, auto-rotateVipsOption.BooleanUse orientation tags to rotate image upright, import-profileVipsOption.StringFallback import profile, export-profileVipsOption.StringFallback export profile
-
thumbnailSource
public static VImage thumbnailSource(Arena arena, VSource source, int width, VipsOption... args) throws VipsError Exactly as
thumbnail(java.lang.foreign.Arena, java.lang.String, int, app.photofox.vipsffm.VipsOption...), but read from a source.One extra optional argument,
option_string, lets you pass options to the underlying loader.See also:
thumbnail(java.lang.foreign.Arena, java.lang.String, int, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromwidth- Size to this widthargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- option-string
VipsOption.StringOptions that are passed on to the underlying loader, heightVipsOption.IntSize to this height, sizeVipsOption.EnumVipsSizeOnly upsize, only downsize, or both, no-rotateVipsOption.BooleanDon't use orientation tags to rotate image upright, cropVipsOption.EnumVipsInterestingReduce to fill target rectangle, then crop, linearVipsOption.BooleanReduce in linear light, input-profileVipsOption.StringFallback input profile, output-profileVipsOption.StringFallback output profile, intentVipsOption.EnumVipsIntentRendering intent, fail-onVipsOption.EnumVipsFailOnError level to fail on, auto-rotateVipsOption.BooleanUse orientation tags to rotate image upright, import-profileVipsOption.StringFallback import profile, export-profileVipsOption.StringFallback export profile
-
tiffload
Read a TIFF file into a VIPS image.
It is a full baseline TIFF 6 reader, with extensions for tiled images, multipage images, XYZ and LAB colour space, pyramidal images and JPEG compression, including CMYK and YCbCr.
pagemeans load this page from the file. By default the first page (page 0) is read.nmeans load this many pages. By default a single page is read. All the pages must have the same dimensions, and they are loaded as a tall, thin "toilet roll" image. TheMETA_PAGE_HEIGHTmetadata tag gives the height in pixels of each page. Use -1 to load all pages.Setting
autorotatetoTRUEwill make the loader interpret the orientation tag and automatically rotate the image appropriately during load.If
autorotateisFALSE, the metadata fieldMETA_ORIENTATIONis set to the value of the orientation tag. Applications may read and interpret this field as they wish later in processing. Seeautorot(app.photofox.vipsffm.VipsOption...). Save operations will useMETA_ORIENTATION, if present, to set the orientation of output images.If
autorotateisTRUE, the image will be rotated upright during load and no metadata attached. This can be very slow.If
subifdis -1 (the default), the main image is selected for each page. If it is 0 or greater and there is a SUBIFD tag, the indexed SUBIFD is selected. This can be used to read lower resolution layers from bioformats-style image pyramids.Use
fail_onto set the type of error that will cause load to fail. By default, loaders are permissive, that is,VipsFailOn.FAIL_ON_NONE.When using libtiff 4.7.0+, the TIFF loader will limit memory allocation for decoding each input file to 50MB to prevent denial of service attacks. Set
unlimitedto remove this limit.Any ICC profile is read and attached to the VIPS image as
META_ICC_NAME. Any XMP metadata is read and attached to the image asMETA_XMP_NAME. Any IPTC is attached asMETA_IPTC_NAME. The image description is attached asMETA_IMAGEDESCRIPTION. Data in the photoshop tag is attached asMETA_PHOTOSHOP_NAME.See also:
Image.new_from_file,autorot(app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, autorotateVipsOption.BooleanRotate image using orientation tag, subifdVipsOption.IntSubifd index, unlimitedVipsOption.BooleanRemove all denial of service limits, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
tiffloadBuffer
Read a TIFF-formatted memory block into a VIPS image. Exactly as
tiffload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a memory source.You must not free the buffer while
outis active. TheObject::postclosesignal onoutis a good place to free.See also:
tiffload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationbuffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, autorotateVipsOption.BooleanRotate image using orientation tag, subifdVipsOption.IntSubifd index, unlimitedVipsOption.BooleanRemove all denial of service limits, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
tiffloadSource
public static VImage tiffloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly as
tiffload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
tiffload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, autorotateVipsOption.BooleanRotate image using orientation tag, subifdVipsOption.IntSubifd index, unlimitedVipsOption.BooleanRemove all denial of service limits, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
tiffsave
Write a VIPS image to a file as TIFF.
If
inhas theMETA_PAGE_HEIGHTmetadata item, this is assumed to be a "toilet roll" image. It will be written as series of pages, eachMETA_PAGE_HEIGHTpixels high.Use
compressionto set the tiff compression. Currently jpeg, packbits, fax4, lzw, none, deflate, webp and zstd are supported. The default is no compression. JPEG compression is a good lossy compressor for photographs, packbits is good for 1-bit images, and deflate is the best lossless compression TIFF can do.XYZ images are automatically saved as libtiff LOGLUV with SGILOG compression. Float LAB images are saved as float CIELAB. Set
bitdepthto save as 8-bit CIELAB.Use
Qto set the JPEG compression factor. Default 75.User
levelto set the ZSTD (1-22) or Deflate (1-9) compression level. Uselosslessto set WEBP lossless mode on. UseQto set the WEBP compression level.Use
predictorto set the predictor for lzw, deflate and zstd compression. It defaults toVipsForeignTiffPredictor.FOREIGN_TIFF_PREDICTOR_HORIZONTAL, meaning horizontal differencing. Please refer to the libtiff specifications for further discussion of various predictors.Set
tiletoTRUEto write a tiled tiff. By default tiff are written in strips. Usetile_widthandtile_heightto set the tile size. The defaiult is 128 by 128.Set
pyramidto write the image as a set of images, one per page, of decreasing size. Useregion_shrinkto set how images will be shrunk: by default each 2x2 block is just averaged, but you can set MODE or MEDIAN as well.By default, the pyramid stops when the image is small enough to fit in one tile. Use
depthto stop when the image fits in one pixel, or to only write a single layer.Set
bitdepthto save 8-bit uchar images as 1, 2 or 4-bit TIFFs. In case of depth 1: Values >128 are written as white, values <=128 as black. Normally vips will write MINISBLACK TIFFs where black is a 0 bit, but if you setminiswhite, it will use 0 for a white bit. Many pre-press applications only work with images which use this sense.miniswhiteonly affects one-bit images, it does nothing for greyscale images. In case of depth 2: The same holds but values < 64 are written as black. For 64 <= values < 128 they are written as dark grey, for 128 <= values < 192 they are written as light gray and values above are written as white. In caseminiswhiteis set to true this behavior is inverted. In case of depth 4: values < 16 are written as black, and so on for the lighter shades. In caseminiswhiteis set to true this behavior is inverted.Use
resunitto override the default resolution unit. The default resolution unit is taken from the header fieldMETA_RESOLUTION_UNIT. If this field is not set, then VIPS defaults to cm.Use
xresandyresto override the default horizontal and vertical resolutions. By default these values are taken from the VIPS image header. libvips resolution is always in pixels per millimetre.Set
bigtiffto attempt to write a bigtiff. Bigtiff is a variant of the TIFF format that allows more than 4GB in a file.Set
propertiesto write all vips metadata to the IMAGEDESCRIPTION tag as xml. Ifpropertiesis not set, the value ofMETA_IMAGEDESCRIPTIONis used instead.The value of
META_XMP_NAMEis written to the XMP tag.META_ORIENTATION(if set) is used to set the value of the orientation tag.META_IPTC_NAME(if set) is used to set the value of the IPTC tag.META_PHOTOSHOP_NAME(if set) is used to set the value of the PHOTOSHOP tag.By default, pyramid layers are saved as consecutive pages. Set
subifdto save pyramid layers as sub-directories of the main image. Setting this option can improve compatibility with formats like OME.Set
premultiplyto save with premultiplied alpha. Some programs, such as InDesign, will only work with premultiplied alpha.See also:
tiffload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_file- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- compression
VipsOption.EnumVipsForeignTiffCompressionCompression for this file, QVipsOption.IntQ factor, predictorVipsOption.EnumVipsForeignTiffPredictorCompression prediction, tileVipsOption.BooleanWrite a tiled tiff, tile-widthVipsOption.IntTile width in pixels, tile-heightVipsOption.IntTile height in pixels, pyramidVipsOption.BooleanWrite a pyramidal tiff, miniswhiteVipsOption.BooleanUse 0 for white in 1-bit images, bitdepthVipsOption.IntWrite as a 1, 2, 4 or 8 bit image, resunitVipsOption.EnumVipsForeignTiffResunitResolution unit, xresVipsOption.DoubleHorizontal resolution in pixels/mm, yresVipsOption.DoubleVertical resolution in pixels/mm, bigtiffVipsOption.BooleanWrite a bigtiff image, propertiesVipsOption.BooleanWrite a properties document to IMAGEDESCRIPTION, region-shrinkVipsOption.EnumVipsRegionShrinkMethod to shrink regions, levelVipsOption.IntDeflate (1-9, default 6) or ZSTD (1-22, default 9) compression level, losslessVipsOption.BooleanEnable WEBP lossless mode, depthVipsOption.EnumVipsForeignDzDepthPyramid depth, subifdVipsOption.BooleanSave pyr layers as sub-IFDs, premultiplyVipsOption.BooleanSave with premultiplied alpha, rgbjpegVipsOption.BooleanOutput RGB JPEG rather than YCbCr, squashVipsOption.BooleanSquash images down to 1 bit, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
tiffsaveBuffer
As
tiffsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.The address of the buffer is returned in
buf, the length of the buffer inlen. You are responsible for freeing the buffer withGLib.freewhen you are done with it.See also:
tiffsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_file- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- compression
VipsOption.EnumVipsForeignTiffCompressionCompression for this file, QVipsOption.IntQ factor, predictorVipsOption.EnumVipsForeignTiffPredictorCompression prediction, tileVipsOption.BooleanWrite a tiled tiff, tile-widthVipsOption.IntTile width in pixels, tile-heightVipsOption.IntTile height in pixels, pyramidVipsOption.BooleanWrite a pyramidal tiff, miniswhiteVipsOption.BooleanUse 0 for white in 1-bit images, bitdepthVipsOption.IntWrite as a 1, 2, 4 or 8 bit image, resunitVipsOption.EnumVipsForeignTiffResunitResolution unit, xresVipsOption.DoubleHorizontal resolution in pixels/mm, yresVipsOption.DoubleVertical resolution in pixels/mm, bigtiffVipsOption.BooleanWrite a bigtiff image, propertiesVipsOption.BooleanWrite a properties document to IMAGEDESCRIPTION, region-shrinkVipsOption.EnumVipsRegionShrinkMethod to shrink regions, levelVipsOption.IntDeflate (1-9, default 6) or ZSTD (1-22, default 9) compression level, losslessVipsOption.BooleanEnable WEBP lossless mode, depthVipsOption.EnumVipsForeignDzDepthPyramid depth, subifdVipsOption.BooleanSave pyr layers as sub-IFDs, premultiplyVipsOption.BooleanSave with premultiplied alpha, rgbjpegVipsOption.BooleanOutput RGB JPEG rather than YCbCr, squashVipsOption.BooleanSquash images down to 1 bit, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
tiffsaveTarget
As
tiffsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.See also:
tiffsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_target- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- compression
VipsOption.EnumVipsForeignTiffCompressionCompression for this file, QVipsOption.IntQ factor, predictorVipsOption.EnumVipsForeignTiffPredictorCompression prediction, tileVipsOption.BooleanWrite a tiled tiff, tile-widthVipsOption.IntTile width in pixels, tile-heightVipsOption.IntTile height in pixels, pyramidVipsOption.BooleanWrite a pyramidal tiff, miniswhiteVipsOption.BooleanUse 0 for white in 1-bit images, bitdepthVipsOption.IntWrite as a 1, 2, 4 or 8 bit image, resunitVipsOption.EnumVipsForeignTiffResunitResolution unit, xresVipsOption.DoubleHorizontal resolution in pixels/mm, yresVipsOption.DoubleVertical resolution in pixels/mm, bigtiffVipsOption.BooleanWrite a bigtiff image, propertiesVipsOption.BooleanWrite a properties document to IMAGEDESCRIPTION, region-shrinkVipsOption.EnumVipsRegionShrinkMethod to shrink regions, levelVipsOption.IntDeflate (1-9, default 6) or ZSTD (1-22, default 9) compression level, losslessVipsOption.BooleanEnable WEBP lossless mode, depthVipsOption.EnumVipsForeignDzDepthPyramid depth, subifdVipsOption.BooleanSave pyr layers as sub-IFDs, premultiplyVipsOption.BooleanSave with premultiplied alpha, rgbjpegVipsOption.BooleanOutput RGB JPEG rather than YCbCr, squashVipsOption.BooleanSquash images down to 1 bit, keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
tilecache
This operation behaves rather like
copy(app.photofox.vipsffm.VipsOption...)between imagesinandout, except that it keeps a cache of computed pixels. This cache is made of up tomax_tilestiles (a value of -1 means any number of tiles), and each tile is of sizetile_widthbytile_heightpixels.Each cache tile is made with a single call to
Region.prepare.When the cache fills, a tile is chosen for reuse. If
accessisVipsAccess.ACCESS_RANDOM, then the least-recently-used tile is reused. IfaccessisVipsAccess.ACCESS_SEQUENTIALthe top-most tile is reused.By default,
tile_widthandtile_heightare 128 pixels, and the operation will cache up to 1,000 tiles.accessdefaults toVipsAccess.ACCESS_RANDOM.Normally, only a single thread at once is allowed to calculate tiles. If you set
threadedtoTRUE,tilecache(app.photofox.vipsffm.VipsOption...)will allow many threads to calculate tiles at once, and share the cache between them.Normally the cache is dropped when computation finishes. Set
persistenttoTRUEto keep the cache between computations.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- tile-width
VipsOption.IntTile width in pixels, tile-heightVipsOption.IntTile height in pixels, max-tilesVipsOption.IntMaximum number of tiles to cache, accessVipsOption.EnumVipsAccessExpected access pattern, threadedVipsOption.BooleanAllow threaded access, persistentVipsOption.BooleanKeep cache between evaluations
-
tonelut
tonelut(java.lang.foreign.Arena, app.photofox.vipsffm.VipsOption...)generates a tone curve for the adjustment of image levels.This is mostly designed for adjusting the L* part of a LAB image in a way suitable for print work, but you can use it for other things too.
The curve is an unsigned 16-bit image with (@in_max + 1) entries, each in the range [0,
out_max].Lb,Lware expressed as 0-100, as in LAB colour space. You specify the scaling for the input and output images with thein_maxandout_maxparameters.- Parameters:
arena- The arena that bounds resulting memory allocations during this operationargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- in-max
VipsOption.IntSize of LUT to build, out-maxVipsOption.IntMaximum value in output LUT, LbVipsOption.DoubleLowest value in output, LwVipsOption.DoubleHighest value in output, PsVipsOption.DoublePosition of shadow, PmVipsOption.DoublePosition of mid-tones, PhVipsOption.DoublePosition of highlights, SVipsOption.DoubleAdjust shadows by this much, MVipsOption.DoubleAdjust mid-tones by this much, HVipsOption.DoubleAdjust highlights by this much
-
transpose3d
Transpose a volumetric image.
Volumetric images are very tall, thin images, with the metadata item
META_PAGE_HEIGHTset to the height of each sub-image.This operation swaps the two major dimensions, so that page N in the output contains the Nth scanline, in order, from each input page.
You can override the
META_PAGE_HEIGHTmetadata item with the optionalpage_heightparameter.META_PAGE_HEIGHTin the output image is the number of pages in the input image.See also:
grid(int, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page-height
VipsOption.IntHeight of each input page
-
unpremultiply
Unpremultiplies any alpha channel.
Band
alpha_band(by default the final band) contains the alpha and all other bands are transformed as:alpha = (int) clip(0, in[in.bands - 1], max_alpha); norm = (double) alpha / max_alpha if (alpha == 0) out = [0, ..., 0, alpha] else out = [in[0] / norm, ..., in[in.bands - 1] / norm, alpha]So for an N-band image, the first N - 1 bands are divided by the clipped and normalised final band, the final band is clipped. If there is only a single band, the image is passed through unaltered.
The result is
VipsBandFormat.FORMAT_FLOATunless the input format isVipsBandFormat.FORMAT_DOUBLE, in which case the output is double as well.max_alphahas the default value 255, or 65535 for images tagged asVipsInterpretation.INTERPRETATION_RGB16orVipsInterpretation.INTERPRETATION_GREY16, and 1.0 for images tagged as [[email protected].Non-complex images only.
See also:
premultiply(app.photofox.vipsffm.VipsOption...),flatten(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- max-alpha
VipsOption.DoubleMaximum value of alpha channel, alpha-bandVipsOption.IntUnpremultiply with this alpha
-
vipsload
Read in a vips image.
See also:
vipssave(java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- flags
VipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
vipsloadSource
public static VImage vipsloadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly asvipsload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- flags
VipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
vipssave
Write
intofilenamein VIPS format.See also:
vipsload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- keep
VipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
vipssaveTarget
Asvipssave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- keep
VipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
webpload
Read a WebP file into a VIPS image.
Use
pageto select a page to render, numbering from zero.Use
nto select the number of pages to render. The default is 1. Pages are rendered in a vertical column, with each individual page aligned to the left. Set to -1 to mean "until the end of the document". Usegrid(int, int, int, app.photofox.vipsffm.VipsOption...)to change page layout.Use
scaleto specify a scale-on-load factor. For example, 2.0 to double the size on load. Animated webp images don't support shrink-on-load, so a further resize may be necessary.The loader supports ICC, EXIF and XMP metadata.
See also:
Image.new_from_file- Parameters:
arena- The arena that bounds resulting memory allocations during this operationfilename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, scaleVipsOption.DoubleFactor to scale by, shrinkVipsOption.IntShrink factor on load, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
webploadBuffer
Read a WebP-formatted memory block into a VIPS image. Exactly as
webpload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a memory buffer.You must not free the buffer while
outis active. TheObject::postclosesignal onoutis a good place to free.See also:
webpload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationbuffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, scaleVipsOption.DoubleFactor to scale by, shrinkVipsOption.IntShrink factor on load, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
webploadSource
public static VImage webploadSource(Arena arena, VSource source, VipsOption... args) throws VipsError Exactly as
webpload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
webpload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationsource- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- page
VipsOption.IntFirst page to load, nVipsOption.IntNumber of pages to load, -1 for all, scaleVipsOption.DoubleFactor to scale by, shrinkVipsOption.IntShrink factor on load, flagsVipsOption.IntFlags for this file, memoryVipsOption.BooleanForce open via memory, accessVipsOption.EnumVipsAccessRequired access pattern for this file, fail-onVipsOption.EnumVipsFailOnError level to fail on, revalidateVipsOption.BooleanDon't use a cached result for this operation, sequentialVipsOption.BooleanSequential read only, failVipsOption.BooleanFail on first warning, discVipsOption.BooleanOpen to disc
-
webpsave
Write an image to a file in WebP format.
By default, images are saved in lossy format, with
Qgiving the WebP quality factor. It has the range 0 - 100, with the default 75.Use
presetto hint the image type to the lossy compressor. The default isVipsForeignWebpPreset.FOREIGN_WEBP_PRESET_DEFAULT.Set
smart_subsampleto enable high quality chroma subsampling.Set
smart_deblockto enable auto-adjusting of the deblocking filter. This can improve image quality, especially on low-contrast edges, but encoding can take significantly longer.Use
alpha_qto set the quality for the alpha channel in lossy mode. It has the range 1 - 100, with the default 100.Use
effortto control how much CPU time to spend attempting to reduce file size. A higher value means more effort and therefore CPU time should be spent. It has the range 0-6 and a default value of 4.Use
target_sizeto set the desired target size in bytes.Use
passesto set the number of entropy-analysis passes, by default 1, unlesstarget_sizeis set, in which case the default is 3. It is not recommended to setpassesunless you settarget_size. Doing so will result in longer encoding times for no benefit.Set
losslessto use lossless compression, or combinenear_losslesswithQ80, 60, 40 or 20 to apply increasing amounts of preprocessing which improves the near-lossless compression ratio by up to 50%.For animated webp output,
min_sizewill try to optimize for minimum size.For animated webp output,
kmaxsets the maximum number of frames between keyframes. Setting 0 means only keyframes.kminsets the minimum number of frames between frames. Setting 0 means no keyframes. By default, keyframes are disabled.For animated webp output,
mixedtries to improve the file size by mixing both lossy and lossless encoding.Use the metadata items
loopanddelayto set the number of loops for the animation and the frame delays.See also:
webpload(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_file- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- Q
VipsOption.IntQ factor, losslessVipsOption.BooleanEnable lossless compression, presetVipsOption.EnumVipsForeignWebpPresetPreset for lossy compression, smart-subsampleVipsOption.BooleanEnable high quality chroma subsampling, near-losslessVipsOption.BooleanEnable preprocessing in lossless mode (uses Q), alpha-qVipsOption.IntChange alpha plane fidelity for lossy compression, min-sizeVipsOption.BooleanOptimise for minimum size, kminVipsOption.IntMinimum number of frames between key frames, kmaxVipsOption.IntMaximum number of frames between key frames, effortVipsOption.IntLevel of CPU effort to reduce file size, target-sizeVipsOption.IntDesired target size in bytes, reduction-effortVipsOption.IntLevel of CPU effort to reduce file size, mixedVipsOption.BooleanAllow mixed encoding (might reduce file size), smart-deblockVipsOption.BooleanEnable auto-adjusting of the deblocking filter, passesVipsOption.IntNumber of entropy-analysis passes (in [1..10]), keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
webpsaveBuffer
As
webpsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a memory buffer.The address of the buffer is returned in
buf, the length of the buffer inlen. You are responsible for freeing the buffer withGLib.freewhen you are done with it.See also:
webpsave(java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- Q
VipsOption.IntQ factor, losslessVipsOption.BooleanEnable lossless compression, presetVipsOption.EnumVipsForeignWebpPresetPreset for lossy compression, smart-subsampleVipsOption.BooleanEnable high quality chroma subsampling, near-losslessVipsOption.BooleanEnable preprocessing in lossless mode (uses Q), alpha-qVipsOption.IntChange alpha plane fidelity for lossy compression, min-sizeVipsOption.BooleanOptimise for minimum size, kminVipsOption.IntMinimum number of frames between key frames, kmaxVipsOption.IntMaximum number of frames between key frames, effortVipsOption.IntLevel of CPU effort to reduce file size, target-sizeVipsOption.IntDesired target size in bytes, reduction-effortVipsOption.IntLevel of CPU effort to reduce file size, mixedVipsOption.BooleanAllow mixed encoding (might reduce file size), smart-deblockVipsOption.BooleanEnable auto-adjusting of the deblocking filter, passesVipsOption.IntNumber of entropy-analysis passes (in [1..10]), keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
webpsaveMime
As
webpsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save as a mime webp on stdout.See also:
webpsave(java.lang.String, app.photofox.vipsffm.VipsOption...),Image.write_to_file- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- Q
VipsOption.IntQ factor, losslessVipsOption.BooleanEnable lossless compression, presetVipsOption.EnumVipsForeignWebpPresetPreset for lossy compression, smart-subsampleVipsOption.BooleanEnable high quality chroma subsampling, near-losslessVipsOption.BooleanEnable preprocessing in lossless mode (uses Q), alpha-qVipsOption.IntChange alpha plane fidelity for lossy compression, min-sizeVipsOption.BooleanOptimise for minimum size, kminVipsOption.IntMinimum number of frames between key frames, kmaxVipsOption.IntMaximum number of frames between key frames, effortVipsOption.IntLevel of CPU effort to reduce file size, target-sizeVipsOption.IntDesired target size in bytes, reduction-effortVipsOption.IntLevel of CPU effort to reduce file size, mixedVipsOption.BooleanAllow mixed encoding (might reduce file size), smart-deblockVipsOption.BooleanEnable auto-adjusting of the deblocking filter, passesVipsOption.IntNumber of entropy-analysis passes (in [1..10]), keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
webpsaveTarget
As
webpsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.See also:
webpsave(java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- Q
VipsOption.IntQ factor, losslessVipsOption.BooleanEnable lossless compression, presetVipsOption.EnumVipsForeignWebpPresetPreset for lossy compression, smart-subsampleVipsOption.BooleanEnable high quality chroma subsampling, near-losslessVipsOption.BooleanEnable preprocessing in lossless mode (uses Q), alpha-qVipsOption.IntChange alpha plane fidelity for lossy compression, min-sizeVipsOption.BooleanOptimise for minimum size, kminVipsOption.IntMinimum number of frames between key frames, kmaxVipsOption.IntMaximum number of frames between key frames, effortVipsOption.IntLevel of CPU effort to reduce file size, target-sizeVipsOption.IntDesired target size in bytes, reduction-effortVipsOption.IntLevel of CPU effort to reduce file size, mixedVipsOption.BooleanAllow mixed encoding (might reduce file size), smart-deblockVipsOption.BooleanEnable auto-adjusting of the deblocking filter, passesVipsOption.IntNumber of entropy-analysis passes (in [1..10]), keepVipsOption.IntWhich metadata to retain, backgroundVipsOption.ArrayDoubleBackground value, page-heightVipsOption.IntSet page height for multipage save, profileVipsOption.StringFilename of ICC profile to embed, stripVipsOption.BooleanStrip all metadata from image
-
worley
public static VImage worley(Arena arena, int width, int height, VipsOption... args) throws VipsError Create a one-band float image of Worley noise.
Use
cell_sizeto set the size of the cells from which the image is constructed. The default is 256 x 256.If
widthandheightare multiples ofcell_size, the image will tessellate.See also:
perlin(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...),fractsurf(java.lang.foreign.Arena, int, int, double, app.photofox.vipsffm.VipsOption...),gaussnoise(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- cell-size
VipsOption.IntSize of Worley cells, seedVipsOption.IntRandom number seed
-
wrap
Slice an image up and move the segments about so that the pixel that was at 0, 0 is now at
x,y.If
xandyare not set, they default to the centre of the image.See also:
embed(int, int, int, int, app.photofox.vipsffm.VipsOption...),replicate(int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- x
VipsOption.IntLeft edge of input in output, yVipsOption.IntTop edge of input in output
-
xyz
Create a two-band uint32 image where the elements in the first band have the value of their x coordinate and elements in the second band have their y coordinate.
You can make any image where the value of a pixel is a function of its (x, y) coordinate by combining this operator with the arithmetic operators.
Set
csize,dsize,esizeto generate higher dimensions and add more bands. The extra dimensions are placed down the vertical axis. Usegrid(int, int, int, app.photofox.vipsffm.VipsOption...)to change the layout.See also:
grey(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...),grid(int, int, int, app.photofox.vipsffm.VipsOption...),identity(java.lang.foreign.Arena, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- csize
VipsOption.IntSize of third dimension, dsizeVipsOption.IntSize of fourth dimension, esizeVipsOption.IntSize of fifth dimension
-
zone
Create a one-band image of a zone plate.
Pixels are normally in [-1, +1], set
ucharto output [0, 255].See also:
eye(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...),xyz(java.lang.foreign.Arena, int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
arena- The arena that bounds resulting memory allocations during this operationwidth- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- Optional arguments:
- uchar
VipsOption.BooleanOutput an unsigned char image
-
zoom
Zoom an image by repeating pixels. This is fast nearest-neighbour zoom.
See also:
affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...),subsample(int, int, app.photofox.vipsffm.VipsOption...)- Parameters:
xfac- Horizontal zoom factoryfac- Vertical zoom factorargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
getWidth
-
getHeight
-
hasAlpha
-
newFromFile
-
newFromSource
-
newFromSource
-
newFromBytes
public static VImage newFromBytes(Arena arena, byte[] bytes, String optionString, VipsOption... options) throws VipsError Creates a new VImage from raw bytes. Note that this is quite inefficient, usenewFromFile(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)and friends instead.- Throws:
VipsError
-
newFromBytes
public static VImage newFromBytes(Arena arena, byte[] bytes, VipsOption... options) throws VipsError SeenewFromBytes(java.lang.foreign.Arena, byte[], java.lang.String, app.photofox.vipsffm.VipsOption...)- Throws:
VipsError
-
newFromMemory
public static VImage newFromMemory(Arena arena, MemorySegment memorySegment, int width, int height, int bands, int format) throws VipsError Creates a new VImage from raw bytes, mapping directly to the
vips_image_new_from_memoryfunction, with some checks.This is included for narrow use cases where you have image bytes representing partially supported image formats from another library (like DICOM), and you need a way to get them in to libvips without using the built-in source loaders. Note that this uses the Java FFM
MemorySegmentAPI to avoid an unnecessary copy.This is an advanced method - if possible, use
newFromFile(java.lang.foreign.Arena, java.lang.String, app.photofox.vipsffm.VipsOption...)and friends instead. If you have bytes to load, you could usenewFromBytes(java.lang.foreign.Arena, byte[], java.lang.String, app.photofox.vipsffm.VipsOption...).- Throws:
VipsError
-
newFromStream
public static VImage newFromStream(Arena arena, InputStream stream, String optionString, VipsOption... options) throws VipsError Creates a new VImage from anInputStream. This uses libvips' "custom streaming" feature and is therefore quite efficient, avoiding the need to make extra full copies of the image's data. You could, for example, use this function to create an image directly from an API call, thumbnail it, and then upload directly to an S3-compatible API efficiently in memory - all without creating a local file.- Throws:
VipsError
-
newFromStream
public static VImage newFromStream(Arena arena, InputStream stream, VipsOption... options) throws VipsError - Throws:
VipsError
-
writeToFile
- Throws:
VipsError
-
write
-
writeToTarget
- Throws:
VipsError
-
writeToStream
public void writeToStream(OutputStream stream, String suffix, VipsOption... options) throws VipsError Writes this VImage to anOutputStream. This uses libvips' "custom streaming" feature and is therefore quite efficient, avoiding the need to make extra full copies of the image's data. You could, for example, use this function to create an image directly from an API call, thumbnail it, and then upload directly to an S3-compatible API efficiently in memory - all without creating a local file.- Throws:
VipsError
-
writeToMemory
Writes this VImage's raw pixel values to a
MemorySegment, in the following pixel order: RGBRGBRGB etc. It performs a full memory copy of the image, and so provides an image copying option that is thread-safe and independent of other VImage operations.In performance-critical scenarios where you need to avoid memory copies, and you are sure about the image's state and lifetime, prefer
VipsHelper.image_get_data(java.lang.foreign.Arena, java.lang.foreign.MemorySegment)instead.- Throws:
VipsError
-
newImage
-
getString
Helper function to get the metadata stored at
nameon this image, of typestring, ornullif not presentSee also: libvips header docs
-
set
Helper function to set the metadata stored at
nameon this image, of typestringSee also: libvips header docs
-
getInt
Helper function to get the metadata stored at
nameon this image, of typeint, ornullif not presentSee also: libvips header docs
-
set
Helper function to set the metadata stored at
nameon this image, of typeintSee also: libvips header docs
-
getDouble
Helper function to get the metadata stored at
nameon this image, of typedouble, ornullif not presentSee also: libvips header docs
-
set
Helper function to set the metadata stored at
nameon this image, of typedoubleSee also: libvips header docs
-
getBlob
Helper function to get the metadata stored at
nameon this image, of typeblob, ornullif not presentSee also: libvips header docs
-
set
Helper function to set the metadata stored at
nameon this image, of typeblobSee also: libvips header docs
-
getImage
Helper function to get the metadata stored at
nameon this image, of typeimage, ornullif not presentSee also: libvips header docs
-
set
Helper function to set the metadata stored at
nameon this image, of typeimageSee also: libvips header docs
-
getFields
Returns a list of all metadata entry names for this image
See also: libvips header docs
-
remove
Helper function to remove the metadata stored at
nameon this imageReturns false if there was no metadata entry at
nameSee also: libvips header docs
-