- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionabs(VipsOption... args) This operation finds the absolute value of an image.add(VipsOption... args) This operation calculates@in1+@in2and writes the result to .affine(List<Double> matrix, VipsOption... args) This operator performs an affine transform on an image using .analyzeload(String filename, VipsOption... args) Load an Analyze 6.0 file.arrayjoin(List<VImage> in, VipsOption... args) Lay out the images in in 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.bandjoin(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.bandrank(List<VImage> in, VipsOption... args) Sorts the images band-element-wise, then outputs an image in which each band element is selected from the sorted list by the parameter.bandunfold(VipsOption... args) Unfold image bands into x axis.black(int width, int height, VipsOption... args) Make a black unsigned char image of a specified size.boolean1(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.cache(VipsOption... args) This operation behaves rather likecopy(app.photofox.vipsffm.VipsOption...)between images and , except that it keeps a cache of computed pixels.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 in to select pixels from .cast(VipsBandFormat format, VipsOption... args) Convert to .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 of (or uses , if set) and runs a set of colourspace conversion functions to move it to .compass(VipsOption... args) This convolves with times, rotating by each time.complex(VipsOperationComplex cmplx, VipsOption... args) Perform various operations on complex images.complex2(VipsOperationComplex2 cmplx, VipsOption... args) Perform various binary operations on complex images.complexform(VipsOption... args) Compose two real images to make a complex image.complexget(VipsOperationComplexget get, VipsOption... args) Get components of complex images.Composite an array of images together.composite2(VipsBlendMode mode, VipsOption... args) Composite on top of with .conv(VipsOption... args) Convolution.conva(VipsOption... args) Perform an approximate integer convolution of with .convasep(VipsOption... args) Approximate separable integer convolution.convf(VipsOption... args) Convolution.convi(VipsOption... args) Integer convolution.convsep(VipsOption... args) Perform a separable convolution of with .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.csvload(String filename, VipsOption... args) Load a CSV (comma-separated values) file.csvloadSource(VSource source, VipsOption... args) Exactly ascsvload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.voidcsvsave(String filename, VipsOption... args) Writes the pixels in to the as CSV (comma-separated values).voidcsvsaveTarget(VTarget target, VipsOption... args) Ascsvsave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.dE00(VipsOption... args) Calculate dE 00.dE76(VipsOption... args) Calculate dE 76.dECMC(VipsOption... args) Calculate dE CMC.doubledeviate(VipsOption... args) This operation finds the standard deviation of all pixels in .divide(VipsOption... args) This operation calculates@in1/@in2and writes the result to .voiddrawCircle(List<Double> ink, int cx, int cy, int radius, VipsOption... args) Draws a circle on .voiddrawFlood(List<Double> ink, int x, int y, VipsOption... args) Flood-fill with , starting at position , .voiddrawImage(int x, int y, VipsOption... args) Draw on top of at position , .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, int x, int y, VipsOption... args) Draw on the image.voiddrawRect(List<Double> ink, int left, int top, int width, int height, VipsOption... args) Paint pixels within , , , in with .voiddrawSmudge(int left, int top, int width, int height, VipsOption... args) Smudge a section of .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 ofvips_extract_area: embed within an image of size by at position , .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.eye(int width, int height, VipsOption... args) Create a test pattern with increasing spatial frequency in X and amplitude in Y.falsecolour(VipsOption... args) Force to 1 band, 8-bit, then transform to a 3-band 8-bit image with a false colour map.fastcor(VipsOption... args) Calculate a fast correlation surface.fillNearest(VipsOption... args) Fill outwards from every non-zero pixel in , setting pixels in and@value.intfindTrim(VipsOption... args) Search for the bounding box of the non-background area.fitsload(String filename, VipsOption... args) Read a FITS image file into a VIPS image.fitsloadSource(VSource source, VipsOption... args) Load FITS from a sourcevoidfitssave(String filename, VipsOption... args) Write a VIPS image to a file in FITS format.flatten(VipsOption... args) Take the last band of as an alpha and use it to blend the remaining channels with .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.fractsurf(int width, int height, double fractalDimension, VipsOption... args) Generate an image of size by and fractal dimension .freqmult(VipsOption... args) Multiply by in Fourier space.fwfft(VipsOption... args) Transform an image to Fourier space.gamma(VipsOption... args) Calculate ** (1 / ), normalising to the maximum range of the input type.gaussblur(double sigma, VipsOption... args) This operator runsgaussmat(double, double, app.photofox.vipsffm.VipsOption...)andconvsep(app.photofox.vipsffm.VipsOption...)for you on an image.gaussmat(double sigma, double minAmpl, VipsOption... args) Creates a circularly symmetric Gaussian image of radius .gaussnoise(int width, int height, VipsOption... args) Make a one band float image of gaussian noise with the specified distribution.intgetpoint(int x, int y, VipsOption... args) Reads a single pixel on an image.Deprecated, for removal: This API element is subject to removal in a future version.Gets the rawMemorySegment(C pointer) for this VipsImage struct The memory address' lifetime is bound to the scope of thearenaUsage of the memory address is strongly discouraged, but it is available if some functionality is missing and you need to use it withVipsHelperintgetWidth()gifload(String filename, VipsOption... args) Read a GIF file into a libvips image.gifloadBuffer(VBlob buffer, VipsOption... args) Exactly asgifload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a memory buffer.gifloadSource(VSource source, VipsOption... args) Exactly asgifload(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 can be used to remove contrast differences in an assembled mosaic.gravity(VipsCompassDirection direction, int width, int height, VipsOption... args) The opposite ofvips_extract_area: place within an image of size by at a certain gravity.grey(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()heifload(String filename, VipsOption... args) Read a HEIF image file into a VIPS image.heifloadBuffer(VBlob buffer, VipsOption... args) Read a HEIF image file into a VIPS image.heifloadSource(VSource source, VipsOption... args) Exactly asheifload(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-equalise .histFind(VipsOption... args) Find the histogram of .histFindIndexed(VipsOption... args) Make a histogram of , but use image to 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) Test for monotonicity.histLocal(int width, int height, VipsOption... args) Performs local histogram equalisation on using a window of size by centered on the input pixel.histMatch(VipsOption... args) Adjust to match .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 for .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.identity(VipsOption... args) Creates an identity lookup table, ie.ifthenelse(VipsOption... args) This operation scans the condition image and uses it to select pixels from either the then image or the else image .insert(int x, int y, VipsOption... args) Insert into at position , .invert(VipsOption... args) For unsigned formats, this operation calculates (max - ), 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(VipsDirection direction, VipsOption... args) Join and together, left-right or up-down depending on the value of .jp2kload(String filename, VipsOption... args) Read a JPEG2000 image.jp2kloadBuffer(VBlob buffer, VipsOption... args) Exactly asjp2kload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a buffer.jp2kloadSource(VSource source, VipsOption... args) Exactly asjp2kload(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.jpegload(String filename, VipsOption... args) Read a JPEG file into a VIPS image.jpegloadBuffer(VBlob buffer, VipsOption... args) during loadjpegloadSource(VSource source, VipsOption... args) during loadvoidjpegsave(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.jxlload(String filename, VipsOption... args) Read a JPEG-XL image.jxlloadBuffer(VBlob buffer, VipsOption... args) Exactly asjxlload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a buffer.jxlloadSource(VSource source, VipsOption... args) Exactly asjxlload(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) Repeatedly scans for regions of 4-connected pixels with the same pixel value.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 images and , except that it keeps a cache of computed scanlines.logmat(double sigma, double minAmpl, VipsOption... args) Creates a circularly symmetric Laplacian of Gaussian mask of radius .magickload(String filename, VipsOption... args) Read in an image using libMagick, the ImageMagick library.magickloadBuffer(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(VipsOption... args) This operator resamples using to look up pixels.maplut(VipsOption... args) Map an image through another image acting as a LUT (Look Up Table).maskButterworth(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 at , where is in range 0 - 1.maskButterworthBand(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 at , , of radius .maskButterworthRing(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 at of width , where is in the range 0 - 1.maskFractal(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.maskGaussian(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 at .maskGaussianBand(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 at , , of radius .maskGaussianRing(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 at of width .maskIdeal(int width, int height, double frequencyCutoff, VipsOption... args) Make an ideal high- or low-pass filter, that is, one with a sharp cutoff positioned at , where is in the range 0 - 1.maskIdealBand(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 point , , of size .maskIdealRing(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 at of width , where and are expressed as the range 0 - 1.match(int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, VipsOption... args) Scale, rotate and translate so that the tie-points line up.math(VipsOperationMath math, VipsOption... args) Perform various functions in -lm, the maths library, on images.math2(VipsOperationMath2 math2, VipsOption... args) This operation calculates a 2-ary maths operation on a pair of images and writes the result to .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 to .matload(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 in@m.matrixload(String filename, VipsOption... args) Reads a matrix from a file.matrixloadSource(VSource source, VipsOption... args) Exactly asmatrixload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.voidmatrixprint(VipsOption... args) Print tostdoutin matrix format.voidmatrixsave(String filename, VipsOption... args) Write to in 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.measure(int h, int v, VipsOption... args) Analyse a grid of colour patches, producing an array of patch averages.merge(VipsDirection direction, int dx, int dy, VipsOption... args) This operation joins two images left-right (with on the left) or up-down (with above) with a smooth seam.doublemin(VipsOption... args) This operation finds the minimum value in an image.morph(VipsOperationMorphology morph, VipsOption... args) Performs a morphological operation on using as a structuring element.mosaic(VipsDirection direction, int xref, int yref, int xsec, int ysec, VipsOption... args) This operation joins two images left-right (with on the left) or top-bottom (with above) given an approximate overlap.mosaic1(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 (with on the right) or left-right (with at 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(VipsOption... args) This operation calculates * and writes the result to .static VImagenewFromFile(Arena arena, String path, VipsOption... options) static VImagenewFromSource(Arena arena, VSource source, String optionString, VipsOption... options) static VImageopenexrload(String filename, VipsOption... args) Read a OpenEXR file into a VIPS image.openslideload(String filename, VipsOption... args) Read a virtual slide supported by the OpenSlide library into a VIPS image.openslideloadSource(VSource source, VipsOption... args) Exactly asopenslideload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.pdfload(String filename, VipsOption... args) Render a PDF file into a VIPS image.pdfloadBuffer(VBlob buffer, VipsOption... args) Read a PDF-formatted memory buffer into a VIPS image.pdfloadSource(VSource source, VipsOption... args) Exactly aspdfload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.intpercent(double percent, VipsOption... args) percent returns (through the parameter) the threshold below which there are values of .perlin(int width, int height, VipsOption... args) Create a one-band float image of Perlin noise.phasecor(VipsOption... args) Convert the two input images to Fourier space, calculate phase-correlation, back to real space.pngload(String filename, VipsOption... args) Read a PNG file into a VIPS image.pngloadBuffer(VBlob buffer, VipsOption... args) Exactly aspngload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a PNG-formatted memory block.pngloadSource(VSource source, VipsOption... args) Exactly aspngload(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.ppmload(String filename, VipsOption... args) Read a PPM/PBM/PGM/PFM file into a VIPS image.ppmloadSource(VSource source, VipsOption... args) Exactly asppmload(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 searches inward from the edge of and finds the first non-zero pixel.project(VipsOption... args) Find the horizontal and vertical projections of an image, ie.quadratic(VipsOption... args) This operation is unfinished and unusable, sorry.rad2float(VipsOption... args) Unpack a RAD (VipsCoding.CODING_RAD) image to a three-band float image.radload(String filename, VipsOption... args) Read a Radiance (HDR) file into a VIPS image.radloadBuffer(VBlob buffer, VipsOption... args) Exactly asradload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a HDR-formatted memory block.radloadSource(VSource source, VipsOption... args) Exactly asradload(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 does rank filtering on an image.rawload(String filename, int width, int height, int bands, VipsOption... args) This operation mmaps the file, setting up so that access to that image will read from the file.voidrawsave(String filename, VipsOption... args) Writes the pixels in to the file with no header or other metadata.voidrawsaveFd(int fd, VipsOption... args) Writes the pixels in to the with no header or other metadata.recomb(VipsOption... args) This operation recombines an image's bands.reduce(double xshrink, double hshrink, double yshrink, double vshrink, VipsOption... args) Reduce by a pair of factors with a pair of 1D kernels.reduceh(double xshrink, double hshrink, VipsOption... args) Reduce horizontally by a float factor.reducev(double yshrink, double vshrink, VipsOption... args) Reduce vertically by a float factor.relational(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(VipsOption... args) This operation calculates % (remainder after integer division) and writes the result to .remainderConst(List<Double> c, VipsOption... args) This operation calculates % (remainder after division by an array of constants) and writes the result to .replicate(int across, int down, VipsOption... args) Repeats an image many times.resize(double scale, VipsOption... args) Resize an image.rot(VipsAngle angle, VipsOption... args) Rotate by a multiple of 90 degrees.rot45(VipsOption... args) Rotate by 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 from@scaleand .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.sequential(VipsOption... args) This operation behaves rather likecopy(app.photofox.vipsffm.VipsOption...)between images and , except that it checks that pixels on are only requested top-to-bottom.sharpen(VipsOption... args) Selectively sharpen the L channel of a LAB image.shrink(double xshrink, double hshrink, double yshrink, double vshrink, VipsOption... args) Shrink by a pair of factors with a simple box filter.shrinkh(int xshrink, int hshrink, VipsOption... args) Shrink horizontally by an integer factor.shrinkv(int yshrink, int vshrink, VipsOption... args) Shrink vertically 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 from and .sines(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(VipsOption... args) Calculate a correlation surface.spectrum(VipsOption... args) Make a displayable (ie.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 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(VipsOption... args) This operation calculates@in1-@in2and writes the result to .sum(List<VImage> in, VipsOption... args) This operation sums all images in and writes the result to .svgload(String filename, VipsOption... args) Render a SVG file into a VIPS image.svgloadBuffer(VBlob buffer, VipsOption... args) Read a SVG-formatted memory block into a VIPS image.svgloadSource(VSource source, VipsOption... args) Exactly assvgload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.switch1(List<VImage> tests, VipsOption... args) The images are evaluated and at each point the index of the first non-zero value is written to .text(String text, VipsOption... args) Draw the string to an image.thumbnail(String filename, int width, VipsOption... args) Make a thumbnail from a file.thumbnailBuffer(VBlob buffer, int width, VipsOption... args) Exactly asthumbnail(java.lang.String, int, app.photofox.vipsffm.VipsOption...), but read from a memory buffer.thumbnailImage(int width, VipsOption... args) Exactly asthumbnail(java.lang.String, int, app.photofox.vipsffm.VipsOption...), but read from an existing image.thumbnailSource(VSource source, int width, VipsOption... args) Exactly asthumbnail(java.lang.String, int, app.photofox.vipsffm.VipsOption...), but read from a source.tiffload(String filename, VipsOption... args) during loadtiffloadBuffer(VBlob buffer, VipsOption... args) during loadtiffloadSource(VSource source, VipsOption... args) during loadvoidtiffsave(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 images and , except that it keeps a cache of computed pixels.tonelut(VipsOption... args) tonelut generates a tone curve for the adjustment of image levels.transpose3d(VipsOption... args) Transpose a volumetric image.unpremultiply(VipsOption... args) Unpremultiplies any alpha channel.vipsload(String filename, VipsOption... args) Read in a vips image.vipsloadSource(VSource source, VipsOption... args) Exactly asvipsload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.voidvipssave(String filename, VipsOption... args) Write to in VIPS format.voidvipssaveTarget(VTarget target, VipsOption... args) Asvipssave(java.lang.String, app.photofox.vipsffm.VipsOption...), but save to a target.webpload(String filename, VipsOption... args) Read a WebP file into a VIPS image.webploadBuffer(VBlob buffer, VipsOption... args) Read a WebP-formatted memory block into a VIPS image.webploadSource(VSource source, VipsOption... args) Exactly aswebpload(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.worley(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 at , .voidwriteToFile(String path, VipsOption... options) voidwriteToTarget(VTarget target, String suffix, VipsOption... options) xyz(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.zone(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
-
getUnsafeAddress
Deprecated, for removal: This API element is subject to removal in a future version. -
getUnsafeStructAddress
Gets the rawMemorySegment(C pointer) for this VipsImage struct The memory address' lifetime is bound to the scope of thearenaUsage of the memory address is strongly discouraged, but it is available if some functionality is missing and you need to use it withVipsHelper -
CMC2LCh
Turn LCh to CMC.
See also:
LCh2CMC(app.photofox.vipsffm.VipsOption...).- 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
vips_icc_importinstead.- 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.See also:
sRGB2HSV(app.photofox.vipsffm.VipsOption...).- 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.
See also:
CMC2LCh(app.photofox.vipsffm.VipsOption...).- 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).See also:
LabQ2Lab(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
Lab2LabS
Turn Lab to LabS, signed 16-bit int fixed point.
See also:
LabQ2Lab(app.photofox.vipsffm.VipsOption...).- 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 with .
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- temp
VipsOption.ArrayDoubleColor temperature
-
LabQ2Lab
Unpack a LabQ (
VipsCoding.CODING_LABQ) image to a three-band float image.See also: LabQ2Lab,
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,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,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.
See also: LabS2Lab.
- 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
vips_icc_exportinstead.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
XYZ2Lab
Turn XYZ to Lab, optionally specifying the colour temperature. defaults to D65.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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(3)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 to .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:<table> <title>VipsAdd type promotion</title> <tgroup cols='2' align='left' colsep='1' rowsep='1'> <thead> <row> <entry>input type</entry> <entry>output type</entry> </row> </thead> <tbody> <row> <entry>uchar</entry> <entry>ushort</entry> </row> <row> <entry>char</entry> <entry>short</entry> </row> <row> <entry>ushort</entry> <entry>uint</entry> </row> <row> <entry>short</entry> <entry>int</entry> </row> <row> <entry>uint</entry> <entry>uint</entry> </row> <row> <entry>int</entry> <entry>int</entry> </row> <row> <entry>float</entry> <entry>float</entry> </row> <row> <entry>double</entry> <entry>double</entry> </row> <row> <entry>complex</entry> <entry>complex</entry> </row> <row> <entry>double complex</entry> <entry>double complex</entry> </row> </tbody> </tgroup> </table>In other words, the output type is just large enough to hold the whole range of possible values.
See also:
subtract(app.photofox.vipsffm.VipsOption...),linear(java.util.List<java.lang.Double>, java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
affine
This operator performs an affine transform on an image using .
The transform is:
X = <code>@a</code> * (x + {@optionalArg idx}) + <code>@b</code> * (y + {@optionalArg idy}) + {@optionalArg odx} Y = <code>@c</code> * (x + {@optionalArg idx}) + <code>@d</code> * (y + {@optionalArg idy}) + <code>@doy</code> 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 is written to . is a four-element int array of left, top, width, height. By default is just large enough to cover the whole of the transformed input image.
By default, new pixels are filled with . This defaults to zero (black). You can set other extend types with .
VipsExtend.EXTEND_COPYis better for image upsizing.defaults to bilinear.
, , , default 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...), set .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...), #VipsInterpolate.- Parameters:
matrix- Transformation matrixargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 is "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:
vips_image_new_from_file.- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 in a grid. The grid is images across and however high is necessary to use up all of . Images are set down left-to-right and top-to-bottom. defaults to
@n.Each input image is placed with a box of size by pixels and cropped. These default to the largest width and largest height of the input images.
Space between images is filled with . This defaults to 0 (black).
Images are positioned within their by box at low, centre or high coordinate values, controlled by and . These default to left-top.
Boxes are joined and separated by pixels. 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.enums.VipsDirection, app.photofox.vipsffm.VipsOption...),insert(int, int, app.photofox.vipsffm.VipsOption...),colourspace(app.photofox.vipsffm.enums.VipsInterpretation, app.photofox.vipsffm.VipsOption...).- Parameters:
in- Array of input imagesargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
VIPS_META_ORIENTATIONtag is removed from to prevent accidental double rotation.Read to find the amount the image was rotated by. Read to see if the image was also flipped.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.enums.VipsOperationRelational, app.photofox.vipsffm.VipsOption...). You can use it to see if all image bands match exactly.See also:
vips_boolean_const.- 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 to set how much to fold by: 3, 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.String, app.photofox.vipsffm.VipsOption...),bandunfold(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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(int, int, app.photofox.vipsffm.VipsOption...).- Parameters:
in- Array of input imagesargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
bandjoinConst
Append a set of constant bands to an image.
See also:
bandjoin(java.util.List<app.photofox.vipsffm.VImage>, app.photofox.vipsffm.VipsOption...).- 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.VipsOption...),avg(app.photofox.vipsffm.VipsOption...),recomb(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
bandrank
Sorts the images band-element-wise, then outputs an image in which each band element is selected from the sorted list by the parameter. For example, if is zero, then each output band element will be the minimum of all the corresponding input band elements.
By default, is -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:
in- Array of input imagesargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- index
VipsOption.IntSelect this band element from sorted list
-
bandunfold
Unfold image bands into x axis. Use to set how much to unfold by: 3, 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.String, app.photofox.vipsffm.VipsOption...),bandfold(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- factor
VipsOption.IntUnfold by this factor
-
black
Make a black unsigned char image of a specified size.
See also:
xyz(int, int, app.photofox.vipsffm.VipsOption...),text(java.lang.String, app.photofox.vipsffm.VipsOption...),gaussnoise(int, int, app.photofox.vipsffm.VipsOption...).- Parameters:
width- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- bands
VipsOption.IntNumber of bands in image
-
boolean1
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).See also:
vips_boolean_const.- Parameters:
boolean1-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 FALSE and 255 for TRUE.
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:
vips_boolean,vips_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:
|-------|-------| | 0 | 0 | |-------|-------| | 255 | 100 | |-------|-------|We 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(app.photofox.vipsffm.VipsOption...),invertlut(app.photofox.vipsffm.VipsOption...),cast(app.photofox.vipsffm.enums.VipsBandFormat, app.photofox.vipsffm.VipsOption...),maplut(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
byteswap
Swap the byte order in an image.
See also:
rawload(java.lang.String, int, int, int, app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
cache
This operation behaves rather like
copy(app.photofox.vipsffm.VipsOption...)between images and , except that it keeps a cache of computed pixels. This cache is made of up to tiles (a value of -1 means any number of tiles), and each tile is of size by pixels. By default it will cache 250 128 x 128 pixel tiles, enough for two 1920 x 1080 images.This operation is a thin wrapper over
vips_sink_screen, see the documentation for that operation for details.It uses a set of background threads to calculate pixels and the various active cache operations coordinate so as not to overwhelm your system. When a request is made for an area of pixels, the operation will block until all of those pixels have been calculated. Pixels are calculated with a set of threads.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- max-tiles
VipsOption.IntMaximum number of tiles to cache, tile-heightVipsOption.IntTile height in pixels, tile-widthVipsOption.IntTile width in pixels
-
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 to control the scale over which gradient is measured. 1.4 is usually a good value.
Use to set the precision of edge detection. For uchar images, setting this to
VipsPrecision.PRECISION_INTEGERwill make edge detection much faster, but sacrifice some sensitivity.You will probably need to process the output further to eliminate weak edges.
See also:
sobel(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- sigma
VipsOption.DoubleSigma of Gaussian, precisionVipsOption.EnumVipsPrecisionConvolve with this precision
-
case1
Use values in to select pixels from .
must have one band. can have up to 256 elements. Values in greater than or equal to
@nuse the final image in . The images in must have either one band or the same number of bands. The output image is the same size as . Images in are expanded to the smallest common format and number of bands.Combine this with
vips_switchto make something like a case statement or a multi-wayifthenelse(app.photofox.vipsffm.VipsOption...).See also:
maplut(app.photofox.vipsffm.VipsOption...),vips_switch,ifthenelse(app.photofox.vipsffm.VipsOption...).- Parameters:
cases- Array of case imagesargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
cast
Convert to . 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 is
TRUE, 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.VipsOption...),vips_real,vips_imag,vips_cast_uchar,msb(app.photofox.vipsffm.VipsOption...).- Parameters:
format-VipsBandFormatFormat to cast toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- shift
VipsOption.BooleanShift integer values up and down
-
colourspace
This operation looks at the interpretation field of (or uses , if set) and runs a set of colourspace conversion functions to move it to .
For example, given an image tagged as
VipsInterpretation.INTERPRETATION_YXY, running colourspace with set toVipsInterpretation.INTERPRETATION_LABwill convert withYxy2XYZ(app.photofox.vipsffm.VipsOption...)andXYZ2Lab(app.photofox.vipsffm.VipsOption...).See also:
vips_colourspace_issupported,vips_image_guess_interpretation.- Parameters:
space-VipsInterpretationDestination color spaceargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- source-space
VipsOption.EnumVipsInterpretationSource color space
-
compass
This convolves with times, rotating by each time. By default, it comvolves twice, rotating by 90 degrees, taking the maximum result.
See also:
conv(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
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:
cmplx-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 or are
VipsBandFormat.FORMAT_DOUBLE, isVipsBandFormat.FORMAT_DPCOMPLEX. Otherwise isVipsBandFormat.FORMAT_COMPLEX. becomes the real component of and the 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:
args- 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
Composite an array of images together.
Images are placed in a stack, with [0] at the bottom and [
@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 corresponding #VipsBlendMode in .Images are transformed to a compositing space before processing. This is
VIPS_INTERPRETATION_sRGB,VipsInterpretation.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_LABorVIPS_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. They will be expanded to the smallest common size and format in the usual way. Images are positioned using the and parameters, if set.
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...), set .See also:
insert(int, int, app.photofox.vipsffm.VipsOption...).- Parameters:
in- Array of input imagesmode- Array of VipsBlendMode to join withargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Composite on top of with . See
composite(java.util.List<app.photofox.vipsffm.VImage>, java.util.List<java.lang.Integer>, app.photofox.vipsffm.VipsOption...).- Parameters:
mode-VipsBlendModeVipsBlendMode to join withargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Convolution.
Perform a convolution of with . Each output pixel is calculated as:
sigma[i]{pixel[i] * mask[i]} / scale + offsetwhere scale and offset are part of .
By default, is
VipsPrecision.PRECISION_FLOAT. The output image is alwaysVipsBandFormat.FORMAT_FLOATunless isVipsBandFormat.FORMAT_DOUBLE, in which case is alsoVipsBandFormat.FORMAT_DOUBLE.If is
VipsPrecision.PRECISION_INTEGER, then elements of are converted to integers before convolution, using rint(), and the output image always has the same #VipsBandFormat as the input image.For
VipsBandFormat.FORMAT_UCHARimages andVipsPrecision.PRECISION_INTEGER, conv uses a fast vector path based on half-float arithmetic. This can produce slightly different results. Disable the vector path with `--vips-novector` or `VIPS_NOVECTOR` orvips_vector_set_enabled.If is
VipsPrecision.PRECISION_APPROXIMATEthen, likeVipsPrecision.PRECISION_INTEGER, is converted to int before convolution, and the output image always has the same #VipsBandFormat as the input image.Larger values for give more accurate results, but are slower. As approaches 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 will 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.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 with . This is a low-level operation, see
conv(app.photofox.vipsffm.VipsOption...)for something more convenient.The output image always has the same #VipsBandFormat as the input image. Elements of are converted to integers before convolution.
Larger values for give more accurate results, but are slower. As approaches 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, need be only 10% of this value and accuracy will still be good.
Smaller values of will 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.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.VipsOption...)for something more convenient.The image is convolved twice: once with and then again with rotated by 90 degrees. must be 1xn or nx1 elements. Elements of are converted to integers before convolution.
Larger values for give more accurate results, but are slower. As approaches 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, need be only 10% of this value and accuracy will still be good.
The output image always has the same #VipsBandFormat as the input image.
See also:
convsep(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- layers
VipsOption.IntUse this many layers in approximation
-
convf
Convolution. This is a low-level operation, see
conv(app.photofox.vipsffm.VipsOption...)for something more convenient.Perform a convolution of with . Each output pixel is calculated as sigma[i]{pixel[i] * mask[i]} / scale + offset, where scale and offset are part of .
The convolution is performed with floating-point arithmetic. The output image is always
VipsBandFormat.FORMAT_FLOATunless isVipsBandFormat.FORMAT_DOUBLE, in which case is alsoVipsBandFormat.FORMAT_DOUBLE.See also:
conv(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
convi
Integer convolution. This is a low-level operation, see
conv(app.photofox.vipsffm.VipsOption...)for something more convenient.is converted to an integer mask with rint() of each element, rint of scale and rint of offset. Each output pixel is then calculated as
sigma[i]{pixel[i] * mask[i]} / scale + offsetThe output image always has the same #VipsBandFormat as the input image.
For
VipsBandFormat.FORMAT_UCHARimages, convi uses a fast vector path based on half-float arithmetic. This can produce slightly different results. Disable the vector path with `--vips-novector` or `VIPS_NOVECTOR` orvips_vector_set_enabled.See also:
conv(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
convsep
Perform a separable convolution of with . See
conv(app.photofox.vipsffm.VipsOption...)for a detailed description.The mask must be 1xn or nx1 elements.
The image is convolved twice: once with and then again with rotated 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.VipsOption...),gaussmat(double, double, app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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- OptionalArg:
- 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.enums.VipsOperationMorphology, app.photofox.vipsffm.VipsOption...),conv(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.
sets the number of lines to skip at the start of the file. Default zero.
sets the number of lines to read from the file. Default -1, meaning read all lines to end of file.
sets the skippable whitespace characters. Default space. Whitespace characters are always run together.
sets the characters that separate fields. Default ;,tab. Separators are never run together.
Use to set the type of error that will cause load to fail. By default, loaders are permissive, that is,
VipsFailOn.FAIL_ON_NONE.See also:
vips_image_new_from_file,bandfold(app.photofox.vipsffm.VipsOption...).- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Exactly as
csvload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
csvload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 to the as 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.
gives the string to use to separate numbers in the output. The default is "\\t" (tab).
See also:
vips_image_write_to_file.- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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- OptionalArg:
- 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:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
dE76
Calculate dE 76.
- Parameters:
args- 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:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
deviate
This operation finds the standard deviation of all pixels in . 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.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 to . If any pixels in@in2are zero, the corresponding pixel in is 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:<table> <title>divide type promotion</title> <tgroup cols='2' align='left' colsep='1' rowsep='1'> <thead> <row> <entry>input type</entry> <entry>output type</entry> </row> </thead> <tbody> <row> <entry>uchar</entry> <entry>float</entry> </row> <row> <entry>char</entry> <entry>float</entry> </row> <row> <entry>ushort</entry> <entry>float</entry> </row> <row> <entry>short</entry> <entry>float</entry> </row> <row> <entry>uint</entry> <entry>float</entry> </row> <row> <entry>int</entry> <entry>float</entry> </row> <row> <entry>float</entry> <entry>float</entry> </row> <row> <entry>double</entry> <entry>double</entry> </row> <row> <entry>complex</entry> <entry>complex</entry> </row> <row> <entry>double complex</entry> <entry>double complex</entry> </row> </tbody> </tgroup> </table>In other words, the output type is just large enough to hold the whole range of possible values.
See also:
multiply(app.photofox.vipsffm.VipsOption...),linear(java.util.List<java.lang.Double>, java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...),vips_pow.- Parameters:
args- 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 . If is
TRUEthen the circle is filled, otherwise a 1-pixel-wide perimeter is drawn.is an array of double containing values to draw.
See also:
vips_draw_circle1,vips_draw_line.- 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- OptionalArg:
- fill
VipsOption.BooleanDraw a solid object
-
drawFlood
Flood-fill with , starting at position , . 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 .
If is set, it instead searches for pixels which are equal to the start point and fills them with .
Normally it will test and set pixels in . If is set, it will test pixels in and set pixels in . This lets you search an image () for continuous areas of pixels without modifying it.
, , , output the bounding box of the modified pixels.
is an array of double containing values to draw.
See also:
vips_draw_flood1.- Parameters:
ink- Color for pixelsx- DrawFlood start pointy- DrawFlood start pointargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 on top of at position , . The two images must have the same Coding. If has 1 band, the bands will be duplicated to match the number of bands in . will be converted to 's format, see
cast(app.photofox.vipsffm.enums.VipsBandFormat, app.photofox.vipsffm.VipsOption...).Use to set how pixels are combined. If you use
VipsCombineMode.COMBINE_MODE_ADD, both images muct be uncoded.See also:
vips_draw_mask,insert(int, int, app.photofox.vipsffm.VipsOption...).- Parameters:
x- Draw image herey- Draw image hereargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.
is an array of double containing values to draw.
See also:
vips_draw_line1,vips_draw_circle,vips_draw_mask.- 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
Draw on the image. is a monochrome 8-bit image with 0/255 for transparent or coloured points. Intermediate values blend the ink with the pixel. Use with
text(java.lang.String, app.photofox.vipsffm.VipsOption...)to draw text on an image. Use in avips_draw_linesubclass to draw an object along a line.is an array of double containing values to draw.
See also:
text(java.lang.String, app.photofox.vipsffm.VipsOption...),vips_draw_line.- Parameters:
ink- Color for pixelsx- 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 , , , in with . If is zero, just paint a 1-pixel-wide outline.
See also:
vips_draw_circle.- 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- OptionalArg:
- 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 . Each pixel in the area , , , is replaced by the average of the surrounding 3x3 pixels.
See also:
vips_draw_line.- 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 to pick other conventions.
dzsave creates a directory called
@nameto hold the tiles. If@nameends `.zip`, dzsave will create a zip file called@nameto hold the tiles. You can use to force zip file output.Use to set the name of the image we are creating. The default value is set from
@name.By default, tiles are written as JPEGs. Use set set the JPEG quality factor.
You can set to something like `".png[bitdepth=4]"` to write tiles in another format.
In Google layout mode, edge tiles are expanded to by pixels. Normally they are filled with white, but you can set another colour with . Images are usually placed at the top-left of the tile, but you can have them centred by turning on .
You can set the size and overlap of tiles with and . They default to the correct settings for the selected . The deepzoom defaults produce 256x256 jpeg files for centre tiles, the most efficient size.
Use to control how low the pyramid goes. This defaults to the correct setting for the you select.
You can rotate the image during write with the argument. 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 with
rot(app.photofox.vipsffm.enums.VipsAngle, app.photofox.vipsffm.VipsOption...). Note that the `autorotate` option 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 if you want to keep metadata.
If is set to `zip`, 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 to 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 to 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 `id` property in `info.json` with . The default is `https://example.com/iiif`.
Use
VipsForeignDzLayout.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- OptionalArg:
- 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 to 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 in@len. You are responsible for freeing the buffer with g_free() when you are done with it.See also:
dzsave(java.lang.String, app.photofox.vipsffm.VipsOption...),vips_image_write_to_file.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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...),vips_image_write_to_target.- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
vips_extract_area: embed within an image of size by at position , .controls what appears in the new pels, see #VipsExtend.
See also:
vips_extract_area,insert(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- OptionalArg:
- 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:
vips_extract_bands,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.
See also:
vips_extract_area.- Parameters:
band- Band to extractargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- n
VipsOption.IntNumber of bands to extract
-
eye
Create a test pattern with increasing spatial frequency in X and amplitude in Y. should be between 0 and 1 and determines the maximum spatial frequency.
Set to output a uchar image.
See also:
zone(int, int, app.photofox.vipsffm.VipsOption...).- Parameters:
width- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- uchar
VipsOption.BooleanOutput an unsigned char image, factorVipsOption.DoubleMaximum spatial frequency
-
falsecolour
Force to 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.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
fastcor
Calculate a fast correlation surface.
is placed at every position in and 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.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
fillNearest
Fill outwards from every non-zero pixel in , setting pixels in and
@value.At the position of zero pixels in , contains the distance to the nearest non-zero pixel in , and
@valuecontains the value of that pixel.is a one-band float image.
@valuehas the same number of bands and format as .See also:
vips_hist_find_indexed.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- distance
VipsOption.ImageDistance to nearest non-zero pixel
-
findTrim
Search for the bounding box of the non-background area.
Any alpha is flattened out, then the image is median-filtered (unless is set, see below), all the row and column sums of the absolute difference from are calculated in a single pass, then the first row or column in each of the four directions where the sum is greater than gives the bounding box.
If the image is entirely background,
vips_find_trimreturns == 0 and == 0.defaults to 255, or 65535 for 16-bit images. Set another value, or use
getpoint(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.defaults 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 to disable this filtering.
The image needs to be at least 3x3 pixels in size.
See also:
getpoint(int, int, app.photofox.vipsffm.VipsOption...),vips_extract_area,smartcrop(int, int, app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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:
vips_image_new_from_file.- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Load FITS from a source- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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:
vips_image_write_to_file.- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 as an alpha and use it to blend the remaining channels with .
The alpha channel is 0 - , where means 100% image and 0 means 100% background. defaults to zero (black).
has the default value 255, or 65535 for images tagged as
VipsInterpretation.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.String, app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 VImage fractsurf(int width, int height, double fractalDimension, VipsOption... args) throws VipsError Generate an image of size by and fractal dimension . The dimension should be between 2 and 3.
See also:
gaussnoise(int, int, app.photofox.vipsffm.VipsOption...),vips_mask_fractal.- Parameters:
width- Image width in pixelsheight- Image height in pixelsfractalDimension- Fractal dimensionargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
freqmult
Multiply by in Fourier space.
is transformed to Fourier space, multiplied with , then transformed back to real space. If is already a complex image, just multiply then inverse transform.
See also:
invfft(app.photofox.vipsffm.VipsOption...),vips_mask_ideal.- Parameters:
args- 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.
See also:
invfft(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
gamma
Calculate ** (1 / ), normalising to the maximum range of the input type. For float types use 1.0 as the maximum.
See also:
identity(app.photofox.vipsffm.VipsOption...),vips_pow_const1,maplut(app.photofox.vipsffm.VipsOption...)- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- exponent
VipsOption.DoubleGamma factor
-
gaussblur
This operator runs
gaussmat(double, double, app.photofox.vipsffm.VipsOption...)andconvsep(app.photofox.vipsffm.VipsOption...)for you on an image. Set smaller to generate a larger, more accurate mask. Set larger to make the blur more blurry.See also:
gaussmat(double, double, app.photofox.vipsffm.VipsOption...),convsep(app.photofox.vipsffm.VipsOption...).- Parameters:
sigma- Sigma of Gaussianargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- min-ampl
VipsOption.DoubleMinimum amplitude of Gaussian, precisionVipsOption.EnumVipsPrecisionConvolve with this precision
-
gaussmat
Creates a circularly symmetric Gaussian image of radius . The size of the mask is determined by the variable ; 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 * * ))
The generated image has odd size and its maximum value is normalised to 1.0, unless is
VipsPrecision.PRECISION_INTEGER.If is set, only the centre horizontal is generated. This is useful for separable convolutions.
If is
VipsPrecision.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(double, double, app.photofox.vipsffm.VipsOption...),conv(app.photofox.vipsffm.VipsOption...).- Parameters:
sigma- Sigma of GaussianminAmpl- Minimum amplitude of Gaussianargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- separable
VipsOption.BooleanGenerate separable Gaussian, integerVipsOption.BooleanGenerate integer Gaussian, precisionVipsOption.EnumVipsPrecisionGenerate with this precision
-
gaussnoise
Make a one band float image of gaussian noise with the specified distribution. The noise distribution is created by averaging 12 random numbers with the appropriate weights.
See also:
black(int, int, app.photofox.vipsffm.VipsOption...),xyz(int, int, app.photofox.vipsffm.VipsOption...),text(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
width- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 in@n. You must free the array with g_free() when you are done with it.See also:
vips_draw_point.- Parameters:
x- Point to ready- Point to readargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
gifload
Read a GIF file into a libvips image.
Use to select a page to render, numbering from zero.
Use to 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". Use
grid(int, int, int, app.photofox.vipsffm.VipsOption...)to change page layout.Use to 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:
vips_image_new_from_file.- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.String, app.photofox.vipsffm.VipsOption...), but read from a memory buffer.You must not free the buffer while is active. The #VipsObject::postclose signal on is a good place to free.
See also:
gifload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
buffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Exactly as
gifload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
gifload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 to set the degree of Floyd-Steinberg dithering and to control the CPU effort (1 is the fastest, 10 is the slowest, 7 is the default).
Use (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 to 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 to set the threshold below which the previously generated palette will be reused.
If is TRUE, the GIF will be saved with a single global palette taken from the metadata in , and no new palette optimisation will be done.
If is TRUE, 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.
See also:
vips_image_new_from_file.- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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, 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 in@len. You are responsible for freeing the buffer with g_free() when you are done with it.See also:
gifsave(java.lang.String, app.photofox.vipsffm.VipsOption...),vips_image_write_to_file.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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, 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...),vips_image_write_to_target.- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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, 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 can be used to remove contrast differences in an assembled mosaic.
It reads the History field attached to and 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 to 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. is
VipsBandFormat.FORMAT_FLOAT, but if is 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 , and the mosaic must have been built using only operations in this package.
See also:
vips_remosaic.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
vips_extract_area: place within an image of size by at a certain gravity.controls what appears in the new pels, see #VipsExtend.
See also:
vips_extract_area,insert(int, int, app.photofox.vipsffm.VipsOption...).- 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- OptionalArg:
- 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 to output a uchar image with the leftmost pixel 0 and the rightmost 255.
See also:
xyz(int, int, app.photofox.vipsffm.VipsOption...),identity(app.photofox.vipsffm.VipsOption...).- Parameters:
width- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 pixels high and the width of . The tiles are then rearranged into a grid tiles across and tiles down in row-major order.
Supplying , and is 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(int, int, app.photofox.vipsffm.VipsOption...),join(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 to select a page to render, numbering from zero. If neither nor are set, defaults to the primary page, otherwise to 0.
Use to 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". Use
grid(int, int, int, app.photofox.vipsffm.VipsOption...)to reorganise pages.HEIF images have a primary image. The metadata item `heif-primary` gives the page number of the primary.
If is
TRUE, then fetch a stored thumbnail rather than the image.By default, input image dimensions are limited to 16384x16384. If is
TRUE, this increases to the maximum of 65535x65535.The bitdepth of the heic image is recorded in the metadata item `heif-bitdepth`.
See also:
vips_image_new_from_file.- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.String, app.photofox.vipsffm.VipsOption...), but read from a memory buffer.You must not free the buffer while is active. The #VipsObject::postclose signal on is a good place to free.
See also:
heifload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
buffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Exactly as
heifload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
heifload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 to 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
TRUEto switch to lossless compression.Use to 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 to 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 .
Use to 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 to set the encode library to use, e.g. aom, SVT-AV1, rav1e etc.
See also:
vips_image_write_to_file,heifload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 in@olen. You are responsible for freeing the buffer with g_free() when you are done with it.See also:
heifsave(java.lang.String, app.photofox.vipsffm.VipsOption...),vips_image_write_to_file.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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...),vips_image_write_to_target.- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.
See also:
vips_hist_norm.- 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 . Equalise using band
@bandno, or if@bandnois -1, equalise bands independently. The output format is always the same as the input format.See also:
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- band
VipsOption.IntEqualise with this band
-
histFind
Find the histogram of . Find the histogram for band (producing a one-band histogram), or for all bands (producing an n-band histogram) if is -1.
char and uchar images are cast to uchar before histogramming, all other image types are cast to ushort.
See also:
vips_hist_find_ndim,vips_hist_find_indexed.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- band
VipsOption.IntFind histogram of band
-
histFindIndexed
Make a histogram of , but use image to pick the bins. In other words, element zero in contains the combination of all the pixels in whose corresponding pixel in is zero.
char and uchar images are cast to uchar before histogramming, all other image types are cast to ushort. must have just one band.
must be non-complex.
always has the same size and format as .
Normally, bins are summed, but you can use to 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:
vips_hist_find,labelregions(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 bins .. ie. output is 1 x bins, bins x bins, or bins x bins x bins bands. defaults to 10.
char and uchar images are cast to uchar before histogramming, all other image types are cast to ushort.
See also:
vips_hist_find,vips_hist_find_indexed.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- bins
VipsOption.IntNumber of bins in each dimension
-
histIsmonotonic
Test for monotonicity.
@outis set non-zero if is monotonic.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
histLocal
Performs local histogram equalisation on using a window of size by centered 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 is 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.
See also:
vips_hist_equal.- Parameters:
width- Window width in pixelsheight- Window height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- max-slope
VipsOption.IntMaximum slope (CLAHE)
-
histMatch
Adjust to match . If and are normalised cumulative histograms, will be a LUT that adjusts the PDF of the image from which was made to match the PDF of 's image.
See also:
maplut(app.photofox.vipsffm.VipsOption...),vips_hist_find,vips_hist_norm,vips_hist_cum.- Parameters:
args- 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.
See also:
vips_hist_cum.- 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 .
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. must be one band, with non-zero pixels for image edges. is 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 and to set the range of radii to search for.
Use to set how coordinates are scaled to coordinates. A of 3, for example, will make 1/3rd of the width and height of , and reduce the number of radii tested (and hence the number of bands int ) by a factor of three as well.
See also:
vips_hough_line.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 . must have one band. has one band, with pixels being the number of votes for that line. The X dimension of is 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 to set the size of the parameter space image (), that is, how accurate the line determination should be.
See also:
vips_hough_circle.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 is set to
VipsPCS.PCS_XYZ, use CIE XYZ PCS instead. If is not set, use the embedded profile, if any. If is set, export with that and attach it to the output image.If is set, LCMS black point compensation is enabled.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 is set to
VipsPCS.PCS_XYZ, use CIE XYZ PCS instead.The input profile is searched for in three places: 1. If is set, libvips will try to use any profile in the input image metadata. You can test for the presence of an embedded profile with
vips_image_get_typeofwithVIPS_META_ICC_NAMEas an argument. This will returnGType0 if there is no profile. 2. Otherwise, if is set, libvips will try to load a profile from the named file. This can aslso be the name of one of the built-in profiles. 3. Otherwise, libvips will try to pick a compatible profile from the set of built-in profiles.If is set, LCMS black point compensation is enabled.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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: 1. If is set, libvips will try to use any profile in the input image metadata. You can test for the presence of an embedded profile with
vips_image_get_typeofwithVIPS_META_ICC_NAMEas an argument. This will returnGType0 if there is no profile. 2. Otherwise, if is set, libvips will try to load a profile from the named file. This can aslso be the name of one of the built-in profiles. 3. Otherwise, libvips will try to pick a compatible profile from the set of built-in profiles.If is set, LCMS black point compensation is enabled.
defaults to 8, or 16 if is a 16-bit image.
The output image has the output profile attached to the
VIPS_META_ICC_NAMEfield.Use
vips_icc_importandvips_icc_exportto 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- OptionalArg:
- 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.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 to create a 16-bit table.
Normally 16-bit tables have 65536 entries. You can set this smaller with .
See also:
xyz(int, int, app.photofox.vipsffm.VipsOption...),maplut(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 and uses it to select pixels from either the then image or the else image . Non-zero means , 0 means .
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 and are cast up to the smallest common format. is 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 is
TRUE, then values in are smoothly blended between and using the formula: = ( / 255) * + (1 - / 255) *See also:
vips_equal.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- blend
VipsOption.BooleanBlend smoothly between then and else parts
-
insert
Insert into at position , .
Normally shows the whole of . If is #TRUE then is made large enough to hold all of and . Any areas of not coming from either or are set to (default 0).
If overlaps , will appear on top of .
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.enums.VipsDirection, app.photofox.vipsffm.VipsOption...),embed(int, int, int, int, app.photofox.vipsffm.VipsOption...),vips_extract_area.- Parameters:
x- Left edge of sub in mainy- Top edge of sub in mainargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- expand
VipsOption.BooleanExpand output to hold all of both inputs, backgroundVipsOption.ArrayDoubleColor for new pixels
-
invert
For unsigned formats, this operation calculates (max - ), eg. (255 - ) for uchar. For signed and float formats, this operation calculates (-1 ).
For complex images, only the real part is inverted. See also
vips_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:
|-------|-------|-------|-------| | 0.1 | 0.2 | 0.3 | 0.1 | |-------|-------|-------|-------| | 0.2 | 0.4 | 0.4 | 0.2 | |-------|-------|-------|-------| | 0.7 | 0.5 | 0.6 | 0.3 | |-------|-------|-------|-------|Means 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.
See also:
buildlut(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 , it's quicker.
VIPS uses the fftw Fourier Transform library. If this library was not available when VIPS was configured, these functions will fail.
See also:
fwfft(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- real
VipsOption.BooleanOutput only the real part of the transform
-
join
Join and together, left-right or up-down depending on the value of .
If one is taller or wider than the other, will be has high as the smaller. If is
TRUE, then the output will be expanded to contain all of the input pixels.Use to set the edge that the images align on. By default, they align on the edge with the lower value coordinate.
Use to set the colour of any pixels in which are not present in either or .
Use to 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.util.List<app.photofox.vipsffm.VImage>, app.photofox.vipsffm.VipsOption...)is a better choice.See also:
arrayjoin(java.util.List<app.photofox.vipsffm.VImage>, app.photofox.vipsffm.VipsOption...),insert(int, int, app.photofox.vipsffm.VipsOption...).- Parameters:
direction-VipsDirectionJoin left-right or up-downargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 to 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.
Use to set the type of error that will cause load to fail. By default, loaders are permissive, that is,
VipsFailOn.FAIL_ON_NONE.See also:
vips_image_new_from_file.- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- page
VipsOption.IntLoad this page from the 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
-
jp2kloadBuffer
Exactly as
jp2kload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a buffer.You must not free the buffer while is active. The #VipsObject::postclose signal on is a good place to free.
- Parameters:
buffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- page
VipsOption.IntLoad this page from the 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
-
jp2kloadSource
Exactly as
jp2kload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- page
VipsOption.IntLoad this page from the 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
-
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 to set the compression quality factor. The default value produces file with approximately the same size as regular JPEG Q 75.
Set to enable lossless compression.
Use and to set the tile size. The default is 512.
Chroma subsampling is normally disabled for compatibility. Set to 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:
vips_image_write_to_file,jp2kload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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...),vips_image_write_to_target.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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...),vips_image_write_to_target.- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.
means 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 to set the type of error that will cause load to fail. By default, loaders are permissive, that is,
VipsFailOn.FAIL_ON_NONE.Setting to
TRUEwill make the loader interpret the orientation tag and automatically rotate the image appropriately during load.If is
FALSE, the metadata fieldVIPS_META_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 useVIPS_META_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
VIPS_META_ICC_NAME. You need to use something likevips_icc_importto get CIE values from the file.EXIF metadata is attached as
VIPS_META_EXIF_NAME, IPTC asVIPS_META_IPTC_NAME, and XMP asVIPS_META_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
vips_image_get_blob.See also:
vips_jpegload_buffer,vips_image_new_from_file,autorot(app.photofox.vipsffm.VipsOption...).- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
during load
Read a JPEG-formatted memory block into a VIPS image. Exactly as
jpegload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a memory buffer.You must not free the buffer while is active. The #VipsObject::postclose signal on is a good place to free.
See also:
jpegload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
buffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
during load
Read a JPEG-formatted memory block into a VIPS image. Exactly as
jpegload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
jpegload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 to set the JPEG compression factor. Default 75.
If is set, the Huffman tables are optimized. This is slightly slower and produces slightly smaller files.
If is 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 .
If is 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 is 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 is 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 is 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
VIPS_META_EXIF_NAME, then modified with any other related tags on the image before being written to the file.VIPS_META_RESOLUTION_UNITis used to set the EXIF resolution unit.VIPS_META_ORIENTATIONis used to set the EXIF orientation tag.IPTC as
VIPS_META_IPTC_NAMEand XMP asVIPS_META_XMP_NAMEare coded and attached.See also:
vips_jpegsave_buffer,vips_image_write_to_file.- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 in@olen. You are responsible for freeing the buffer with g_free() when you are done with it.See also:
jpegsave(java.lang.String, app.photofox.vipsffm.VipsOption...),vips_image_write_to_file.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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...),vips_image_write_to_file.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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...),vips_image_write_to_target.- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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:
vips_image_new_from_file.- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
-
jxlloadBuffer
Exactly as
jxlload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a buffer.- Parameters:
buffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
-
jxlloadSource
Exactly as
jxlload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
-
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.
sets the overall decode speed the encoder will target. Minimum is 0 (highest quality), and maximum is 4 (lowest quality). Default is 0.
sets 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 to set . uses approximately the same scale as regular JPEG.
Set to enable lossless compression.
- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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...),vips_image_write_to_target.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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...),vips_image_write_to_target.- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Repeatedly scans for regions of 4-connected pixels with the same pixel value. Every time a region is discovered, those pixels are marked in with a unique serial number. Once all pixels have been labelled, the operation returns, setting to the number of discrete regions which were detected.
is always a 1-band
VipsBandFormat.FORMAT_INTimage of the same dimensions as .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 to number them all.
Use
vips_hist_find_indexedto (for example) find blob coordinates.See also:
vips_hist_find_indexed.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- segments
VipsOption.IntNumber of discrete contiguous regions
-
linear
Pass an image through a linear transform, ie. ( = * + ). Output is float for integer input, double for double input, complex for complex input and double complex for double complex input. Set to 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:
vips_linear1,add(app.photofox.vipsffm.VipsOption...).- Parameters:
a- Multiply by thisb- Add thisargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- uchar
VipsOption.BooleanOutput should be uchar
-
linecache
This operation behaves rather like
copy(app.photofox.vipsffm.VipsOption...)between images and , 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
vips_region_prepare.When the cache fills, a tile is chosen for reuse. If is
VipsAccess.ACCESS_RANDOM, then the least-recently-used tile is reused. If isVipsAccess.ACCESS_SEQUENTIAL, then the top-most tile is reused. defaults toVipsAccess.ACCESS_RANDOM.can be used to set the size of the strips that linecache uses. The default is 1 (a single scanline).
Normally, only a single thread at once is allowed to calculate tiles. If you set to
TRUE, linecache will allow many threads to calculate tiles at once and share the cache between them.See also:
cache(app.photofox.vipsffm.VipsOption...),tilecache(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- tile-height
VipsOption.IntTile height in pixels, accessVipsOption.EnumVipsAccessExpected access pattern, threadedVipsOption.BooleanAllow threaded access, persistentVipsOption.BooleanKeep cache between evaluations
-
logmat
Creates a circularly symmetric Laplacian of Gaussian mask of radius . The size of the mask is determined by the variable ; 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 s2 = * , s4 = s2 * s2, r2 = r * r.
The generated mask has odd size and its maximum value is normalised to 1.0, unless is
VipsPrecision.PRECISION_INTEGER.If is set, only the centre horizontal is generated. This is useful for separable convolutions.
If is
VipsPrecision.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(double, double, app.photofox.vipsffm.VipsOption...),conv(app.photofox.vipsffm.VipsOption...).- Parameters:
sigma- Radius of GaussianminAmpl- Minimum amplitude of Gaussianargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 SVG, 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 "--with-magickpackage" configure 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 and to set the start page and number of pages to load. Set to -1 to load all pages from onwards.
is "WxH" in DPI, e.g. "600x300" or "600" (default is "72x72"). See the [density docs](http://www.imagemagick.org/script/command-line-options.php#density) on the imagemagick website.
See also:
vips_image_new_from_file.- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Read an image memory block using libMagick into a VIPS image. Exactly as
magickload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a memory source.You must not free the buffer while is active. The #VipsObject::postclose signal on is a good place to free.
See also:
magickload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
buffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 to set the quality factor. Default 0.
Use to explicitly set the save format, for example, "BMP". Otherwise the format is guessed from the filename suffix.
If is 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 is 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.
specifies 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:
vips_magicksave_buffer,magickload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 in@olen. You are responsible for freeing the buffer with g_free() when you are done with it.See also:
magicksave(java.lang.String, app.photofox.vipsffm.VipsOption...),vips_image_write_to_file.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 using to look up pixels. is the same size as , with each pixel being fetched from that position in . That is:
out[x, y] = in[index[x, y]]If has one band, that band must be complex. Otherwise, must have two bands of any format.
Coordinates in are in pixels, with (0, 0) being the top-left corner of , and with y increasing down the image. Use
xyz(int, int, app.photofox.vipsffm.VipsOption...)to build index images.defaults to bilinear.
By default, new pixels are filled with . This defaults to zero (black). You can set other extend types with .
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...), set .This operation does not change xres or yres. The image resolution needs to be updated by the application.
See
maplut(app.photofox.vipsffm.VipsOption...)for a 1D equivalent of this operation.See also:
xyz(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.VipsOption...), #VipsInterpolate.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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, VIPS_FORMAT_UCHAR, VIPS_FORMAT_USHORT or VIPS_FORMAT_UINT.
If is too small for the input type (for example, if is VIPS_FORMAT_UCHAR but only has 100 elements), the lut is padded out by copying the last element. Overflows are reported at the end of computation. If is too large, extra values are ignored.
If has one band and is -1 (the default), then all bands of pass through . If is ≥ 0, then just that band of passes through and other bands are just copied.
If has same number of bands as , then each band is mapped separately. If has one band, then may have many bands and the output will have the same number of bands as .
See also:
vips_hist_find,identity(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- band
VipsOption.IntApply one-band lut to this band of in
-
maskButterworth
public VImage maskButterworth(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 , where is in range 0 - 1. The shape of the curve is controlled by --- higher values give a sharper transition. See Gonzalez and Wintz, Digital Image Processing, 1987.
See also:
vips_mask_ideal.- Parameters:
width- Image width in pixelsheight- Image height in pixelsorder- Filter orderfrequencyCutoff- Frequency cutoffamplitudeCutoff- Amplitude cutoffargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 VImage maskButterworthBand(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 , , of radius . The shape of the curve is controlled by --- higher values give a sharper transition. See Gonzalez and Wintz, Digital Image Processing, 1987.
See also:
vips_mask_ideal.- Parameters:
width- 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- OptionalArg:
- 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 VImage maskButterworthRing(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 of width , where is in the range 0 - 1. The shape of the curve is controlled by --- higher values give a sharper transition. See Gonzalez and Wintz, Digital Image Processing, 1987.
See also:
vips_mask_ideal.- Parameters:
width- 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- OptionalArg:
- 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 VImage maskFractal(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(int, int, app.photofox.vipsffm.VipsOption...).See also:
vips_mask_ideal.- Parameters:
width- Image width in pixelsheight- Image height in pixelsfractalDimension- Fractal dimensionargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 VImage maskGaussian(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 .
See also:
vips_mask_ideal.- Parameters:
width- Image width in pixelsheight- Image height in pixelsfrequencyCutoff- Frequency cutoffamplitudeCutoff- Amplitude cutoffargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 VImage maskGaussianBand(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 , , of radius .
See also:
vips_mask_ideal.- Parameters:
width- 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- OptionalArg:
- 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 VImage maskGaussianRing(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 of width .
See also:
vips_mask_ideal.- Parameters:
width- Image width in pixelsheight- Image height in pixelsfrequencyCutoff- Frequency cutoffamplitudeCutoff- Amplitude cutoffringwidth- Ringwidthargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 VImage maskIdeal(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 , where is 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 to not set the DC pixel.
Set to position the DC component in the centre of the image. This makes the mask suitable for multiplying against optical Fourier transforms. See
wrap(app.photofox.vipsffm.VipsOption...).Set to invert the sense of the filter. For example, low-pass becomes low-reject.
Set to output an 8-bit unsigned char image rather than a float image. In this case, pixels are in the range [0 - 255].
See also:
vips_mask_ideal,vips_mask_ideal_ring,vips_mask_ideal_band,vips_mask_butterworth,vips_mask_butterworth_ring,vips_mask_butterworth_band,vips_mask_gaussian,vips_mask_gaussian_ring,vips_mask_gaussian_band.- Parameters:
width- Image width in pixelsheight- Image height in pixelsfrequencyCutoff- Frequency cutoffargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 VImage maskIdealBand(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 , , of size .
See also:
vips_mask_ideal.- Parameters:
width- 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- OptionalArg:
- 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 VImage maskIdealRing(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 of width , where and are expressed as the range 0 - 1.
See also:
vips_mask_ideal.- Parameters:
width- Image width in pixelsheight- Image height in pixelsfrequencyCutoff- Frequency cutoffringwidth- Ringwidthargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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(int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, VipsOption... args) throws VipsError Scale, rotate and translate so that the tie-points line up.
If is
TRUE, before performing the transformation, the tie-points are improved by searching an area of of size for a match of size to .This function will only work well for small rotates and scales.
- Parameters:
xr1- 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- OptionalArg:
- 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.
See also:
math2(app.photofox.vipsffm.enums.VipsOperationMath2, app.photofox.vipsffm.VipsOption...).- 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 . The images may have any non-complex format. is float except in the case that either of or are double, in which case is 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.See also:
vips_math2_const.- Parameters:
math2-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 . The image may have any non-complex format. is float except in the case that is double, in which case is 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.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:
vips_image_new_from_file.- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.String, 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.
- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Exactly as
matrixload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
matrixload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
-
matrixprint
Print to
stdoutin matrix format. Seematrixload(java.lang.String, app.photofox.vipsffm.VipsOption...)for a description of the format.See also:
matrixload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 to in matrix format. See
matrixload(java.lang.String, app.photofox.vipsffm.VipsOption...)for a description of the format.See also:
matrixload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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- OptionalArg:
- 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 is set >1, it will find the largest 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 and . You can read out arrays of the values and positions of the top maxima with , and . These values are returned sorted from largest to smallest.
If there are more than maxima, 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- OptionalArg:
- 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
-
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 , , , arguments 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- OptionalArg:
- left
VipsOption.IntLeft edge of extract area, topVipsOption.IntTop edge of extract area, widthVipsOption.IntWidth of extract area, heightVipsOption.IntHeight of extract area
-
merge
This operation joins two images left-right (with on the left) or up-down (with above) 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).and give the displacement of relative to , in other words, the vector to get from the origin of to the origin of , in other words, will generally be a negative number.
limits 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.enums.VipsDirection, int, int, int, int, app.photofox.vipsffm.VipsOption...),insert(int, int, app.photofox.vipsffm.VipsOption...).- Parameters:
direction-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- OptionalArg:
- mblend
VipsOption.IntMaximum blend size
-
min
This operation finds the minimum value in an image.
By default it finds the single smallest value. If is set >1, it will find the smallest 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 and . You can read out arrays of the values and positions of the top minima with , and . These values are returned sorted from smallest to largest.
If there are more than minima, the minima returned will be a random selection of the minima in the image.
See also: min,
stats(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
-
morph
Performs a morphological operation on using as 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
vips_andimage,vips_orimageandvips_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-novector` or `VIPS_NOVECTOR` or
vips_vector_set_enabled- Parameters:
morph-VipsOperationMorphologyMorphological operation to performargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
mosaic
public VImage mosaic(VipsDirection direction, int xref, int yref, int xsec, int ysec, VipsOption... args) throws VipsError This operation joins two images left-right (with on the left) or top-bottom (with above) given an approximate overlap.
is positioned so that the pixel (, ) in lies on top of the pixel (, ) in . The overlap area is divided into three sections, 20 high-contrast points in band of image are found in each, and a window of pixels of size around each high-contrast point is searched for in over an area of .
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.enums.VipsDirection, int, int, app.photofox.vipsffm.VipsOption...)to join the two images together.You can read out the detected transform with , , , , , .
See also:
merge(app.photofox.vipsffm.enums.VipsDirection, int, int, app.photofox.vipsffm.VipsOption...),insert(int, int, app.photofox.vipsffm.VipsOption...).- Parameters:
direction-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- OptionalArg:
- 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(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 on the right) or left-right (with at the bottom) given an approximate pair of tie-points. is scaled and rotated as necessary before the join.
If is
TRUE, before performing the transformation, the tie-points are improved by searching an area of of size for a object of size in .limits 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.enums.VipsDirection, int, int, app.photofox.vipsffm.VipsOption...),insert(int, int, app.photofox.vipsffm.VipsOption...),globalbalance(app.photofox.vipsffm.VipsOption...).- Parameters:
direction-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- OptionalArg:
- 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 to 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- OptionalArg:
- band
VipsOption.IntBand to msb
-
multiply
This operation calculates * and writes the result to .
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:<table> <title>VipsMultiply type promotion</title> <tgroup cols='2' align='left' colsep='1' rowsep='1'> <thead> <row> <entry>input type</entry> <entry>output type</entry> </row> </thead> <tbody> <row> <entry>uchar</entry> <entry>ushort</entry> </row> <row> <entry>char</entry> <entry>short</entry> </row> <row> <entry>ushort</entry> <entry>uint</entry> </row> <row> <entry>short</entry> <entry>int</entry> </row> <row> <entry>uint</entry> <entry>uint</entry> </row> <row> <entry>int</entry> <entry>int</entry> </row> <row> <entry>float</entry> <entry>float</entry> </row> <row> <entry>double</entry> <entry>double</entry> </row> <row> <entry>complex</entry> <entry>complex</entry> </row> <row> <entry>double complex</entry> <entry>double complex</entry> </row> </tbody> </tgroup> </table>In other words, the output type is just large enough to hold the whole range of possible values.
See also:
add(app.photofox.vipsffm.VipsOption...),linear(java.util.List<java.lang.Double>, java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...).- Parameters:
args- 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:
vips_image_new_from_file.- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
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 reads the highest-resolution level (level 0). Set to 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 to the image's name. A slide's associated images are listed in the "slide-associated-images" metadata item.
If you set , then all associated images are attached as metadata items. Use
vips_image_get_imageon to 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 to enable RGB output.
See also:
vips_image_new_from_file.- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Exactly as
openslideload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.String, app.photofox.vipsffm.VipsOption...)instead.Use to select a page to render, numbering from zero.
Use to 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". Use
grid(int, int, int, app.photofox.vipsffm.VipsOption...)to change page layout.Use to set the rendering resolution. The default is 72. Additionally, you can scale by setting . If you set both, they combine.
Use to set the background RGBA colour. The default is 255 (solid white), use eg. 0 for a transparent background.
Use to 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:
vips_image_new_from_file,magickload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.String, app.photofox.vipsffm.VipsOption...), but read from memory.You must not free the buffer while is active. The #VipsObject::postclose signal on is a good place to free.
See also:
pdfload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
buffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Exactly as
pdfload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
pdfload(java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 returns (through the parameter) the threshold below which there are values of . For example:
$ vips percent k2.jpg 90 214Means that 90% of pixels in `k2.jpg` have 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:
vips_hist_find,profile(app.photofox.vipsffm.VipsOption...).- Parameters:
percent- Percent of pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
perlin
Create a one-band float image of Perlin noise. See:
https://en.wikipedia.org/wiki/Perlin_noise
Use to set the size of the cells from which the image is constructed. The default is 256 x 256.
If and are multiples of , the image will tessellate.
Normally, output pixels are
VipsBandFormat.FORMAT_FLOATin the range [-1, +1]. Set to output a uchar image with pixels in [0, 255].See also:
worley(int, int, app.photofox.vipsffm.VipsOption...),fractsurf(int, int, double, app.photofox.vipsffm.VipsOption...),gaussnoise(int, int, app.photofox.vipsffm.VipsOption...).- Parameters:
width- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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...),vips_cross_phase,- Parameters:
args- 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 to 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 to disable these limits.
See also:
vips_image_new_from_file.- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.String, app.photofox.vipsffm.VipsOption...), but read from a PNG-formatted memory block.You must not free the buffer while is active. The #VipsObject::postclose signal on is a good place to free.
See also:
pngload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
buffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Exactly as
pngload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
pngload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.
means compress with this much effort (0 - 9). Default 6.
Set to
TRUEto 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 to specify one or more filters, defaults to none, see #VipsForeignPngFilter.
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 to
TRUEto enable palette mode for RGB or RGBA images. A palette will be computed with enough space for (1, 2, 4 or 8) bits. Use to set the optimisation effort, to set the degree of Floyd-Steinberg dithering and to 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 is either 8 or 16 depending on the interpretation. You can also set for 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:
vips_image_new_from_file.- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 in@len. You are responsible for freeing the buffer with g_free() when you are done with it.See also:
pngsave(java.lang.String, app.photofox.vipsffm.VipsOption...),vips_image_write_to_file.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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...),vips_image_write_to_target.- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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:
vips_image_new_from_file.- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Exactly as
ppmload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
ppmload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 to
TRUEto write as human-readable ASCII. Normally data is written in binary.Set to 1 to write a one-bit image.
defaults to the sub-type for this filename suffix.
See also:
vips_image_write_to_file.- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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- OptionalArg:
- 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], {@optionalArg maxAlpha}); norm = alpha / {@optionalArg maxAlpha}; 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.has the default value 255, or 65535 for images tagged as
VipsInterpretation.INTERPRETATION_RGB16orVipsInterpretation.INTERPRETATION_GREY16.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- OptionalArg:
- 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,scharr(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
profile
profile searches inward from the edge of and finds the first non-zero pixel. Pixels in have the distance from the top edge to the first non-zero pixel in that column, has the distance from the left edge to the first non-zero pixel in that row.
See also:
project(app.photofox.vipsffm.VipsOption...),vips_hist_find.- 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:
vips_hist_find,profile(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
quadratic
This operation is unfinished and unusable, sorry.
See also:
affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 (likevips_extract_area) 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:
vips_image_new_from_file.- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.String, app.photofox.vipsffm.VipsOption...), but read from a HDR-formatted memory block.You must not free the buffer while is active. The #VipsObject::postclose signal on is a good place to free.
See also:
radload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
buffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Exactly as
radload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
radload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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:
vips_image_write_to_file.- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 in@len. You are responsible for freeing the buffer with g_free() when you are done with it.See also:
radsave(java.lang.String, app.photofox.vipsffm.VipsOption...),vips_image_write_to_file.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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- OptionalArg:
- 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 does rank filtering on an image. A window of size by is passed over the image. At each position, the pixels inside the window are sorted into ascending order and the pixel at position is output. numbers 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.VipsOption...),vips_median,spcor(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 VImage rawload(String filename, int width, int height, int bands, VipsOption... args) throws VipsError This operation mmaps the file, setting up so that access to that image will read from the file.
By default, it assumes uchar pixels. Use to select something else.
The image will be tagged as
VipsInterpretation.INTERPRETATION_MULTIBAND. Use to select something else.Use
byteswap(app.photofox.vipsffm.VipsOption...)to reverse the byte ordering if necessary.See also:
vips_image_new_from_file,copy(app.photofox.vipsffm.VipsOption...),byteswap(app.photofox.vipsffm.VipsOption...).- Parameters:
filename- 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- OptionalArg:
- 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 to the file with no header or other metadata.
See also:
vips_image_write_to_file.- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
-
rawsaveFd
Writes the pixels in to the with no header or other metadata. Handy for implementing other savers.
See also:
rawsave(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
fd- File descriptor to write toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 is treated as an n-element vector, where n is the number of bands in , and multiplied by the n x m matrix to produce the m-band image .
is always float, unless is double, in which case is double too. No complex images allowed.
It's useful for various sorts of colour space conversions.
See also:
bandmean(app.photofox.vipsffm.VipsOption...).- Parameters:
args- 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 by a pair of factors with a pair of 1D kernels. This will not work well for shrink factors greater than three.
Set to speed up reducing by having
shrink(double, double, double, double, app.photofox.vipsffm.VipsOption...)to shrink with a box filter first. The bigger , the closer the result to the fair resampling. The smaller , 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- OptionalArg:
- kernel
VipsOption.EnumVipsKernelResampling kernel, gapVipsOption.DoubleReducing gap, centreVipsOption.BooleanUse centre sampling convention
-
reduceh
Reduce horizontally by a float factor. The pixels in are interpolated with a 1D mask generated by .
Set to speed up reducing by having
shrinkh(int, int, app.photofox.vipsffm.VipsOption...)to shrink with a box filter first. The bigger , the closer the result to the fair resampling. The smaller , 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- OptionalArg:
- kernel
VipsOption.EnumVipsKernelResampling kernel, gapVipsOption.DoubleReducing gap, centreVipsOption.BooleanUse centre sampling convention
-
reducev
Reduce vertically by a float factor. The pixels in are interpolated with a 1D mask generated by .
Set to speed up reducing by having
shrinkv(int, int, app.photofox.vipsffm.VipsOption...)to shrink with a box filter first. The bigger , the closer the result to the fair resampling. The smaller , 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- OptionalArg:
- kernel
VipsOption.EnumVipsKernelResampling kernel, gapVipsOption.DoubleReducing gap, centreVipsOption.BooleanUse centre sampling convention
-
relational
Perform various relational operations on pairs of images.
The output type is always uchar, with 0 for FALSE and 255 for TRUE.
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:
vips_boolean,bandbool(app.photofox.vipsffm.enums.VipsOperationBoolean, app.photofox.vipsffm.VipsOption...),vips_relational_const.- Parameters:
relational-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 FALSE and 255 for TRUE.
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:
vips_boolean,relational(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 % (remainder after integer division) and writes the result to . The images may have any non-complex format. For float formats, remainder calculates
@in1-@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:
vips_remainder_const,divide(app.photofox.vipsffm.VipsOption...),round(app.photofox.vipsffm.enums.VipsOperationRound, app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
remainderConst
This operation calculates % (remainder after division by an array of constants) and writes the result to . The image may have any non-complex format. For float formats,
vips_remainder_constcalculates - * floor ( / ).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.VipsOption...),divide(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
-
replicate
Repeats an image many times.
See also:
vips_extract_area.- 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 to speed up downsizing by having
shrink(double, double, double, double, app.photofox.vipsffm.VipsOption...)to shrink with a box filter first. The bigger , the closer the result to the fair resampling. The smaller , the faster resizing. The default value is 2.0 (very close to fair resampling while still being faster in many cases).resize normally uses
VipsKernel.KERNEL_LANCZOS3for the final reduce, you can change this with . Downsizing is done with centre convention.When upsizing ( > 1), the operation uses
affine(java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...)with a #VipsInterpolate selected depending on . It will use #VipsInterpolateBicubic forVipsKernel.KERNEL_CUBICand above. It adds a 0.5 pixel displacement to the input pixels to get centre convention scaling.resize normally maintains the image aspect ratio. If you set , that factor is used for the vertical scale and for 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- OptionalArg:
- 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 by 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 by 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- OptionalArg:
- 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 from@scaleand . 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...), #VipsInterpolate.- Parameters:
angle- Rotate anticlockwise by this many degreesargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 is always the same as , 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. The input image can be 8 or 16-bit.
If the input image is tagged as
VipsInterpretation.INTERPRETATION_RGB16, any extra channels after RGB are divided by 256. Thus, scRGB alpha is always 0 - 255.99.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 to 16 to get 16-bit output.
If is 16, any extra channels after RGB are multiplied by 256.
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- OptionalArg:
- 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 to 16 to get 16-bit output.
If is 16, any extra channels after RGB are multiplied by 256.
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- OptionalArg:
- 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 is set, transform with log10(1.0 + pow(x, )) + .5, then scale so max == 255. By default, is 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- OptionalArg:
- 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.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
sequential
This operation behaves rather like
copy(app.photofox.vipsffm.VipsOption...)between images and , except that it checks that pixels on are only requested top-to-bottom. This operation is useful for loading file formats which are strictly top-to-bottom, like PNG.can be used to set the size of the tiles that sequential uses. The default value is 1.
See also:
cache(app.photofox.vipsffm.VipsOption...),linecache(app.photofox.vipsffm.VipsOption...),tilecache(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 to generate a high-frequency signal. This signal is passed through a lookup table formed from the five parameters and added back to .
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 parameter 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.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 by a pair of factors with a simple box filter. For non-integer factors, shrink will first shrink by the integer part with a box filter, then use
reduce(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- OptionalArg:
- ceil
VipsOption.BooleanRound-up output dimensions
-
shrinkh
Shrink horizontally by an integer factor. Each pixel in the output is the average of the corresponding line of pixels 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- OptionalArg:
- ceil
VipsOption.BooleanRound-up output dimensions
-
shrinkv
Shrink vertically by an integer factor. Each pixel in the output is the average of the corresponding column of pixels 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- OptionalArg:
- 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 from and . 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...), #VipsInterpolate.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- scale
VipsOption.DoubleScale by this factor, angleVipsOption.DoubleRotate anticlockwise 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 and respectively. 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 to output [0, 255].
See also:
grey(int, int, app.photofox.vipsffm.VipsOption...),xyz(int, int, app.photofox.vipsffm.VipsOption...).- Parameters:
width- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 to pick the method vips uses to decide which bits of the image should be kept.
You can test xoffset / yoffset on to find the location of the crop within the input image.
See also:
vips_extract_area.- Parameters:
width- Width of extract areaheight- Height of extract areaargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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,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.
is placed at every position in and 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 centred 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.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
spectrum
Make a displayable (ie. 8-bit unsigned int) power spectrum.
If is non-complex, it is transformed to Fourier space. Then the absolute value is passed through
scale(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. is a one-band
VipsBandFormat.FORMAT_DOUBLEimage of at least 10 columns by n + 1 (where n is number of bands in image ) 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 of stats 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 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) = {@optionalArg a} * {@optionalArg m0} + (1 - {@optionalArg a}) * meanv + (vin(i,j) - meanv) * ({@optionalArg b} * {@optionalArg s0}) / ({@optionalArg s0} + {@optionalArg b} * stdv)Values , , and are entered, while meanv and stdv are the values calculated over a moving window of size , centred on pixel (i,j). is the new mean, is the weight given to it. is the new standard deviation, is 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:
vips_hist_local.- Parameters:
width- Window width in pixelsheight- Window height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 is 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- OptionalArg:
- point
VipsOption.BooleanPoint sample
-
subtract
This operation calculates
@in1-@in2and writes the result to .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:<table> <title>VipsSubtract type promotion</title> <tgroup cols='2' align='left' colsep='1' rowsep='1'> <thead> <row> <entry>input type</entry> <entry>output type</entry> </row> </thead> <tbody> <row> <entry>uchar</entry> <entry>short</entry> </row> <row> <entry>char</entry> <entry>short</entry> </row> <row> <entry>ushort</entry> <entry>int</entry> </row> <row> <entry>short</entry> <entry>int</entry> </row> <row> <entry>uint</entry> <entry>int</entry> </row> <row> <entry>int</entry> <entry>int</entry> </row> <row> <entry>float</entry> <entry>float</entry> </row> <row> <entry>double</entry> <entry>double</entry> </row> <row> <entry>complex</entry> <entry>complex</entry> </row> <row> <entry>double complex</entry> <entry>double complex</entry> </row> </tbody> </tgroup> </table>In other words, the output type is just large enough to hold the whole range of possible values.
See also:
add(app.photofox.vipsffm.VipsOption...),linear(java.util.List<java.lang.Double>, java.util.List<java.lang.Double>, app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError
-
sum
This operation sums all images in and writes the result to .
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:<table> <title>VipsSum type promotion</title> <tgroup cols='2' align='left' colsep='1' rowsep='1'> <thead> <row> <entry>input type</entry> <entry>output type</entry> </row> </thead> <tbody> <row> <entry>uchar</entry> <entry>uint</entry> </row> <row> <entry>char</entry> <entry>int</entry> </row> <row> <entry>ushort</entry> <entry>uint</entry> </row> <row> <entry>short</entry> <entry>int</entry> </row> <row> <entry>uint</entry> <entry>uint</entry> </row> <row> <entry>int</entry> <entry>int</entry> </row> <row> <entry>float</entry> <entry>float</entry> </row> <row> <entry>double</entry> <entry>double</entry> </row> <row> <entry>complex</entry> <entry>complex</entry> </row> <row> <entry>double complex</entry> <entry>double complex</entry> </row> </tbody> </tgroup> </table>In other words, the output type is just large enough to hold the whole range of possible values.
See also:
add(app.photofox.vipsffm.VipsOption...).- Parameters:
in- 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 to set the rendering resolution. The default is 72. You can also scale the rendering by .
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 to allow SVGs of any size.
See also:
vips_image_new_from_file.- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- dpi
VipsOption.DoubleRender at this DPI, scaleVipsOption.DoubleScale output by this factor, unlimitedVipsOption.BooleanAllow SVG of any size, 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.String, app.photofox.vipsffm.VipsOption...), but read from a memory buffer.You must not free the buffer while is active. The #VipsObject::postclose signal on is a good place to free.
See also:
svgload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
buffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- dpi
VipsOption.DoubleRender at this DPI, scaleVipsOption.DoubleScale output by this factor, unlimitedVipsOption.BooleanAllow SVG of any size, 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
Exactly as
svgload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
svgload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- dpi
VipsOption.DoubleRender at this DPI, scaleVipsOption.DoubleScale output by this factor, unlimitedVipsOption.BooleanAllow SVG of any size, 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 images are evaluated and at each point the index of the first non-zero value is written to . If all are false, the value (
@n+ 1) is written.Images in must have one band. They are expanded to the bounding box of the set of images in , and that size is used for . can have up to 255 elements.
Combine with
vips_caseto make an efficient multi-wayifthenelse(app.photofox.vipsffm.VipsOption...).See also:
maplut(app.photofox.vipsffm.VipsOption...),vips_case,ifthenelse(app.photofox.vipsffm.VipsOption...).- Parameters:
tests- Table of images to testargs- Array of VipsOption to apply to this operation- Throws:
VipsError
-
text
Draw the string to an image. is 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 to enable RGBA output. This is useful for colour emoji rendering, or support for pango markup features like `Red!`.
is the text to render as a UTF-8 string. It can contain Pango markup, for example `TheGuardian`.
is the font to render with, as a fontconfig name. Examples might be `sans 12` or perhaps `bitstream charter bold 10`.
You can specify a font to load with . You'll need to also set the name of the font with .
is the number of pixels to word-wrap at. By default, lines of text wider than this will be broken at word boundaries. Use to set lines to wrap on word or character boundaries, or to disable line breaks.
Set to turn on line justification. can 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 than if there are no word breaks, or narrower if the lines don't break exactly at .
is the maximum number of pixels high the generated text can be. This only takes effect when is not set, and is set, making a box. In this case, text will search for a and set of line breaks which will just fit the text into and .
You can use to read out the DPI selected by auto fit.
sets the resolution to render at. "sans 12" at 72 dpi draws characters approximately 12 pixels high.
sets 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 several text.
See also:
bandjoin(java.util.List<app.photofox.vipsffm.VImage>, app.photofox.vipsffm.VipsOption...),composite(java.util.List<app.photofox.vipsffm.VImage>, java.util.List<java.lang.Integer>, app.photofox.vipsffm.VipsOption...).- Parameters:
text- Text to renderargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Make a thumbnail from a file. Shrinking is done in three stages: using any shrink-on-load features available in the file import 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
vips_thumbnail_bufferto thumbnail from a memory buffer, orvips_thumbnail_sourceto thumbnail from an arbitrary byte source.By default, libvips will only the first frame of animated or multipage images. To thumbnail all pages or frames, pass `n=-1` to the loader in , for example `"x.gif[n=-1]"`.
The output image will fit within a square of size x . You can specify a separate height with the option. Set either or to a very large number to ignore that dimension.
If you set , then the output image will fill the whole of the x rectangle, with any excess cropped away. See
smartcrop(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 is set to
VipsSize.SIZE_UP, the operation will only upsize and will just copy if asked to downsize. If is set toVipsSize.SIZE_DOWN, the operation will only downsize and will just copy if asked to upsize. If isVipsSize.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 to
TRUE, these tags will not be interpreted.Shrinking is normally done in sRGB colourspace. Set to 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 to the filename of an ICC profile, the image will be transformed to the target colourspace before writing to the output. You can also give an which will be used if the input image has no ICC profile, or if the profile embedded in the input image is broken.
Use to set the rendering intent for any ICC transform. The default is
VipsIntent.INTENT_RELATIVE.Use to control the types of error that will cause loading to fail. The default is
VipsFailOn.FAIL_ON_NONE, ie. thumbnail is permissive.See also:
vips_thumbnail_buffer.- Parameters:
filename- Filename to read fromwidth- Size to this widthargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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, import-profileVipsOption.StringFallback import profile, export-profileVipsOption.StringFallback export profile, intentVipsOption.EnumVipsIntentRendering intent, auto-rotateVipsOption.BooleanUse orientation tags to rotate image upright, fail-onVipsOption.EnumVipsFailOnError level to fail on
-
thumbnailBuffer
Exactly as
thumbnail(java.lang.String, int, app.photofox.vipsffm.VipsOption...), but read from a memory buffer. One extra optional argument, , lets you pass options to the underlying loader.See also:
thumbnail(java.lang.String, int, app.photofox.vipsffm.VipsOption...).- Parameters:
buffer- Buffer to load fromwidth- Size to this widthargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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, import-profileVipsOption.StringFallback import profile, export-profileVipsOption.StringFallback export profile, intentVipsOption.EnumVipsIntentRendering intent, auto-rotateVipsOption.BooleanUse orientation tags to rotate image upright, fail-onVipsOption.EnumVipsFailOnError level to fail on
-
thumbnailImage
Exactly as
thumbnail(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.String, int, app.photofox.vipsffm.VipsOption...)` and produce poorer quality output. Only use it if you really have to.See also:
thumbnail(java.lang.String, int, app.photofox.vipsffm.VipsOption...).- Parameters:
width- Size to this widthargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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, import-profileVipsOption.StringFallback import profile, export-profileVipsOption.StringFallback export profile, intentVipsOption.EnumVipsIntentRendering intent, auto-rotateVipsOption.BooleanUse orientation tags to rotate image upright, fail-onVipsOption.EnumVipsFailOnError level to fail on
-
thumbnailSource
Exactly as
thumbnail(java.lang.String, int, app.photofox.vipsffm.VipsOption...), but read from a source. One extra optional argument, , lets you pass options to the underlying loader.See also:
thumbnail(java.lang.String, int, app.photofox.vipsffm.VipsOption...).- Parameters:
source- Source to load fromwidth- Size to this widthargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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, import-profileVipsOption.StringFallback import profile, export-profileVipsOption.StringFallback export profile, intentVipsOption.EnumVipsIntentRendering intent, auto-rotateVipsOption.BooleanUse orientation tags to rotate image upright, fail-onVipsOption.EnumVipsFailOnError level to fail on
-
tiffload
during load
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.
means load this page from the file. By default the first page (page 0) is read.
means 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. The
VIPS_META_PAGE_HEIGHTmetadata tag gives the height in pixels of each page. Use -1 to load all pages.Setting to
TRUEwill make the loader interpret the orientation tag and automatically rotate the image appropriately during load.If is
FALSE, the metadata fieldVIPS_META_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 useVIPS_META_ORIENTATION, if present, to set the orientation of output images.If is TRUE, the image will be rotated upright during load and no metadata attached. This can be very slow.
If is -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.
Any ICC profile is read and attached to the VIPS image as
VIPS_META_ICC_NAME. Any XMP metadata is read and attached to the image asVIPS_META_XMP_NAME. Any IPTC is attached asVIPS_META_IPTC_NAME. The image description is attached asVIPS_META_IMAGEDESCRIPTION. Data in the photoshop tag is attached asVIPS_META_PHOTOSHOP_NAME.See also:
vips_image_new_from_file,autorot(app.photofox.vipsffm.VipsOption...).- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- page
VipsOption.IntFirst page to load, subifdVipsOption.IntSubifd index, nVipsOption.IntNumber of pages to load, -1 for all, autorotateVipsOption.BooleanRotate image using orientation tag, 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
during load
Read a TIFF-formatted memory block into a VIPS image. Exactly as
tiffload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a memory source.You must not free the buffer while is active. The #VipsObject::postclose signal on is a good place to free.
See also:
tiffload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
buffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- page
VipsOption.IntFirst page to load, subifdVipsOption.IntSubifd index, nVipsOption.IntNumber of pages to load, -1 for all, autorotateVipsOption.BooleanRotate image using orientation tag, 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
during load
Exactly as
tiffload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
tiffload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- page
VipsOption.IntFirst page to load, subifdVipsOption.IntSubifd index, nVipsOption.IntNumber of pages to load, -1 for all, autorotateVipsOption.BooleanRotate image using orientation tag, 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 has the
VIPS_META_PAGE_HEIGHTmetadata item, this is assumed to be a "toilet roll" image. It will be written as series of pages, eachVIPS_META_PAGE_HEIGHTpixels high.Use to 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 to save as 8-bit CIELAB.
Use to set the JPEG compression factor. Default 75.
User to set the ZSTD compression level. Use to set WEBP lossless mode on. Use to set the WEBP compression level.
Use to set the predictor for lzw, deflate and zstd compression. It defaults to
VipsForeignTiffPredictor.FOREIGN_TIFF_PREDICTOR_HORIZONTAL, meaning horizontal differencing. Please refer to the libtiff specifications for further discussion of various predictors.Set to TRUE to write a tiled tiff. By default tiff are written in strips. Use and to set the tile size. The defaiult is 128 by 128.
Set to write the image as a set of images, one per page, of decreasing size. Use to 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 to stop when the image fits in one pixel, or to only write a single layer.
Set to 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 set , it will use 0 for a white bit. Many pre-press applications only work with images which use this sense. only 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 case is 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 case is set to true this behavior is inverted.
Use to override the default resolution unit. The default resolution unit is taken from the header field
VIPS_META_RESOLUTION_UNIT. If this field is not set, then VIPS defaults to cm.Use and to 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 to attempt to write a bigtiff. Bigtiff is a variant of the TIFF format that allows more than 4GB in a file.
Set to write all vips metadata to the IMAGEDESCRIPTION tag as xml. If is not set, the value of
VIPS_META_IMAGEDESCRIPTIONis used instead.The value of
VIPS_META_XMP_NAMEis written to the XMP tag.VIPS_META_ORIENTATION(if set) is used to set the value of the orientation tag.VIPS_META_IPTC(if set) is used to set the value of the IPTC tag.VIPS_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 to save pyramid layers as sub-directories of the main image. Setting this option can improve compatibility with formats like OME.
Set to save with premultiplied alpha. Some programs, such as InDesign, will only work with premultiplied alpha.
See also:
tiffload(java.lang.String, app.photofox.vipsffm.VipsOption...),vips_image_write_to_file.- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.IntZSTD 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 in@len. You are responsible for freeing the buffer with g_free() when you are done with it.See also:
tiffsave(java.lang.String, app.photofox.vipsffm.VipsOption...),vips_image_write_to_file.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.IntZSTD 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...),vips_image_write_to_target.- Parameters:
target- Target to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.IntZSTD 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 images and , except that it keeps a cache of computed pixels. This cache is made of up to tiles (a value of -1 means any number of tiles), and each tile is of size by pixels.Each cache tile is made with a single call to
vips_region_prepare.When the cache fills, a tile is chosen for reuse. If is
VipsAccess.ACCESS_RANDOM, then the least-recently-used tile is reused. If isVipsAccess.ACCESS_SEQUENTIALthe top-most tile is reused.By default, and are 128 pixels, and the operation will cache up to 1,000 tiles. defaults to
VipsAccess.ACCESS_RANDOM.Normally, only a single thread at once is allowed to calculate tiles. If you set to
TRUE, tilecache will allow many threads to calculate tiles at once, and share the cache between them.Normally the cache is dropped when computation finishes. Set to
TRUEto keep the cache between computations.See also:
cache(app.photofox.vipsffm.VipsOption...),linecache(app.photofox.vipsffm.VipsOption...).- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 generates a tone curve for the adjustment of image levels. It 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 ( + 1) entries, each in the range [0, ].
, are expressed as 0-100, as in LAB colour space. You specify the scaling for the input and output images with the and parameters.
- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
VIPS_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
VIPS_META_PAGE_HEIGHTmetadata item with the optional parameter.VIPS_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- OptionalArg:
- page-height
VipsOption.IntHeight of each input page
-
unpremultiply
Unpremultiplies any alpha channel. Band (by default the final band) contains the alpha and all other bands are transformed as:
alpha = (int) clip(0, in[in.bands - 1], {@optionalArg maxAlpha}); norm = (double) alpha / {@optionalArg maxAlpha}; 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.has the default value 255, or 65535 for images tagged as
VipsInterpretation.INTERPRETATION_RGB16orVipsInterpretation.INTERPRETATION_GREY16.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- OptionalArg:
- 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:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Exactly as
vipsload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 to in VIPS format.
See also:
vipsload(java.lang.String, app.photofox.vipsffm.VipsOption...).- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
As
vipssave(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- OptionalArg:
- 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 to select a page to render, numbering from zero.
Use to 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". Use
grid(int, int, int, app.photofox.vipsffm.VipsOption...)to change page layout.Use to 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:
vips_image_new_from_file.- Parameters:
filename- Filename to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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.String, app.photofox.vipsffm.VipsOption...), but read from a memory buffer.You must not free the buffer while is active. The #VipsObject::postclose signal on is a good place to free.
See also:
webpload(java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
buffer- Buffer to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
Exactly as
webpload(java.lang.String, app.photofox.vipsffm.VipsOption...), but read from a source.See also:
webpload(java.lang.String, app.photofox.vipsffm.VipsOption...)- Parameters:
source- Source to load fromargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 giving the WebP quality factor. It has the range 0 - 100, with the default 75.
Use to hint the image type to the lossy compressor. The default is
VipsForeignWebpPreset.FOREIGN_WEBP_PRESET_DEFAULT.Set to enable high quality chroma subsampling.
Use to set the quality for the alpha channel in lossy mode. It has the range 1 - 100, with the default 100.
Use to 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.
Set to use lossless compression, or combine with 80, 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, will try to optimize for minimum size.
For animated webp output, sets the maximum number of frames between keyframes. Setting 0 means only keyframes. sets the minimum number of frames between frames. Setting 0 means no keyframes. By default, keyframes are disabled.
For animated webp output, tries to improve the file size by mixing both lossy and lossless encoding.
Use the metadata items `loop` and `delay` to set the number of loops for the animation and the frame delays.
See also:
webpload(java.lang.String, app.photofox.vipsffm.VipsOption...),vips_image_write_to_file.- Parameters:
filename- Filename to save toargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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, reduction-effortVipsOption.IntLevel of CPU effort to reduce file size, mixedVipsOption.BooleanAllow mixed encoding (might reduce file size), 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 in@len. You are responsible for freeing the buffer with g_free() when 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- OptionalArg:
- 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, reduction-effortVipsOption.IntLevel of CPU effort to reduce file size, mixedVipsOption.BooleanAllow mixed encoding (might reduce file size), 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...),vips_image_write_to_file.- Parameters:
args- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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, reduction-effortVipsOption.IntLevel of CPU effort to reduce file size, mixedVipsOption.BooleanAllow mixed encoding (might reduce file size), 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- OptionalArg:
- 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, reduction-effortVipsOption.IntLevel of CPU effort to reduce file size, mixedVipsOption.BooleanAllow mixed encoding (might reduce file size), 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
Create a one-band float image of Worley noise. See:
https://en.wikipedia.org/wiki/Worley_noise
Use to set the size of the cells from which the image is constructed. The default is 256 x 256.
If and are multiples of , the image will tessellate.
See also:
perlin(int, int, app.photofox.vipsffm.VipsOption...),fractsurf(int, int, double, app.photofox.vipsffm.VipsOption...),gaussnoise(int, int, app.photofox.vipsffm.VipsOption...).- Parameters:
width- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 , . If and are 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- OptionalArg:
- 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 , , to generate higher dimensions and add more bands. The extra dimensions are placed down the vertical axis. Use
grid(int, int, int, app.photofox.vipsffm.VipsOption...)to change the layout.See also:
grey(int, int, app.photofox.vipsffm.VipsOption...),grid(int, int, int, app.photofox.vipsffm.VipsOption...),identity(app.photofox.vipsffm.VipsOption...).- Parameters:
width- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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 to output [0, 255].
See also:
eye(int, int, app.photofox.vipsffm.VipsOption...),xyz(int, int, app.photofox.vipsffm.VipsOption...).- Parameters:
width- Image width in pixelsheight- Image height in pixelsargs- Array of VipsOption to apply to this operation- Throws:
VipsError- OptionalArg:
- 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
-
writeToFile
- Throws:
VipsError
-
write
-
writeToTarget
- Throws:
VipsError
-
newImage
-
getUnsafeStructAddress()