Show / Hide Table of Contents

Class Image

Wrap a NetVips.Internal.VipsImage object.

Inheritance
object
CriticalFinalizerObject
SafeHandle
GObject
VipsObject
Image
MutableImage
Implements
IDisposable
Inherited Members
VipsObject.OnPostClose
VipsObject.GetBlurb(string)
VipsObject.GetDescription()
GObject.SignalConnect<T>(string, T, nint)
GObject.SignalHandlerDisconnect(ulong)
GObject.SignalHandlersDisconnectByFunc<T>(T, nint)
GObject.SignalHandlersDisconnectByData(nint)
GObject.ReleaseHandle()
GObject.IsInvalid
SafeHandle.handle
SafeHandle.Close()
SafeHandle.DangerousAddRef(ref bool)
SafeHandle.DangerousGetHandle()
SafeHandle.DangerousRelease()
SafeHandle.Dispose()
SafeHandle.Dispose(bool)
SafeHandle.SetHandle(IntPtr)
SafeHandle.SetHandleAsInvalid()
SafeHandle.IsClosed
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: NetVips
Assembly: NetVips.dll
Syntax
public class Image : VipsObject, IDisposable

Properties

Bands

Number of bands in image

Declaration
public int Bands { get; }
Property Value
Type Description
int

Coding

Pixel coding

Declaration
public Enums.Coding Coding { get; }
Property Value
Type Description
Enums.Coding

Filename

Image filename

Declaration
public string Filename { get; }
Property Value
Type Description
string

Format

Pixel format in image

Declaration
public Enums.BandFormat Format { get; }
Property Value
Type Description
Enums.BandFormat

Height

Image height in pixels

Declaration
public int Height { get; }
Property Value
Type Description
int

Interpretation

Pixel interpretation

Declaration
public Enums.Interpretation Interpretation { get; }
Property Value
Type Description
Enums.Interpretation

this[int]

Overload [].

Declaration
public Image this[int i] { get; }
Parameters
Type Name Description
int i

The band element to pull out.

Property Value
Type Description
Image

A new Image.

Remarks

Use [] to pull out band elements from an image. For example:

using var green = rgbImage[1];

Will make a new one-band image from band 1 (the middle band).

this[int, int]

A synonym for Getpoint(int, int, bool?).

Declaration
public double[] this[int x, int y] { get; }
Parameters
Type Name Description
int x

Point to read.

int y

Point to read.

Property Value
Type Description
double[]

An array of doubles.

Examples
double[] outArray = in[x, y];

PageHeight

Multi-page images can have a page height. If page-height is not set, it defaults to the image height.

Declaration
public int PageHeight { get; }
Property Value
Type Description
int
Remarks

At least libvips 8.8 is needed.

Width

Image width in pixels

Declaration
public int Width { get; }
Property Value
Type Description
int

Xoffset

Horizontal offset of origin

Declaration
public int Xoffset { get; }
Property Value
Type Description
int

Xres

Horizontal resolution in pixels/mm

Declaration
public double Xres { get; }
Property Value
Type Description
double

Yoffset

Vertical offset of origin

Declaration
public int Yoffset { get; }
Property Value
Type Description
int

Yres

Vertical resolution in pixels/mm

Declaration
public double Yres { get; }
Property Value
Type Description
double

Methods

Abs()

Absolute value of an image.

Declaration
public Image Abs()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Abs();

Acos()

Return the inverse cosine of an image in degrees.

Declaration
public Image Acos()
Returns
Type Description
Image

A new Image.

Acosh()

Return the inverse hyperbolic cosine of an image in radians.

Declaration
public Image Acosh()
Returns
Type Description
Image

A new Image.

Add(Image)

Add two images.

Declaration
public Image Add(Image right)
Parameters
Type Name Description
Image right

Right-hand image argument.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = left.Add(right);

AddAlpha()

Append an alpha channel to an image.

Declaration
public Image AddAlpha()
Returns
Type Description
Image

A new Image.

Examples
using rgba = rgb.AddAlpha();

Affine(double[], GObject, int[], double?, double?, double?, double?, double[], bool?, Extend?)

Affine transform of an image.

Declaration
public Image Affine(double[] matrix, GObject interpolate = null, int[] oarea = null, double? odx = null, double? ody = null, double? idx = null, double? idy = null, double[] background = null, bool? premultiplied = null, Enums.Extend? extend = null)
Parameters
Type Name Description
double[] matrix

Transformation matrix.

GObject interpolate

Interpolate pixels with this.

int[] oarea

Area of output to generate.

double? odx

Horizontal output displacement.

double? ody

Vertical output displacement.

double? idx

Horizontal input displacement.

double? idy

Vertical input displacement.

double[] background

Background value.

bool? premultiplied

Images have premultiplied alpha.

Enums.Extend? extend

How to generate the extra pixels.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Affine(matrix, interpolate: GObject, oarea: int[], odx: double, ody: double, idx: double, idy: double, background: double[], premultiplied: bool, extend: Enums.Extend);

Analyzeload(string, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load an Analyze6 image.

Declaration
public static Image Analyzeload(string filename, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Analyzeload(filename, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Analyzeload(string, bool?, Access?, FailOn?, bool?)

Load an Analyze6 image.

Declaration
public static Image Analyzeload(string filename, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Analyzeload(filename, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Arrayjoin(Image[], int?, int?, double[], Align?, Align?, int?, int?)

Join an array of images.

Declaration
public static Image Arrayjoin(Image[] @in, int? across = null, int? shim = null, double[] background = null, Enums.Align? halign = null, Enums.Align? valign = null, int? hspacing = null, int? vspacing = null)
Parameters
Type Name Description
Image[] in

Array of input images.

int? across

Number of images across grid.

int? shim

Pixels between images.

double[] background

Colour for new pixels.

Enums.Align? halign

Align on the left, centre or right.

Enums.Align? valign

Align on the top, centre or bottom.

int? hspacing

Horizontal spacing between images.

int? vspacing

Vertical spacing between images.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Arrayjoin(@in, across: int, shim: int, background: double[], halign: Enums.Align, valign: Enums.Align, hspacing: int, vspacing: int);

Asin()

Return the inverse sine of an image in degrees.

Declaration
public Image Asin()
Returns
Type Description
Image

A new Image.

Asinh()

Return the inverse hyperbolic sine of an image in radians.

Declaration
public Image Asinh()
Returns
Type Description
Image

A new Image.

Atan()

Return the inverse tangent of an image in degrees.

Declaration
public Image Atan()
Returns
Type Description
Image

A new Image.

Atan2(Image)

Arc tangent of an image in degrees.

Declaration
public Image Atan2(Image x)
Parameters
Type Name Description
Image x

Arc tangent of y / x.

Returns
Type Description
Image

A new Image.

Atan2(double)

Arc tangent of an constant in degrees.

Declaration
public Image Atan2(double x)
Parameters
Type Name Description
double x

Arc tangent of y / x.

Returns
Type Description
Image

A new Image.

Atan2(double[])

Arc tangent of an array in degrees.

Declaration
public Image Atan2(double[] x)
Parameters
Type Name Description
double[] x

Arc tangent of y / x.

Returns
Type Description
Image

A new Image.

Atan2(int[])

Arc tangent of an array in degrees.

Declaration
public Image Atan2(int[] x)
Parameters
Type Name Description
int[] x

Arc tangent of y / x.

Returns
Type Description
Image

A new Image.

Atanh()

Return the inverse hyperbolic tangent of an image in radians.

Declaration
public Image Atanh()
Returns
Type Description
Image

A new Image.

Autorot()

Autorotate image by exif tag.

Declaration
public Image Autorot()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Autorot();

Autorot(out Angle)

Autorotate image by exif tag.

Declaration
public Image Autorot(out Enums.Angle angle)
Parameters
Type Name Description
Enums.Angle angle

Angle image was rotated by.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Autorot(out var angle);

Autorot(out Angle, out bool)

Autorotate image by exif tag.

Declaration
public Image Autorot(out Enums.Angle angle, out bool flip)
Parameters
Type Name Description
Enums.Angle angle

Angle image was rotated by.

bool flip

Whether the image was flipped or not.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Autorot(out var angle, out var flip);

Avg()

Find image average.

Declaration
public double Avg()
Returns
Type Description
double

A double.

Examples
double @out = in.Avg();

BandAnd()

AND image bands together.

Declaration
public Image BandAnd()
Returns
Type Description
Image

A new Image.

BandEor()

EOR image bands together.

Declaration
public Image BandEor()
Returns
Type Description
Image

A new Image.

BandExists(int)

Does band exist in image.

Declaration
public bool BandExists(int i)
Parameters
Type Name Description
int i

The index to fetch.

Returns
Type Description
bool

true if the index exists.

BandOr()

OR image bands together.

Declaration
public Image BandOr()
Returns
Type Description
Image

A new Image.

Bandbool(OperationBoolean)

Boolean operation across image bands.

Declaration
public Image Bandbool(Enums.OperationBoolean boolean)
Parameters
Type Name Description
Enums.OperationBoolean boolean

Boolean to perform.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Bandbool(boolean);

Bandfold(int?)

Fold up x axis into bands.

Declaration
public Image Bandfold(int? factor = null)
Parameters
Type Name Description
int? factor

Fold by this factor.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Bandfold(factor: int);

Bandjoin(params Image[])

Append a set of images bandwise.

Declaration
public Image Bandjoin(params Image[] images)
Parameters
Type Name Description
Image[] images

Array of images.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = image.Bandjoin(image2, image3);

Bandjoin(params double[])

Append a set of constants bandwise.

Declaration
public Image Bandjoin(params double[] doubles)
Parameters
Type Name Description
double[] doubles

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = image.Bandjoin(127.5, 255.0);

Bandjoin(params int[])

Append a set of constants bandwise.

Declaration
public Image Bandjoin(params int[] ints)
Parameters
Type Name Description
int[] ints

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = image.Bandjoin(255, 128);

Bandjoin(params object[])

Append a set of mixed images and constants bandwise.

Declaration
public Image Bandjoin(params object[] objects)
Parameters
Type Name Description
object[] objects

Array of mixed images and constants.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = image.Bandjoin(image2, 255);

BandjoinConst(double[])

Append a constant band to an image.

Declaration
public Image BandjoinConst(double[] c)
Parameters
Type Name Description
double[] c

Array of constants to add.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.BandjoinConst(c);

Bandmean()

Band-wise average.

Declaration
public Image Bandmean()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Bandmean();

Bandrank(Image, int?)

Band-wise rank a image.

Declaration
public Image Bandrank(Image other, int? index = null)
Parameters
Type Name Description
Image other

Input image.

int? index

Select this band element from sorted list.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = image.Bandrank(other, index: int);

Bandrank(Image[], int?)

Band-wise rank a set of images.

Declaration
public Image Bandrank(Image[] images, int? index = null)
Parameters
Type Name Description
Image[] images

Array of input images.

int? index

Select this band element from sorted list.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = image.Bandrank(other, index: int);

Bandrank(double[], int?)

Band-wise rank a set of constants.

Declaration
public Image Bandrank(double[] doubles, int? index = null)
Parameters
Type Name Description
double[] doubles

Array of constants.

int? index

Select this band element from sorted list.

Returns
Type Description
Image

A new Image

Examples
using Image @out = image.Bandrank(other, index: int);

Bandrank(int[], int?)

Band-wise rank a set of constants.

Declaration
public Image Bandrank(int[] ints, int? index = null)
Parameters
Type Name Description
int[] ints

Array of constants.

int? index

Select this band element from sorted list.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = image.Bandrank(other, index: int);

Bandrank(object[], int?)

Band-wise rank a set of mixed images and constants.

Declaration
public Image Bandrank(object[] objects, int? index = null)
Parameters
Type Name Description
object[] objects

Array of mixed images and constants.

int? index

Select this band element from sorted list.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = image.Bandrank(new object[] { image2, 255 }, index: int);

Bandsplit()

Split an n-band image into n separate images.

Declaration
public Image[] Bandsplit()
Returns
Type Description
Image[]

An array of Image.

Bandunfold(int?)

Unfold image bands into x axis.

Declaration
public Image Bandunfold(int? factor = null)
Parameters
Type Name Description
int? factor

Unfold by this factor.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Bandunfold(factor: int);

Black(int, int, int?)

Make a black image.

Declaration
public static Image Black(int width, int height, int? bands = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

int? bands

Number of bands in image.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Black(width, height, bands: int);

Boolean(Image, OperationBoolean)

Boolean operation on two images.

Declaration
public Image Boolean(Image right, Enums.OperationBoolean boolean)
Parameters
Type Name Description
Image right

Right-hand image argument.

Enums.OperationBoolean boolean

Boolean to perform.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = left.Boolean(right, boolean);

BooleanConst(OperationBoolean, double[])

Boolean operations against a constant.

Declaration
public Image BooleanConst(Enums.OperationBoolean boolean, double[] c)
Parameters
Type Name Description
Enums.OperationBoolean boolean

Boolean to perform.

double[] c

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.BooleanConst(boolean, c);

Buildlut()

Build a look-up table.

Declaration
public Image Buildlut()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Buildlut();

Byteswap()

Byteswap an image.

Declaration
public Image Byteswap()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Byteswap();

CMC2LCh()

Transform LCh to CMC.

Declaration
public Image CMC2LCh()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.CMC2LCh();

CMYK2XYZ()

Transform CMYK to XYZ.

Declaration
public Image CMYK2XYZ()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.CMYK2XYZ();

Canny(double?, Precision?)

Canny edge detector.

Declaration
public Image Canny(double? sigma = null, Enums.Precision? precision = null)
Parameters
Type Name Description
double? sigma

Sigma of Gaussian.

Enums.Precision? precision

Convolve with this precision.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Canny(sigma: double, precision: Enums.Precision);

Case(params Image[])

Use pixel values to pick cases from an array of images.

Declaration
public Image Case(params Image[] images)
Parameters
Type Name Description
Image[] images

Array of case images.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = index.Case(images);

Case(params double[])

Use pixel values to pick cases from an array of constants.

Declaration
public Image Case(params double[] doubles)
Parameters
Type Name Description
double[] doubles

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = index.Case(10.5, 20.5);

Case(params int[])

Use pixel values to pick cases from an array of constants.

Declaration
public Image Case(params int[] ints)
Parameters
Type Name Description
int[] ints

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = index.Case(10, 20);

Case(params object[])

Use pixel values to pick cases from an a set of mixed images and constants.

Declaration
public Image Case(params object[] objects)
Parameters
Type Name Description
object[] objects

Array of mixed images and constants.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = index.Case(image, 10);

Cast(BandFormat, bool?)

Cast an image.

Declaration
public Image Cast(Enums.BandFormat format, bool? shift = null)
Parameters
Type Name Description
Enums.BandFormat format

Format to cast to.

bool? shift

Shift integer values up and down.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Cast(format, shift: bool);

Ceil()

Return the largest integral value not greater than the argument.

Declaration
public Image Ceil()
Returns
Type Description
Image

A new Image.

Clamp(double?, double?)

Clamp values of an image.

Declaration
public Image Clamp(double? min = null, double? max = null)
Parameters
Type Name Description
double? min

Minimum value.

double? max

Maximum value.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Clamp(min: double, max: double);

Colourspace(Interpretation, Interpretation?)

Convert to a new colorspace.

Declaration
public Image Colourspace(Enums.Interpretation space, Enums.Interpretation? sourceSpace = null)
Parameters
Type Name Description
Enums.Interpretation space

Destination color space.

Enums.Interpretation? sourceSpace

Source color space.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Colourspace(space, sourceSpace: Enums.Interpretation);

Compass(Image, int?, Angle45?, Combine?, Precision?, int?, int?)

Convolve with rotating mask.

Declaration
public Image Compass(Image mask, int? times = null, Enums.Angle45? angle = null, Enums.Combine? combine = null, Enums.Precision? precision = null, int? layers = null, int? cluster = null)
Parameters
Type Name Description
Image mask

Input matrix image.

int? times

Rotate and convolve this many times.

Enums.Angle45? angle

Rotate mask by this much between convolutions.

Enums.Combine? combine

Combine convolution results like this.

Enums.Precision? precision

Convolve with this precision.

int? layers

Use this many layers in approximation.

int? cluster

Cluster lines closer than this in approximation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Compass(mask, times: int, angle: Enums.Angle45, combine: Enums.Combine, precision: Enums.Precision, layers: int, cluster: int);

Complex(OperationComplex)

Perform a complex operation on an image.

Declaration
public Image Complex(Enums.OperationComplex cmplx)
Parameters
Type Name Description
Enums.OperationComplex cmplx

Complex to perform.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Complex(cmplx);

Complex2(Image, OperationComplex2)

Complex binary operations on two images.

Declaration
public Image Complex2(Image right, Enums.OperationComplex2 cmplx)
Parameters
Type Name Description
Image right

Right-hand image argument.

Enums.OperationComplex2 cmplx

Binary complex operation to perform.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = left.Complex2(right, cmplx);

Complexform(Image)

Form a complex image from two real images.

Declaration
public Image Complexform(Image right)
Parameters
Type Name Description
Image right

Right-hand image argument.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = left.Complexform(right);

Complexget(OperationComplexget)

Get a component from a complex image.

Declaration
public Image Complexget(Enums.OperationComplexget get)
Parameters
Type Name Description
Enums.OperationComplexget get

Complex to perform.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Complexget(get);

Composite(Image, BlendMode, int?, int?, Interpretation?, bool?)

A synonym for Composite2(Image, BlendMode, int?, int?, Interpretation?, bool?).

Declaration
public Image Composite(Image overlay, Enums.BlendMode mode, int? x = null, int? y = null, Enums.Interpretation? compositingSpace = null, bool? premultiplied = null)
Parameters
Type Name Description
Image overlay

Overlay image.

Enums.BlendMode mode

VipsBlendMode to join with.

int? x

x position of overlay.

int? y

y position of overlay.

Enums.Interpretation? compositingSpace

Composite images in this colour space.

bool? premultiplied

Images have premultiplied alpha.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = base.Composite(overlay, mode, x: int, y: int, compositingSpace: Enums.Interpretation, premultiplied: bool);

Composite(Image[], BlendMode[], int[], int[], Interpretation?, bool?)

Blend an array of images with an array of blend modes.

Declaration
public Image Composite(Image[] images, Enums.BlendMode[] modes, int[] x = null, int[] y = null, Enums.Interpretation? compositingSpace = null, bool? premultiplied = null)
Parameters
Type Name Description
Image[] images

Array of input images.

BlendMode[] modes

Array of VipsBlendMode to join with.

int[] x

Array of x coordinates to join at.

int[] y

Array of y coordinates to join at.

Enums.Interpretation? compositingSpace

Composite images in this colour space.

bool? premultiplied

Images have premultiplied alpha.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = image.Composite(images, modes, x: int[], y: int[], compositingSpace: Enums.Interpretation, premultiplied: bool);

Composite2(Image, BlendMode, int?, int?, Interpretation?, bool?)

Blend a pair of images with a blend mode.

Declaration
public Image Composite2(Image overlay, Enums.BlendMode mode, int? x = null, int? y = null, Enums.Interpretation? compositingSpace = null, bool? premultiplied = null)
Parameters
Type Name Description
Image overlay

Overlay image.

Enums.BlendMode mode

VipsBlendMode to join with.

int? x

x position of overlay.

int? y

y position of overlay.

Enums.Interpretation? compositingSpace

Composite images in this colour space.

bool? premultiplied

Images have premultiplied alpha.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = base.Composite2(overlay, mode, x: int, y: int, compositingSpace: Enums.Interpretation, premultiplied: bool);

Conj()

Return the complex conjugate of an image.

Declaration
public Image Conj()
Returns
Type Description
Image

A new Image.

Contains(string)

Check if the underlying image contains an property of metadata.

Declaration
public bool Contains(string name)
Parameters
Type Name Description
string name

The name of the piece of metadata to check for.

Returns
Type Description
bool

true if the metadata exits; otherwise, false.

Conv(Image, Precision?, int?, int?)

Convolution operation.

Declaration
public Image Conv(Image mask, Enums.Precision? precision = null, int? layers = null, int? cluster = null)
Parameters
Type Name Description
Image mask

Input matrix image.

Enums.Precision? precision

Convolve with this precision.

int? layers

Use this many layers in approximation.

int? cluster

Cluster lines closer than this in approximation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Conv(mask, precision: Enums.Precision, layers: int, cluster: int);

Conva(Image, int?, int?)

Approximate integer convolution.

Declaration
public Image Conva(Image mask, int? layers = null, int? cluster = null)
Parameters
Type Name Description
Image mask

Input matrix image.

int? layers

Use this many layers in approximation.

int? cluster

Cluster lines closer than this in approximation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Conva(mask, layers: int, cluster: int);

Convasep(Image, int?)

Approximate separable integer convolution.

Declaration
public Image Convasep(Image mask, int? layers = null)
Parameters
Type Name Description
Image mask

Input matrix image.

int? layers

Use this many layers in approximation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Convasep(mask, layers: int);

Convf(Image)

Float convolution operation.

Declaration
public Image Convf(Image mask)
Parameters
Type Name Description
Image mask

Input matrix image.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Convf(mask);

Convi(Image)

Int convolution operation.

Declaration
public Image Convi(Image mask)
Parameters
Type Name Description
Image mask

Input matrix image.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Convi(mask);

Convsep(Image, Precision?, int?, int?)

Separable convolution operation.

Declaration
public Image Convsep(Image mask, Enums.Precision? precision = null, int? layers = null, int? cluster = null)
Parameters
Type Name Description
Image mask

Input matrix image.

Enums.Precision? precision

Convolve with this precision.

int? layers

Use this many layers in approximation.

int? cluster

Cluster lines closer than this in approximation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Convsep(mask, precision: Enums.Precision, layers: int, cluster: int);

Copy(int?, int?, int?, BandFormat?, Coding?, Interpretation?, double?, double?, int?, int?)

Copy an image.

Declaration
public Image Copy(int? width = null, int? height = null, int? bands = null, Enums.BandFormat? format = null, Enums.Coding? coding = null, Enums.Interpretation? interpretation = null, double? xres = null, double? yres = null, int? xoffset = null, int? yoffset = null)
Parameters
Type Name Description
int? width

Image width in pixels.

int? height

Image height in pixels.

int? bands

Number of bands in image.

Enums.BandFormat? format

Pixel format in image.

Enums.Coding? coding

Pixel coding.

Enums.Interpretation? interpretation

Pixel interpretation.

double? xres

Horizontal resolution in pixels/mm.

double? yres

Vertical resolution in pixels/mm.

int? xoffset

Horizontal offset of origin.

int? yoffset

Vertical offset of origin.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Copy(width: int, height: int, bands: int, format: Enums.BandFormat, coding: Enums.Coding, interpretation: Enums.Interpretation, xres: double, yres: double, xoffset: int, yoffset: int);

CopyMemory()

Copy an image to memory.

Declaration
public Image CopyMemory()
Returns
Type Description
Image

A new Image.

Remarks

A large area of memory is allocated, the image is rendered to that memory area, and a new image is returned which wraps that large memory area.

Exceptions
Type Condition
VipsException

If unable to copy to memory.

Cos()

Return the cosine of an image in degrees.

Declaration
public Image Cos()
Returns
Type Description
Image

A new Image.

Cosh()

Return the hyperbolic cosine of an image in radians.

Declaration
public Image Cosh()
Returns
Type Description
Image

A new Image.

Countlines(Direction)

Count lines in an image.

Declaration
public double Countlines(Enums.Direction direction)
Parameters
Type Name Description
Enums.Direction direction

Countlines left-right or up-down.

Returns
Type Description
double

A double.

Examples
double nolines = in.Countlines(direction);

Crop(int, int, int, int)

A synonym for ExtractArea(int, int, int, int).

Declaration
public Image Crop(int left, int top, int width, int height)
Parameters
Type Name Description
int left

Left edge of extract area.

int top

Top edge of extract area.

int width

Width of extract area.

int height

Height of extract area.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = input.Crop(left, top, width, height);

Csvload(string, out ForeignFlags, int?, int?, string, string, bool?, Access?, FailOn?, bool?)

Load csv.

Declaration
public static Image Csvload(string filename, out Enums.ForeignFlags flags, int? skip = null, int? lines = null, string whitespace = null, string separator = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

int? skip

Skip this many lines at the start of the file.

int? lines

Read this many lines from the file.

string whitespace

Set of whitespace characters.

string separator

Set of separator characters.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Csvload(filename, out var flags, skip: int, lines: int, whitespace: string, separator: string, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Csvload(string, int?, int?, string, string, bool?, Access?, FailOn?, bool?)

Load csv.

Declaration
public static Image Csvload(string filename, int? skip = null, int? lines = null, string whitespace = null, string separator = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

int? skip

Skip this many lines at the start of the file.

int? lines

Read this many lines from the file.

string whitespace

Set of whitespace characters.

string separator

Set of separator characters.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Csvload(filename, skip: int, lines: int, whitespace: string, separator: string, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

CsvloadSource(Source, out ForeignFlags, int?, int?, string, string, bool?, Access?, FailOn?, bool?)

Load csv.

Declaration
public static Image CsvloadSource(Source source, out Enums.ForeignFlags flags, int? skip = null, int? lines = null, string whitespace = null, string separator = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

int? skip

Skip this many lines at the start of the file.

int? lines

Read this many lines from the file.

string whitespace

Set of whitespace characters.

string separator

Set of separator characters.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.CsvloadSource(source, out var flags, skip: int, lines: int, whitespace: string, separator: string, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

CsvloadSource(Source, int?, int?, string, string, bool?, Access?, FailOn?, bool?)

Load csv.

Declaration
public static Image CsvloadSource(Source source, int? skip = null, int? lines = null, string whitespace = null, string separator = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

int? skip

Skip this many lines at the start of the file.

int? lines

Read this many lines from the file.

string whitespace

Set of whitespace characters.

string separator

Set of separator characters.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.CsvloadSource(source, skip: int, lines: int, whitespace: string, separator: string, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

CsvloadStream(Stream, out ForeignFlags, int?, int?, string, string, bool?, Access?, FailOn?, bool?)

Load csv.

Declaration
public static Image CsvloadStream(Stream stream, out Enums.ForeignFlags flags, int? skip = null, int? lines = null, string whitespace = null, string separator = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

int? skip

Skip this many lines at the start of the file.

int? lines

Read this many lines from the file.

string whitespace

Set of whitespace characters.

string separator

Set of separator characters.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.CsvloadStream(stream, out var flags, skip: int, lines: int, whitespace: string, separator: string, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

CsvloadStream(Stream, int?, int?, string, string, bool?, Access?, FailOn?, bool?)

Load csv.

Declaration
public static Image CsvloadStream(Stream stream, int? skip = null, int? lines = null, string whitespace = null, string separator = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

int? skip

Skip this many lines at the start of the file.

int? lines

Read this many lines from the file.

string whitespace

Set of whitespace characters.

string separator

Set of separator characters.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.CsvloadStream(stream, skip: int, lines: int, whitespace: string, separator: string, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Csvsave(string, string, ForeignKeep?, double[], int?, string)

Save image to csv.

Declaration
public void Csvsave(string filename, string separator = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

string separator

Separator characters.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Csvsave(filename, separator: string, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

CsvsaveStream(Stream, string, ForeignKeep?, double[], int?, string)

Save image to csv.

Declaration
public void CsvsaveStream(Stream stream, string separator = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Stream stream

Stream to save to.

string separator

Separator characters.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.CsvsaveStream(stream, separator: string, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

CsvsaveTarget(Target, string, ForeignKeep?, double[], int?, string)

Save image to csv.

Declaration
public void CsvsaveTarget(Target target, string separator = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Target target

Target to save to.

string separator

Separator characters.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.CsvsaveTarget(target, separator: string, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

DE00(Image)

Calculate dE00.

Declaration
public Image DE00(Image right)
Parameters
Type Name Description
Image right

Right-hand input image.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = left.DE00(right);

DE76(Image)

Calculate dE76.

Declaration
public Image DE76(Image right)
Parameters
Type Name Description
Image right

Right-hand input image.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = left.DE76(right);

DECMC(Image)

Calculate dECMC.

Declaration
public Image DECMC(Image right)
Parameters
Type Name Description
Image right

Right-hand input image.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = left.DECMC(right);

Deviate()

Find image standard deviation.

Declaration
public double Deviate()
Returns
Type Description
double

A double.

Examples
double @out = in.Deviate();

Dilate(Image)

Dilate with a structuring element.

Declaration
public Image Dilate(Image mask)
Parameters
Type Name Description
Image mask

The structuring element.

Returns
Type Description
Image

A new Image.

Divide(Image)

Divide two images.

Declaration
public Image Divide(Image right)
Parameters
Type Name Description
Image right

Right-hand image argument.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = left.Divide(right);

Dzsave(string, string, ForeignDzLayout?, string, int?, int?, bool?, ForeignDzDepth?, Angle?, ForeignDzContainer?, int?, RegionShrink?, int?, string, int?, ForeignKeep?, double[], int?, string)

Save image to deepzoom file.

Declaration
public void Dzsave(string filename, string imagename = null, Enums.ForeignDzLayout? layout = null, string suffix = null, int? overlap = null, int? tileSize = null, bool? centre = null, Enums.ForeignDzDepth? depth = null, Enums.Angle? angle = null, Enums.ForeignDzContainer? container = null, int? compression = null, Enums.RegionShrink? regionShrink = null, int? skipBlanks = null, string id = null, int? q = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

string imagename

Image name.

Enums.ForeignDzLayout? layout

Directory layout.

string suffix

Filename suffix for tiles.

int? overlap

Tile overlap in pixels.

int? tileSize

Tile size in pixels.

bool? centre

Center image in tile.

Enums.ForeignDzDepth? depth

Pyramid depth.

Enums.Angle? angle

Rotate image during save.

Enums.ForeignDzContainer? container

Pyramid container type.

int? compression

ZIP deflate compression level.

Enums.RegionShrink? regionShrink

Method to shrink regions.

int? skipBlanks

Skip tiles which are nearly equal to the background.

string id

Resource ID.

int? q

Q factor.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Dzsave(filename, imagename: string, layout: Enums.ForeignDzLayout, suffix: string, overlap: int, tileSize: int, centre: bool, depth: Enums.ForeignDzDepth, angle: Enums.Angle, container: Enums.ForeignDzContainer, compression: int, regionShrink: Enums.RegionShrink, skipBlanks: int, id: string, q: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

DzsaveBuffer(string, ForeignDzLayout?, string, int?, int?, bool?, ForeignDzDepth?, Angle?, ForeignDzContainer?, int?, RegionShrink?, int?, string, int?, ForeignKeep?, double[], int?, string)

Save image to dz buffer.

Declaration
public byte[] DzsaveBuffer(string imagename = null, Enums.ForeignDzLayout? layout = null, string suffix = null, int? overlap = null, int? tileSize = null, bool? centre = null, Enums.ForeignDzDepth? depth = null, Enums.Angle? angle = null, Enums.ForeignDzContainer? container = null, int? compression = null, Enums.RegionShrink? regionShrink = null, int? skipBlanks = null, string id = null, int? q = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string imagename

Image name.

Enums.ForeignDzLayout? layout

Directory layout.

string suffix

Filename suffix for tiles.

int? overlap

Tile overlap in pixels.

int? tileSize

Tile size in pixels.

bool? centre

Center image in tile.

Enums.ForeignDzDepth? depth

Pyramid depth.

Enums.Angle? angle

Rotate image during save.

Enums.ForeignDzContainer? container

Pyramid container type.

int? compression

ZIP deflate compression level.

Enums.RegionShrink? regionShrink

Method to shrink regions.

int? skipBlanks

Skip tiles which are nearly equal to the background.

string id

Resource ID.

int? q

Q factor.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Returns
Type Description
byte[]

An array of bytes.

Examples
byte[] buffer = in.DzsaveBuffer(imagename: string, layout: Enums.ForeignDzLayout, suffix: string, overlap: int, tileSize: int, centre: bool, depth: Enums.ForeignDzDepth, angle: Enums.Angle, container: Enums.ForeignDzContainer, compression: int, regionShrink: Enums.RegionShrink, skipBlanks: int, id: string, q: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

DzsaveStream(Stream, string, ForeignDzLayout?, string, int?, int?, bool?, ForeignDzDepth?, Angle?, ForeignDzContainer?, int?, RegionShrink?, int?, string, int?, ForeignKeep?, double[], int?, string)

Save image to deepzoom stream.

Declaration
public void DzsaveStream(Stream stream, string imagename = null, Enums.ForeignDzLayout? layout = null, string suffix = null, int? overlap = null, int? tileSize = null, bool? centre = null, Enums.ForeignDzDepth? depth = null, Enums.Angle? angle = null, Enums.ForeignDzContainer? container = null, int? compression = null, Enums.RegionShrink? regionShrink = null, int? skipBlanks = null, string id = null, int? q = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Stream stream

Stream to save to.

string imagename

Image name.

Enums.ForeignDzLayout? layout

Directory layout.

string suffix

Filename suffix for tiles.

int? overlap

Tile overlap in pixels.

int? tileSize

Tile size in pixels.

bool? centre

Center image in tile.

Enums.ForeignDzDepth? depth

Pyramid depth.

Enums.Angle? angle

Rotate image during save.

Enums.ForeignDzContainer? container

Pyramid container type.

int? compression

ZIP deflate compression level.

Enums.RegionShrink? regionShrink

Method to shrink regions.

int? skipBlanks

Skip tiles which are nearly equal to the background.

string id

Resource ID.

int? q

Q factor.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.DzsaveStream(stream, imagename: string, layout: Enums.ForeignDzLayout, suffix: string, overlap: int, tileSize: int, centre: bool, depth: Enums.ForeignDzDepth, angle: Enums.Angle, container: Enums.ForeignDzContainer, compression: int, regionShrink: Enums.RegionShrink, skipBlanks: int, id: string, q: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

DzsaveTarget(Target, string, ForeignDzLayout?, string, int?, int?, bool?, ForeignDzDepth?, Angle?, ForeignDzContainer?, int?, RegionShrink?, int?, string, int?, ForeignKeep?, double[], int?, string)

Save image to deepzoom target.

Declaration
public void DzsaveTarget(Target target, string imagename = null, Enums.ForeignDzLayout? layout = null, string suffix = null, int? overlap = null, int? tileSize = null, bool? centre = null, Enums.ForeignDzDepth? depth = null, Enums.Angle? angle = null, Enums.ForeignDzContainer? container = null, int? compression = null, Enums.RegionShrink? regionShrink = null, int? skipBlanks = null, string id = null, int? q = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Target target

Target to save to.

string imagename

Image name.

Enums.ForeignDzLayout? layout

Directory layout.

string suffix

Filename suffix for tiles.

int? overlap

Tile overlap in pixels.

int? tileSize

Tile size in pixels.

bool? centre

Center image in tile.

Enums.ForeignDzDepth? depth

Pyramid depth.

Enums.Angle? angle

Rotate image during save.

Enums.ForeignDzContainer? container

Pyramid container type.

int? compression

ZIP deflate compression level.

Enums.RegionShrink? regionShrink

Method to shrink regions.

int? skipBlanks

Skip tiles which are nearly equal to the background.

string id

Resource ID.

int? q

Q factor.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.DzsaveTarget(target, imagename: string, layout: Enums.ForeignDzLayout, suffix: string, overlap: int, tileSize: int, centre: bool, depth: Enums.ForeignDzDepth, angle: Enums.Angle, container: Enums.ForeignDzContainer, compression: int, regionShrink: Enums.RegionShrink, skipBlanks: int, id: string, q: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Embed(int, int, int, int, Extend?, double[])

Embed an image in a larger image.

Declaration
public Image Embed(int x, int y, int width, int height, Enums.Extend? extend = null, double[] background = null)
Parameters
Type Name Description
int x

Left edge of input in output.

int y

Top edge of input in output.

int width

Image width in pixels.

int height

Image height in pixels.

Enums.Extend? extend

How to generate the extra pixels.

double[] background

Color for background pixels.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Embed(x, y, width, height, extend: Enums.Extend, background: double[]);

Equal(Image)

This operation compares two images on equality.

Declaration
public Image Equal(Image right)
Parameters
Type Name Description
Image right

A Image to compare.

Returns
Type Description
Image

A new Image.

Equal(double)

This operation compares two images on equality.

Declaration
public Image Equal(double right)
Parameters
Type Name Description
double right

A double constant to compare.

Returns
Type Description
Image

A new Image.

Equal(double[])

This operation compares two images on equality.

Declaration
public Image Equal(double[] right)
Parameters
Type Name Description
double[] right

A double array to compare.

Returns
Type Description
Image

A new Image.

Equal(int[])

This operation compares two images on equality.

Declaration
public Image Equal(int[] right)
Parameters
Type Name Description
int[] right

A integer array to compare.

Returns
Type Description
Image

A new Image.

Equals(Image)

Compares the hashcode of two images.

Declaration
public bool Equals(Image other)
Parameters
Type Name Description
Image other

The Image to compare.

Returns
Type Description
bool

true if equal; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current image.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj

The object to compare with the current image.

Returns
Type Description
bool

true if the specified object is equal to the current image; otherwise, false.

Overrides
object.Equals(object)

Erode(Image)

Erode with a structuring element.

Declaration
public Image Erode(Image mask)
Parameters
Type Name Description
Image mask

The structuring element.

Returns
Type Description
Image

A new Image.

Exp()

Return e ** pixel.

Declaration
public Image Exp()
Returns
Type Description
Image

A new Image.

Exp10()

Return 10 ** pixel.

Declaration
public Image Exp10()
Returns
Type Description
Image

A new Image.

ExtractArea(int, int, int, int)

Extract an area from an image.

Declaration
public Image ExtractArea(int left, int top, int width, int height)
Parameters
Type Name Description
int left

Left edge of extract area.

int top

Top edge of extract area.

int width

Width of extract area.

int height

Height of extract area.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = input.ExtractArea(left, top, width, height);

ExtractBand(int, int?)

Extract band from an image.

Declaration
public Image ExtractBand(int band, int? n = null)
Parameters
Type Name Description
int band

Band to extract.

int? n

Number of bands to extract.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.ExtractBand(band, n: int);

Eye(int, int, bool?, double?)

Make an image showing the eye's spatial response.

Declaration
public static Image Eye(int width, int height, bool? uchar = null, double? factor = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

bool? uchar

Output an unsigned char image.

double? factor

Maximum spatial frequency.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Eye(width, height, uchar: bool, factor: double);

Falsecolour()

False-color an image.

Declaration
public Image Falsecolour()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Falsecolour();

Fastcor(Image)

Fast correlation.

Declaration
public Image Fastcor(Image @ref)
Parameters
Type Name Description
Image ref

Input reference image.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Fastcor(@ref);

FillNearest()

Fill image zeros with nearest non-zero pixel.

Declaration
public Image FillNearest()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.FillNearest();

FillNearest(out Image)

Fill image zeros with nearest non-zero pixel.

Declaration
public Image FillNearest(out Image distance)
Parameters
Type Name Description
Image distance

Distance to nearest non-zero pixel.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.FillNearest(out var distance);

FindLoad(string)

Find the name of the load operation vips will use to load a file.

Declaration
public static string FindLoad(string filename)
Parameters
Type Name Description
string filename

The file to test.

Returns
Type Description
string

The name of the load operation, or null.

Remarks

For example "VipsForeignLoadJpegFile". You can use this to work out what options to pass to NewFromFile(string, bool?, Access?, FailOn?, VOption).

FindLoadBuffer(byte[])

Find the name of the load operation vips will use to load a buffer.

Declaration
public static string FindLoadBuffer(byte[] data)
Parameters
Type Name Description
byte[] data

The buffer to test.

Returns
Type Description
string

The name of the load operation, or null.

Remarks

For example "VipsForeignLoadJpegBuffer". You can use this to work out what options to pass to NewFromBuffer(byte[], string, Access?, FailOn?, VOption).

FindLoadBuffer(char[])

Find the name of the load operation vips will use to load a buffer.

Declaration
public static string FindLoadBuffer(char[] data)
Parameters
Type Name Description
char[] data

The buffer to test.

Returns
Type Description
string

The name of the load operation, or null.

Remarks

For example "VipsForeignLoadJpegBuffer". You can use this to work out what options to pass to NewFromBuffer(char[], string, Access?, FailOn?, VOption).

FindLoadBuffer(ReadOnlySpan<byte>)

Find the name of the load operation vips will use to load a buffer.

Declaration
public static string FindLoadBuffer(ReadOnlySpan<byte> data)
Parameters
Type Name Description
ReadOnlySpan<byte> data

The buffer to test.

Returns
Type Description
string

The name of the load operation, or null.

Remarks

For example "VipsForeignLoadJpegBuffer". You can use this to work out what options to pass to NewFromBuffer(ReadOnlySpan<byte>, string, Access?, FailOn?, VOption).

FindLoadBuffer(string)

Find the name of the load operation vips will use to load a buffer.

Declaration
public static string FindLoadBuffer(string data)
Parameters
Type Name Description
string data

The buffer to test.

Returns
Type Description
string

The name of the load operation, or null.

Remarks

For example "VipsForeignLoadJpegBuffer". You can use this to work out what options to pass to NewFromBuffer(string, string, Access?, FailOn?, VOption).

FindLoadSource(Source)

Find the name of the load operation vips will use to load a source.

Declaration
public static string FindLoadSource(Source source)
Parameters
Type Name Description
Source source

The source to test.

Returns
Type Description
string

The name of the load operation, or null.

Remarks

For example "VipsForeignLoadJpegSource". You can use this to work out what options to pass to NewFromSource(Source, string, Access?, FailOn?, VOption).

FindLoadStream(Stream)

Find the name of the load operation vips will use to load a stream.

Declaration
public static string FindLoadStream(Stream stream)
Parameters
Type Name Description
Stream stream

The stream to test.

Returns
Type Description
string

The name of the load operation, or null.

Remarks

For example "VipsForeignLoadJpegSource". You can use this to work out what options to pass to NewFromStream(Stream, string, Access?, FailOn?, VOption).

FindTrim(double?, double[], bool?)

Search an image for non-edge areas.

Declaration
public object[] FindTrim(double? threshold = null, double[] background = null, bool? lineArt = null)
Parameters
Type Name Description
double? threshold

Object threshold.

double[] background

Color for background pixels.

bool? lineArt

Enable line art mode.

Returns
Type Description
object[]

An array of objects.

Examples
var output = in.FindTrim(threshold: double, background: double[], lineArt: bool);

Fitsload(string, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load a FITS image.

Declaration
public static Image Fitsload(string filename, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Fitsload(filename, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Fitsload(string, bool?, Access?, FailOn?, bool?)

Load a FITS image.

Declaration
public static Image Fitsload(string filename, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Fitsload(filename, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

FitsloadSource(Source, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load FITS from a source.

Declaration
public static Image FitsloadSource(Source source, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.FitsloadSource(source, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

FitsloadSource(Source, bool?, Access?, FailOn?, bool?)

Load FITS from a source.

Declaration
public static Image FitsloadSource(Source source, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.FitsloadSource(source, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

FitsloadStream(Stream, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load FITS from a stream.

Declaration
public static Image FitsloadStream(Stream stream, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.FitsloadStream(stream, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

FitsloadStream(Stream, bool?, Access?, FailOn?, bool?)

Load FITS from a stream.

Declaration
public static Image FitsloadStream(Stream stream, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.FitsloadStream(stream, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Fitssave(string, ForeignKeep?, double[], int?, string)

Save image to fits file.

Declaration
public void Fitssave(string filename, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Fitssave(filename, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Flatten(double[], double?)

Flatten alpha out of an image.

Declaration
public Image Flatten(double[] background = null, double? maxAlpha = null)
Parameters
Type Name Description
double[] background

Background value.

double? maxAlpha

Maximum value of alpha channel.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Flatten(background: double[], maxAlpha: double);

Flip(Direction)

Flip an image.

Declaration
public Image Flip(Enums.Direction direction)
Parameters
Type Name Description
Enums.Direction direction

Direction to flip image.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Flip(direction);

FlipHor()

Flip horizontally.

Declaration
public Image FlipHor()
Returns
Type Description
Image

A new Image.

FlipVer()

Flip vertically.

Declaration
public Image FlipVer()
Returns
Type Description
Image

A new Image.

Float2rad()

Transform float RGB to Radiance coding.

Declaration
public Image Float2rad()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Float2rad();

Floor()

Return the largest integral value not greater than the argument.

Declaration
public Image Floor()
Returns
Type Description
Image

A new Image.

Fractsurf(int, int, double)

Make a fractal surface.

Declaration
public static Image Fractsurf(int width, int height, double fractalDimension)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

double fractalDimension

Fractal dimension.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Fractsurf(width, height, fractalDimension);

Freqmult(Image)

Frequency-domain filtering.

Declaration
public Image Freqmult(Image mask)
Parameters
Type Name Description
Image mask

Input mask image.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Freqmult(mask);

Fwfft()

Forward FFT.

Declaration
public Image Fwfft()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Fwfft();

Gamma(double?)

Gamma an image.

Declaration
public Image Gamma(double? exponent = null)
Parameters
Type Name Description
double? exponent

Gamma factor.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Gamma(exponent: double);

Gaussblur(double, double?, Precision?)

Gaussian blur.

Declaration
public Image Gaussblur(double sigma, double? minAmpl = null, Enums.Precision? precision = null)
Parameters
Type Name Description
double sigma

Sigma of Gaussian.

double? minAmpl

Minimum amplitude of Gaussian.

Enums.Precision? precision

Convolve with this precision.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Gaussblur(sigma, minAmpl: double, precision: Enums.Precision);

Gaussmat(double, double, bool?, Precision?)

Make a gaussian image.

Declaration
public static Image Gaussmat(double sigma, double minAmpl, bool? separable = null, Enums.Precision? precision = null)
Parameters
Type Name Description
double sigma

Sigma of Gaussian.

double minAmpl

Minimum amplitude of Gaussian.

bool? separable

Generate separable Gaussian.

Enums.Precision? precision

Generate with this precision.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Gaussmat(sigma, minAmpl, separable: bool, precision: Enums.Precision);

Gaussnoise(int, int, double?, double?, int?)

Make a gaussnoise image.

Declaration
public static Image Gaussnoise(int width, int height, double? sigma = null, double? mean = null, int? seed = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

double? sigma

Standard deviation of pixels in generated image.

double? mean

Mean of pixels in generated image.

int? seed

Random number seed.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Gaussnoise(width, height, sigma: double, mean: double, seed: int);

Get(string)

Get an item of metadata.

Declaration
public object Get(string name)
Parameters
Type Name Description
string name

The name of the piece of metadata to get.

Returns
Type Description
object

The metadata item as a C# value.

Remarks

Fetches an item of metadata as a C# value. For example:

var orientation = image.Get("orientation");

would fetch the image orientation.

Exceptions
Type Condition
VipsException

If unable to get name.

GetFields()

Get a list of all the metadata fields on an image.

Declaration
public string[] GetFields()
Returns
Type Description
string[]

An array of strings or null.

Remarks

At least libvips 8.5 is needed.

GetHashCode()

Serves as the default hash function.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for the current image.

Overrides
object.GetHashCode()

GetTypeOf(string)

Get the GType of an item of metadata.

Declaration
public nint GetTypeOf(string name)
Parameters
Type Name Description
string name

The name of the piece of metadata to get the type of.

Returns
Type Description
nint

A new instance of nint initialized to the GType or Zero if the property does not exist.

Remarks

Fetch the GType of a piece of metadata, or Zero if the named item does not exist. See GValue.

Getpoint(int, int, bool?)

Read a point from an image.

Declaration
public double[] Getpoint(int x, int y, bool? unpackComplex = null)
Parameters
Type Name Description
int x

Point to read.

int y

Point to read.

bool? unpackComplex

Complex pixels should be unpacked.

Returns
Type Description
double[]

An array of doubles.

Examples
double[] outArray = in.Getpoint(x, y, unpackComplex: bool);

Gifload(string, out ForeignFlags, int?, int?, bool?, Access?, FailOn?, bool?)

Load GIF with libnsgif.

Declaration
public static Image Gifload(string filename, out Enums.ForeignFlags flags, int? n = null, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

int? n

Number of pages to load, -1 for all.

int? page

First page to load.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Gifload(filename, out var flags, n: int, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Gifload(string, int?, int?, bool?, Access?, FailOn?, bool?)

Load GIF with libnsgif.

Declaration
public static Image Gifload(string filename, int? n = null, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

int? n

Number of pages to load, -1 for all.

int? page

First page to load.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Gifload(filename, n: int, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

GifloadBuffer(byte[], out ForeignFlags, int?, int?, bool?, Access?, FailOn?, bool?)

Load GIF with libnsgif.

Declaration
public static Image GifloadBuffer(byte[] buffer, out Enums.ForeignFlags flags, int? n = null, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

Enums.ForeignFlags flags

Flags for this file.

int? n

Number of pages to load, -1 for all.

int? page

First page to load.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.GifloadBuffer(buffer, out var flags, n: int, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

GifloadBuffer(byte[], int?, int?, bool?, Access?, FailOn?, bool?)

Load GIF with libnsgif.

Declaration
public static Image GifloadBuffer(byte[] buffer, int? n = null, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

int? n

Number of pages to load, -1 for all.

int? page

First page to load.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.GifloadBuffer(buffer, n: int, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

GifloadSource(Source, out ForeignFlags, int?, int?, bool?, Access?, FailOn?, bool?)

Load gif from source.

Declaration
public static Image GifloadSource(Source source, out Enums.ForeignFlags flags, int? n = null, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

int? n

Number of pages to load, -1 for all.

int? page

First page to load.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.GifloadSource(source, out var flags, n: int, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

GifloadSource(Source, int?, int?, bool?, Access?, FailOn?, bool?)

Load gif from source.

Declaration
public static Image GifloadSource(Source source, int? n = null, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

int? n

Number of pages to load, -1 for all.

int? page

First page to load.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.GifloadSource(source, n: int, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

GifloadStream(Stream, out ForeignFlags, int?, int?, bool?, Access?, FailOn?, bool?)

Load gif from stream.

Declaration
public static Image GifloadStream(Stream stream, out Enums.ForeignFlags flags, int? n = null, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

int? n

Number of pages to load, -1 for all.

int? page

First page to load.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.GifloadStream(stream, out var flags, n: int, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

GifloadStream(Stream, int?, int?, bool?, Access?, FailOn?, bool?)

Load gif from stream.

Declaration
public static Image GifloadStream(Stream stream, int? n = null, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

int? n

Number of pages to load, -1 for all.

int? page

First page to load.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.GifloadStream(stream, n: int, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Gifsave(string, double?, int?, int?, double?, bool?, double?, bool?, ForeignKeep?, double[], int?, string)

Save as gif.

Declaration
public void Gifsave(string filename, double? dither = null, int? effort = null, int? bitdepth = null, double? interframeMaxerror = null, bool? reuse = null, double? interpaletteMaxerror = null, bool? interlace = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

double? dither

Amount of dithering.

int? effort

Quantisation effort.

int? bitdepth

Number of bits per pixel.

double? interframeMaxerror

Maximum inter-frame error for transparency.

bool? reuse

Reuse palette from input.

double? interpaletteMaxerror

Maximum inter-palette error for palette reusage.

bool? interlace

Generate an interlaced (progressive) GIF.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Gifsave(filename, dither: double, effort: int, bitdepth: int, interframeMaxerror: double, reuse: bool, interpaletteMaxerror: double, interlace: bool, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

GifsaveBuffer(double?, int?, int?, double?, bool?, double?, bool?, ForeignKeep?, double[], int?, string)

Save as gif.

Declaration
public byte[] GifsaveBuffer(double? dither = null, int? effort = null, int? bitdepth = null, double? interframeMaxerror = null, bool? reuse = null, double? interpaletteMaxerror = null, bool? interlace = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
double? dither

Amount of dithering.

int? effort

Quantisation effort.

int? bitdepth

Number of bits per pixel.

double? interframeMaxerror

Maximum inter-frame error for transparency.

bool? reuse

Reuse palette from input.

double? interpaletteMaxerror

Maximum inter-palette error for palette reusage.

bool? interlace

Generate an interlaced (progressive) GIF.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Returns
Type Description
byte[]

An array of bytes.

Examples
byte[] buffer = in.GifsaveBuffer(dither: double, effort: int, bitdepth: int, interframeMaxerror: double, reuse: bool, interpaletteMaxerror: double, interlace: bool, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

GifsaveStream(Stream, double?, int?, int?, double?, bool?, double?, bool?, ForeignKeep?, double[], int?, string)

Save as gif.

Declaration
public void GifsaveStream(Stream stream, double? dither = null, int? effort = null, int? bitdepth = null, double? interframeMaxerror = null, bool? reuse = null, double? interpaletteMaxerror = null, bool? interlace = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Stream stream

Stream to save to.

double? dither

Amount of dithering.

int? effort

Quantisation effort.

int? bitdepth

Number of bits per pixel.

double? interframeMaxerror

Maximum inter-frame error for transparency.

bool? reuse

Reuse palette from input.

double? interpaletteMaxerror

Maximum inter-palette error for palette reusage.

bool? interlace

Generate an interlaced (progressive) GIF.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.GifsaveStream(stream, dither: double, effort: int, bitdepth: int, interframeMaxerror: double, reuse: bool, interpaletteMaxerror: double, interlace: bool, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

GifsaveTarget(Target, double?, int?, int?, double?, bool?, double?, bool?, ForeignKeep?, double[], int?, string)

Save as gif.

Declaration
public void GifsaveTarget(Target target, double? dither = null, int? effort = null, int? bitdepth = null, double? interframeMaxerror = null, bool? reuse = null, double? interpaletteMaxerror = null, bool? interlace = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Target target

Target to save to.

double? dither

Amount of dithering.

int? effort

Quantisation effort.

int? bitdepth

Number of bits per pixel.

double? interframeMaxerror

Maximum inter-frame error for transparency.

bool? reuse

Reuse palette from input.

double? interpaletteMaxerror

Maximum inter-palette error for palette reusage.

bool? interlace

Generate an interlaced (progressive) GIF.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.GifsaveTarget(target, dither: double, effort: int, bitdepth: int, interframeMaxerror: double, reuse: bool, interpaletteMaxerror: double, interlace: bool, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Globalbalance(double?, bool?)

Global balance an image mosaic.

Declaration
public Image Globalbalance(double? gamma = null, bool? intOutput = null)
Parameters
Type Name Description
double? gamma

Image gamma.

bool? intOutput

Integer output.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Globalbalance(gamma: double, intOutput: bool);

Gravity(CompassDirection, int, int, Extend?, double[])

Place an image within a larger image with a certain gravity.

Declaration
public Image Gravity(Enums.CompassDirection direction, int width, int height, Enums.Extend? extend = null, double[] background = null)
Parameters
Type Name Description
Enums.CompassDirection direction

Direction to place image within width/height.

int width

Image width in pixels.

int height

Image height in pixels.

Enums.Extend? extend

How to generate the extra pixels.

double[] background

Color for background pixels.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Gravity(direction, width, height, extend: Enums.Extend, background: double[]);

Grey(int, int, bool?)

Make a grey ramp image.

Declaration
public static Image Grey(int width, int height, bool? uchar = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

bool? uchar

Output an unsigned char image.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Grey(width, height, uchar: bool);

Grid(int, int, int)

Grid an image.

Declaration
public Image Grid(int tileHeight, int across, int down)
Parameters
Type Name Description
int tileHeight

Chop into tiles this high.

int across

Number of tiles across.

int down

Number of tiles down.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Grid(tileHeight, across, down);

HSV2sRGB()

Transform HSV to sRGB.

Declaration
public Image HSV2sRGB()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.HSV2sRGB();

HasAlpha()

Does this image have an alpha channel?

Declaration
public bool HasAlpha()
Returns
Type Description
bool

true if this image has an alpha channel; otherwise, false.

Remarks

Uses colour space interpretation with number of channels to guess this.

Heifload(string, out ForeignFlags, int?, int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load a HEIF image.

Declaration
public static Image Heifload(string filename, out Enums.ForeignFlags flags, int? page = null, int? n = null, bool? thumbnail = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? thumbnail

Fetch thumbnail image.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Heifload(filename, out var flags, page: int, n: int, thumbnail: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Heifload(string, int?, int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load a HEIF image.

Declaration
public static Image Heifload(string filename, int? page = null, int? n = null, bool? thumbnail = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? thumbnail

Fetch thumbnail image.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Heifload(filename, page: int, n: int, thumbnail: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

HeifloadBuffer(byte[], out ForeignFlags, int?, int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load a HEIF image.

Declaration
public static Image HeifloadBuffer(byte[] buffer, out Enums.ForeignFlags flags, int? page = null, int? n = null, bool? thumbnail = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? thumbnail

Fetch thumbnail image.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.HeifloadBuffer(buffer, out var flags, page: int, n: int, thumbnail: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

HeifloadBuffer(byte[], int?, int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load a HEIF image.

Declaration
public static Image HeifloadBuffer(byte[] buffer, int? page = null, int? n = null, bool? thumbnail = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? thumbnail

Fetch thumbnail image.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.HeifloadBuffer(buffer, page: int, n: int, thumbnail: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

HeifloadSource(Source, out ForeignFlags, int?, int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load a HEIF image.

Declaration
public static Image HeifloadSource(Source source, out Enums.ForeignFlags flags, int? page = null, int? n = null, bool? thumbnail = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? thumbnail

Fetch thumbnail image.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.HeifloadSource(source, out var flags, page: int, n: int, thumbnail: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

HeifloadSource(Source, int?, int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load a HEIF image.

Declaration
public static Image HeifloadSource(Source source, int? page = null, int? n = null, bool? thumbnail = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? thumbnail

Fetch thumbnail image.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.HeifloadSource(source, page: int, n: int, thumbnail: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

HeifloadStream(Stream, out ForeignFlags, int?, int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load a HEIF image.

Declaration
public static Image HeifloadStream(Stream stream, out Enums.ForeignFlags flags, int? page = null, int? n = null, bool? thumbnail = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? thumbnail

Fetch thumbnail image.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.HeifloadStream(stream, out var flags, page: int, n: int, thumbnail: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

HeifloadStream(Stream, int?, int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load a HEIF image.

Declaration
public static Image HeifloadStream(Stream stream, int? page = null, int? n = null, bool? thumbnail = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? thumbnail

Fetch thumbnail image.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.HeifloadStream(stream, page: int, n: int, thumbnail: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Heifsave(string, int?, int?, bool?, ForeignHeifCompression?, int?, ForeignSubsample?, ForeignHeifEncoder?, ForeignKeep?, double[], int?, string)

Save image in HEIF format.

Declaration
public void Heifsave(string filename, int? q = null, int? bitdepth = null, bool? lossless = null, Enums.ForeignHeifCompression? compression = null, int? effort = null, Enums.ForeignSubsample? subsampleMode = null, Enums.ForeignHeifEncoder? encoder = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

int? q

Q factor.

int? bitdepth

Number of bits per pixel.

bool? lossless

Enable lossless compression.

Enums.ForeignHeifCompression? compression

Compression format.

int? effort

CPU effort.

Enums.ForeignSubsample? subsampleMode

Select chroma subsample operation mode.

Enums.ForeignHeifEncoder? encoder

Select encoder to use.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Heifsave(filename, q: int, bitdepth: int, lossless: bool, compression: Enums.ForeignHeifCompression, effort: int, subsampleMode: Enums.ForeignSubsample, encoder: Enums.ForeignHeifEncoder, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

HeifsaveBuffer(int?, int?, bool?, ForeignHeifCompression?, int?, ForeignSubsample?, ForeignHeifEncoder?, ForeignKeep?, double[], int?, string)

Save image in HEIF format.

Declaration
public byte[] HeifsaveBuffer(int? q = null, int? bitdepth = null, bool? lossless = null, Enums.ForeignHeifCompression? compression = null, int? effort = null, Enums.ForeignSubsample? subsampleMode = null, Enums.ForeignHeifEncoder? encoder = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
int? q

Q factor.

int? bitdepth

Number of bits per pixel.

bool? lossless

Enable lossless compression.

Enums.ForeignHeifCompression? compression

Compression format.

int? effort

CPU effort.

Enums.ForeignSubsample? subsampleMode

Select chroma subsample operation mode.

Enums.ForeignHeifEncoder? encoder

Select encoder to use.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Returns
Type Description
byte[]

An array of bytes.

Examples
byte[] buffer = in.HeifsaveBuffer(q: int, bitdepth: int, lossless: bool, compression: Enums.ForeignHeifCompression, effort: int, subsampleMode: Enums.ForeignSubsample, encoder: Enums.ForeignHeifEncoder, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

HeifsaveStream(Stream, int?, int?, bool?, ForeignHeifCompression?, int?, ForeignSubsample?, ForeignHeifEncoder?, ForeignKeep?, double[], int?, string)

Save image in HEIF format.

Declaration
public void HeifsaveStream(Stream stream, int? q = null, int? bitdepth = null, bool? lossless = null, Enums.ForeignHeifCompression? compression = null, int? effort = null, Enums.ForeignSubsample? subsampleMode = null, Enums.ForeignHeifEncoder? encoder = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Stream stream

Stream to save to.

int? q

Q factor.

int? bitdepth

Number of bits per pixel.

bool? lossless

Enable lossless compression.

Enums.ForeignHeifCompression? compression

Compression format.

int? effort

CPU effort.

Enums.ForeignSubsample? subsampleMode

Select chroma subsample operation mode.

Enums.ForeignHeifEncoder? encoder

Select encoder to use.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.HeifsaveStream(stream, q: int, bitdepth: int, lossless: bool, compression: Enums.ForeignHeifCompression, effort: int, subsampleMode: Enums.ForeignSubsample, encoder: Enums.ForeignHeifEncoder, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

HeifsaveTarget(Target, int?, int?, bool?, ForeignHeifCompression?, int?, ForeignSubsample?, ForeignHeifEncoder?, ForeignKeep?, double[], int?, string)

Save image in HEIF format.

Declaration
public void HeifsaveTarget(Target target, int? q = null, int? bitdepth = null, bool? lossless = null, Enums.ForeignHeifCompression? compression = null, int? effort = null, Enums.ForeignSubsample? subsampleMode = null, Enums.ForeignHeifEncoder? encoder = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Target target

Target to save to.

int? q

Q factor.

int? bitdepth

Number of bits per pixel.

bool? lossless

Enable lossless compression.

Enums.ForeignHeifCompression? compression

Compression format.

int? effort

CPU effort.

Enums.ForeignSubsample? subsampleMode

Select chroma subsample operation mode.

Enums.ForeignHeifEncoder? encoder

Select encoder to use.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.HeifsaveTarget(target, q: int, bitdepth: int, lossless: bool, compression: Enums.ForeignHeifCompression, effort: int, subsampleMode: Enums.ForeignSubsample, encoder: Enums.ForeignHeifEncoder, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

HistCum()

Form cumulative histogram.

Declaration
public Image HistCum()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.HistCum();

HistEntropy()

Estimate image entropy.

Declaration
public double HistEntropy()
Returns
Type Description
double

A double.

Examples
double @out = in.HistEntropy();

HistEqual(int?)

Histogram equalisation.

Declaration
public Image HistEqual(int? band = null)
Parameters
Type Name Description
int? band

Equalise with this band.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.HistEqual(band: int);

HistFind(int?)

Find image histogram.

Declaration
public Image HistFind(int? band = null)
Parameters
Type Name Description
int? band

Find histogram of band.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.HistFind(band: int);

HistFindIndexed(Image, Combine?)

Find indexed image histogram.

Declaration
public Image HistFindIndexed(Image index, Enums.Combine? combine = null)
Parameters
Type Name Description
Image index

Index image.

Enums.Combine? combine

Combine bins like this.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.HistFindIndexed(index, combine: Enums.Combine);

HistFindNdim(int?)

Find n-dimensional image histogram.

Declaration
public Image HistFindNdim(int? bins = null)
Parameters
Type Name Description
int? bins

Number of bins in each dimension.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.HistFindNdim(bins: int);

HistIsmonotonic()

Test for monotonicity.

Declaration
public bool HistIsmonotonic()
Returns
Type Description
bool

A bool.

Examples
bool monotonic = in.HistIsmonotonic();

HistLocal(int, int, int?)

Local histogram equalisation.

Declaration
public Image HistLocal(int width, int height, int? maxSlope = null)
Parameters
Type Name Description
int width

Window width in pixels.

int height

Window height in pixels.

int? maxSlope

Maximum slope (CLAHE).

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.HistLocal(width, height, maxSlope: int);

HistMatch(Image)

Match two histograms.

Declaration
public Image HistMatch(Image @ref)
Parameters
Type Name Description
Image ref

Reference histogram.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.HistMatch(@ref);

HistNorm()

Normalise histogram.

Declaration
public Image HistNorm()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.HistNorm();

HistPlot()

Plot histogram.

Declaration
public Image HistPlot()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.HistPlot();

HoughCircle(int?, int?, int?)

Find hough circle transform.

Declaration
public Image HoughCircle(int? scale = null, int? minRadius = null, int? maxRadius = null)
Parameters
Type Name Description
int? scale

Scale down dimensions by this factor.

int? minRadius

Smallest radius to search for.

int? maxRadius

Largest radius to search for.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.HoughCircle(scale: int, minRadius: int, maxRadius: int);

HoughLine(int?, int?)

Find hough line transform.

Declaration
public Image HoughLine(int? width = null, int? height = null)
Parameters
Type Name Description
int? width

Horizontal size of parameter space.

int? height

Vertical size of parameter space.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.HoughLine(width: int, height: int);

IccExport(PCS?, Intent?, bool?, string, int?)

Output to device with ICC profile.

Declaration
public Image IccExport(Enums.PCS? pcs = null, Enums.Intent? intent = null, bool? blackPointCompensation = null, string outputProfile = null, int? depth = null)
Parameters
Type Name Description
Enums.PCS? pcs

Set Profile Connection Space.

Enums.Intent? intent

Rendering intent.

bool? blackPointCompensation

Enable black point compensation.

string outputProfile

Filename to load output profile from.

int? depth

Output device space depth in bits.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.IccExport(pcs: Enums.PCS, intent: Enums.Intent, blackPointCompensation: bool, outputProfile: string, depth: int);

IccImport(PCS?, Intent?, bool?, bool?, string)

Import from device with ICC profile.

Declaration
public Image IccImport(Enums.PCS? pcs = null, Enums.Intent? intent = null, bool? blackPointCompensation = null, bool? embedded = null, string inputProfile = null)
Parameters
Type Name Description
Enums.PCS? pcs

Set Profile Connection Space.

Enums.Intent? intent

Rendering intent.

bool? blackPointCompensation

Enable black point compensation.

bool? embedded

Use embedded input profile, if available.

string inputProfile

Filename to load input profile from.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.IccImport(pcs: Enums.PCS, intent: Enums.Intent, blackPointCompensation: bool, embedded: bool, inputProfile: string);

IccTransform(string, PCS?, Intent?, bool?, bool?, string, int?)

Transform between devices with ICC profiles.

Declaration
public Image IccTransform(string outputProfile, Enums.PCS? pcs = null, Enums.Intent? intent = null, bool? blackPointCompensation = null, bool? embedded = null, string inputProfile = null, int? depth = null)
Parameters
Type Name Description
string outputProfile

Filename to load output profile from.

Enums.PCS? pcs

Set Profile Connection Space.

Enums.Intent? intent

Rendering intent.

bool? blackPointCompensation

Enable black point compensation.

bool? embedded

Use embedded input profile, if available.

string inputProfile

Filename to load input profile from.

int? depth

Output device space depth in bits.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.IccTransform(outputProfile, pcs: Enums.PCS, intent: Enums.Intent, blackPointCompensation: bool, embedded: bool, inputProfile: string, depth: int);

Identity(int?, bool?, int?)

Make a 1D image where pixel values are indexes.

Declaration
public static Image Identity(int? bands = null, bool? @ushort = null, int? size = null)
Parameters
Type Name Description
int? bands

Number of bands in LUT.

bool? ushort

Create a 16-bit LUT.

int? size

Size of 16-bit LUT.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Identity(bands: int, @ushort: bool, size: int);

Ifthenelse(object, object, bool?)

Ifthenelse an image.

Declaration
public Image Ifthenelse(object in1, object in2, bool? blend = null)
Parameters
Type Name Description
object in1

Source for TRUE pixels.

object in2

Source for FALSE pixels.

bool? blend

Blend smoothly between then and else parts.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = cond.Ifthenelse(in1, in2, blend: bool);

Imag()

Return the imaginary part of a complex image.

Declaration
public Image Imag()
Returns
Type Description
Image

A new Image.

Imageize(Image, object)

Turn a constant (eg. 1, "12", new[] {1, 2, 3}, new[] {new[] {1}}) into an image using matchImage as a guide.

Declaration
public static Image Imageize(Image matchImage, object value)
Parameters
Type Name Description
Image matchImage

Image guide.

object value

A constant.

Returns
Type Description
Image

A new Image.

Insert(Image, int, int, bool?, double[])

Insert image @sub into @main at @x, @y.

Declaration
public Image Insert(Image sub, int x, int y, bool? expand = null, double[] background = null)
Parameters
Type Name Description
Image sub

Sub-image to insert into main image.

int x

Left edge of sub in main.

int y

Top edge of sub in main.

bool? expand

Expand output to hold all of both inputs.

double[] background

Color for new pixels.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = main.Insert(sub, x, y, expand: bool, background: double[]);

Invalidate()

Drop caches on an image, and any downstream images.

Declaration
public void Invalidate()
Remarks

This method drops all pixel caches on an image and on all downstream images. Any operations which depend on this image, directly or indirectly, are also dropped from the libvips operation cache.

This method can be useful if you wrap a libvips image around an array with NewFromMemory(Array, int, int, int, BandFormat) and then change some bytes without libvips knowing.

Invert()

Invert an image.

Declaration
public Image Invert()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Invert();

Invertlut(int?)

Build an inverted look-up table.

Declaration
public Image Invertlut(int? size = null)
Parameters
Type Name Description
int? size

LUT size to generate.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Invertlut(size: int);

Invfft(bool?)

Inverse FFT.

Declaration
public Image Invfft(bool? real = null)
Parameters
Type Name Description
bool? real

Output only the real part of the transform.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Invfft(real: bool);

IsKilled()

If image has been killed (see SetKill(bool)), set an error message, clear the kill flag and return true. Otherwise return false.

Declaration
public bool IsKilled()
Returns
Type Description
bool

true if image has been killed; otherwise, false.

Remarks

Handy for loops which need to run sets of threads which can fail. At least libvips 8.8 is needed. If this version requirement is not met, it will always return false.

Join(Image, Direction, bool?, int?, double[], Align?)

Join a pair of images.

Declaration
public Image Join(Image in2, Enums.Direction direction, bool? expand = null, int? shim = null, double[] background = null, Enums.Align? align = null)
Parameters
Type Name Description
Image in2

Second input image.

Enums.Direction direction

Join left-right or up-down.

bool? expand

Expand output to hold all of both inputs.

int? shim

Pixels between images.

double[] background

Colour for new pixels.

Enums.Align? align

Align on the low, centre or high coordinate edge.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in1.Join(in2, direction, expand: bool, shim: int, background: double[], align: Enums.Align);

Jp2kload(string, out ForeignFlags, int?, bool?, Access?, FailOn?, bool?)

Load JPEG2000 image.

Declaration
public static Image Jp2kload(string filename, out Enums.ForeignFlags flags, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

Load this page from the image.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Jp2kload(filename, out var flags, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Jp2kload(string, int?, bool?, Access?, FailOn?, bool?)

Load JPEG2000 image.

Declaration
public static Image Jp2kload(string filename, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

int? page

Load this page from the image.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Jp2kload(filename, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Jp2kloadBuffer(byte[], out ForeignFlags, int?, bool?, Access?, FailOn?, bool?)

Load JPEG2000 image.

Declaration
public static Image Jp2kloadBuffer(byte[] buffer, out Enums.ForeignFlags flags, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

Load this page from the image.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Jp2kloadBuffer(buffer, out var flags, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Jp2kloadBuffer(byte[], int?, bool?, Access?, FailOn?, bool?)

Load JPEG2000 image.

Declaration
public static Image Jp2kloadBuffer(byte[] buffer, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

int? page

Load this page from the image.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Jp2kloadBuffer(buffer, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Jp2kloadSource(Source, out ForeignFlags, int?, bool?, Access?, FailOn?, bool?)

Load JPEG2000 image.

Declaration
public static Image Jp2kloadSource(Source source, out Enums.ForeignFlags flags, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

Load this page from the image.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Jp2kloadSource(source, out var flags, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Jp2kloadSource(Source, int?, bool?, Access?, FailOn?, bool?)

Load JPEG2000 image.

Declaration
public static Image Jp2kloadSource(Source source, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

int? page

Load this page from the image.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Jp2kloadSource(source, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Jp2kloadStream(Stream, out ForeignFlags, int?, bool?, Access?, FailOn?, bool?)

Load JPEG2000 image.

Declaration
public static Image Jp2kloadStream(Stream stream, out Enums.ForeignFlags flags, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

Load this page from the image.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Jp2kloadStream(stream, out var flags, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Jp2kloadStream(Stream, int?, bool?, Access?, FailOn?, bool?)

Load JPEG2000 image.

Declaration
public static Image Jp2kloadStream(Stream stream, int? page = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

int? page

Load this page from the image.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Jp2kloadStream(stream, page: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Jp2ksave(string, int?, int?, bool?, int?, ForeignSubsample?, ForeignKeep?, double[], int?, string)

Save image in JPEG2000 format.

Declaration
public void Jp2ksave(string filename, int? tileWidth = null, int? tileHeight = null, bool? lossless = null, int? q = null, Enums.ForeignSubsample? subsampleMode = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

int? tileWidth

Tile width in pixels.

int? tileHeight

Tile height in pixels.

bool? lossless

Enable lossless compression.

int? q

Q factor.

Enums.ForeignSubsample? subsampleMode

Select chroma subsample operation mode.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Jp2ksave(filename, tileWidth: int, tileHeight: int, lossless: bool, q: int, subsampleMode: Enums.ForeignSubsample, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Jp2ksaveBuffer(int?, int?, bool?, int?, ForeignSubsample?, ForeignKeep?, double[], int?, string)

Save image in JPEG2000 format.

Declaration
public byte[] Jp2ksaveBuffer(int? tileWidth = null, int? tileHeight = null, bool? lossless = null, int? q = null, Enums.ForeignSubsample? subsampleMode = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
int? tileWidth

Tile width in pixels.

int? tileHeight

Tile height in pixels.

bool? lossless

Enable lossless compression.

int? q

Q factor.

Enums.ForeignSubsample? subsampleMode

Select chroma subsample operation mode.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Returns
Type Description
byte[]

An array of bytes.

Examples
byte[] buffer = in.Jp2ksaveBuffer(tileWidth: int, tileHeight: int, lossless: bool, q: int, subsampleMode: Enums.ForeignSubsample, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Jp2ksaveStream(Stream, int?, int?, bool?, int?, ForeignSubsample?, ForeignKeep?, double[], int?, string)

Save image in JPEG2000 format.

Declaration
public void Jp2ksaveStream(Stream stream, int? tileWidth = null, int? tileHeight = null, bool? lossless = null, int? q = null, Enums.ForeignSubsample? subsampleMode = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Stream stream

Stream to save to.

int? tileWidth

Tile width in pixels.

int? tileHeight

Tile height in pixels.

bool? lossless

Enable lossless compression.

int? q

Q factor.

Enums.ForeignSubsample? subsampleMode

Select chroma subsample operation mode.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Jp2ksaveStream(stream, tileWidth: int, tileHeight: int, lossless: bool, q: int, subsampleMode: Enums.ForeignSubsample, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Jp2ksaveTarget(Target, int?, int?, bool?, int?, ForeignSubsample?, ForeignKeep?, double[], int?, string)

Save image in JPEG2000 format.

Declaration
public void Jp2ksaveTarget(Target target, int? tileWidth = null, int? tileHeight = null, bool? lossless = null, int? q = null, Enums.ForeignSubsample? subsampleMode = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Target target

Target to save to.

int? tileWidth

Tile width in pixels.

int? tileHeight

Tile height in pixels.

bool? lossless

Enable lossless compression.

int? q

Q factor.

Enums.ForeignSubsample? subsampleMode

Select chroma subsample operation mode.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Jp2ksaveTarget(target, tileWidth: int, tileHeight: int, lossless: bool, q: int, subsampleMode: Enums.ForeignSubsample, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Jpegload(string, out ForeignFlags, int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load jpeg from file.

Declaration
public static Image Jpegload(string filename, out Enums.ForeignFlags flags, int? shrink = null, bool? autorotate = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

int? shrink

Shrink factor on load.

bool? autorotate

Rotate image using exif orientation.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Jpegload(filename, out var flags, shrink: int, autorotate: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Jpegload(string, int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load jpeg from file.

Declaration
public static Image Jpegload(string filename, int? shrink = null, bool? autorotate = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

int? shrink

Shrink factor on load.

bool? autorotate

Rotate image using exif orientation.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Jpegload(filename, shrink: int, autorotate: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

JpegloadBuffer(byte[], out ForeignFlags, int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load jpeg from buffer.

Declaration
public static Image JpegloadBuffer(byte[] buffer, out Enums.ForeignFlags flags, int? shrink = null, bool? autorotate = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

Enums.ForeignFlags flags

Flags for this file.

int? shrink

Shrink factor on load.

bool? autorotate

Rotate image using exif orientation.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.JpegloadBuffer(buffer, out var flags, shrink: int, autorotate: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

JpegloadBuffer(byte[], int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load jpeg from buffer.

Declaration
public static Image JpegloadBuffer(byte[] buffer, int? shrink = null, bool? autorotate = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

int? shrink

Shrink factor on load.

bool? autorotate

Rotate image using exif orientation.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.JpegloadBuffer(buffer, shrink: int, autorotate: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

JpegloadSource(Source, out ForeignFlags, int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load image from jpeg source.

Declaration
public static Image JpegloadSource(Source source, out Enums.ForeignFlags flags, int? shrink = null, bool? autorotate = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

int? shrink

Shrink factor on load.

bool? autorotate

Rotate image using exif orientation.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.JpegloadSource(source, out var flags, shrink: int, autorotate: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

JpegloadSource(Source, int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load image from jpeg source.

Declaration
public static Image JpegloadSource(Source source, int? shrink = null, bool? autorotate = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

int? shrink

Shrink factor on load.

bool? autorotate

Rotate image using exif orientation.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.JpegloadSource(source, shrink: int, autorotate: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

JpegloadStream(Stream, out ForeignFlags, int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load image from jpeg stream.

Declaration
public static Image JpegloadStream(Stream stream, out Enums.ForeignFlags flags, int? shrink = null, bool? autorotate = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

int? shrink

Shrink factor on load.

bool? autorotate

Rotate image using exif orientation.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.JpegloadStream(stream, out var flags, shrink: int, autorotate: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

JpegloadStream(Stream, int?, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load image from jpeg stream.

Declaration
public static Image JpegloadStream(Stream stream, int? shrink = null, bool? autorotate = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

int? shrink

Shrink factor on load.

bool? autorotate

Rotate image using exif orientation.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.JpegloadStream(stream, shrink: int, autorotate: bool, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Jpegsave(string, int?, bool?, bool?, bool?, bool?, bool?, int?, ForeignSubsample?, int?, ForeignKeep?, double[], int?, string)

Save image to jpeg file.

Declaration
public void Jpegsave(string filename, int? q = null, bool? optimizeCoding = null, bool? interlace = null, bool? trellisQuant = null, bool? overshootDeringing = null, bool? optimizeScans = null, int? quantTable = null, Enums.ForeignSubsample? subsampleMode = null, int? restartInterval = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

int? q

Q factor.

bool? optimizeCoding

Compute optimal Huffman coding tables.

bool? interlace

Generate an interlaced (progressive) jpeg.

bool? trellisQuant

Apply trellis quantisation to each 8x8 block.

bool? overshootDeringing

Apply overshooting to samples with extreme values.

bool? optimizeScans

Split spectrum of DCT coefficients into separate scans.

int? quantTable

Use predefined quantization table with given index.

Enums.ForeignSubsample? subsampleMode

Select chroma subsample operation mode.

int? restartInterval

Add restart markers every specified number of mcu.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Jpegsave(filename, q: int, optimizeCoding: bool, interlace: bool, trellisQuant: bool, overshootDeringing: bool, optimizeScans: bool, quantTable: int, subsampleMode: Enums.ForeignSubsample, restartInterval: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

JpegsaveBuffer(int?, bool?, bool?, bool?, bool?, bool?, int?, ForeignSubsample?, int?, ForeignKeep?, double[], int?, string)

Save image to jpeg buffer.

Declaration
public byte[] JpegsaveBuffer(int? q = null, bool? optimizeCoding = null, bool? interlace = null, bool? trellisQuant = null, bool? overshootDeringing = null, bool? optimizeScans = null, int? quantTable = null, Enums.ForeignSubsample? subsampleMode = null, int? restartInterval = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
int? q

Q factor.

bool? optimizeCoding

Compute optimal Huffman coding tables.

bool? interlace

Generate an interlaced (progressive) jpeg.

bool? trellisQuant

Apply trellis quantisation to each 8x8 block.

bool? overshootDeringing

Apply overshooting to samples with extreme values.

bool? optimizeScans

Split spectrum of DCT coefficients into separate scans.

int? quantTable

Use predefined quantization table with given index.

Enums.ForeignSubsample? subsampleMode

Select chroma subsample operation mode.

int? restartInterval

Add restart markers every specified number of mcu.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Returns
Type Description
byte[]

An array of bytes.

Examples
byte[] buffer = in.JpegsaveBuffer(q: int, optimizeCoding: bool, interlace: bool, trellisQuant: bool, overshootDeringing: bool, optimizeScans: bool, quantTable: int, subsampleMode: Enums.ForeignSubsample, restartInterval: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

JpegsaveMime(int?, bool?, bool?, bool?, bool?, bool?, int?, ForeignSubsample?, int?, ForeignKeep?, double[], int?, string)

Save image to jpeg mime.

Declaration
public void JpegsaveMime(int? q = null, bool? optimizeCoding = null, bool? interlace = null, bool? trellisQuant = null, bool? overshootDeringing = null, bool? optimizeScans = null, int? quantTable = null, Enums.ForeignSubsample? subsampleMode = null, int? restartInterval = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
int? q

Q factor.

bool? optimizeCoding

Compute optimal Huffman coding tables.

bool? interlace

Generate an interlaced (progressive) jpeg.

bool? trellisQuant

Apply trellis quantisation to each 8x8 block.

bool? overshootDeringing

Apply overshooting to samples with extreme values.

bool? optimizeScans

Split spectrum of DCT coefficients into separate scans.

int? quantTable

Use predefined quantization table with given index.

Enums.ForeignSubsample? subsampleMode

Select chroma subsample operation mode.

int? restartInterval

Add restart markers every specified number of mcu.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.JpegsaveMime(q: int, optimizeCoding: bool, interlace: bool, trellisQuant: bool, overshootDeringing: bool, optimizeScans: bool, quantTable: int, subsampleMode: Enums.ForeignSubsample, restartInterval: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

JpegsaveStream(Stream, int?, bool?, bool?, bool?, bool?, bool?, int?, ForeignSubsample?, int?, ForeignKeep?, double[], int?, string)

Save image to jpeg stream.

Declaration
public void JpegsaveStream(Stream stream, int? q = null, bool? optimizeCoding = null, bool? interlace = null, bool? trellisQuant = null, bool? overshootDeringing = null, bool? optimizeScans = null, int? quantTable = null, Enums.ForeignSubsample? subsampleMode = null, int? restartInterval = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Stream stream

Stream to save to.

int? q

Q factor.

bool? optimizeCoding

Compute optimal Huffman coding tables.

bool? interlace

Generate an interlaced (progressive) jpeg.

bool? trellisQuant

Apply trellis quantisation to each 8x8 block.

bool? overshootDeringing

Apply overshooting to samples with extreme values.

bool? optimizeScans

Split spectrum of DCT coefficients into separate scans.

int? quantTable

Use predefined quantization table with given index.

Enums.ForeignSubsample? subsampleMode

Select chroma subsample operation mode.

int? restartInterval

Add restart markers every specified number of mcu.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.JpegsaveStream(stream, q: int, optimizeCoding: bool, interlace: bool, trellisQuant: bool, overshootDeringing: bool, optimizeScans: bool, quantTable: int, subsampleMode: Enums.ForeignSubsample, restartInterval: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

JpegsaveTarget(Target, int?, bool?, bool?, bool?, bool?, bool?, int?, ForeignSubsample?, int?, ForeignKeep?, double[], int?, string)

Save image to jpeg target.

Declaration
public void JpegsaveTarget(Target target, int? q = null, bool? optimizeCoding = null, bool? interlace = null, bool? trellisQuant = null, bool? overshootDeringing = null, bool? optimizeScans = null, int? quantTable = null, Enums.ForeignSubsample? subsampleMode = null, int? restartInterval = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Target target

Target to save to.

int? q

Q factor.

bool? optimizeCoding

Compute optimal Huffman coding tables.

bool? interlace

Generate an interlaced (progressive) jpeg.

bool? trellisQuant

Apply trellis quantisation to each 8x8 block.

bool? overshootDeringing

Apply overshooting to samples with extreme values.

bool? optimizeScans

Split spectrum of DCT coefficients into separate scans.

int? quantTable

Use predefined quantization table with given index.

Enums.ForeignSubsample? subsampleMode

Select chroma subsample operation mode.

int? restartInterval

Add restart markers every specified number of mcu.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.JpegsaveTarget(target, q: int, optimizeCoding: bool, interlace: bool, trellisQuant: bool, overshootDeringing: bool, optimizeScans: bool, quantTable: int, subsampleMode: Enums.ForeignSubsample, restartInterval: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Jxlload(string, out ForeignFlags, int?, int?, bool?, Access?, FailOn?, bool?)

Load JPEG-XL image.

Declaration
public static Image Jxlload(string filename, out Enums.ForeignFlags flags, int? page = null, int? n = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Jxlload(filename, out var flags, page: int, n: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Jxlload(string, int?, int?, bool?, Access?, FailOn?, bool?)

Load JPEG-XL image.

Declaration
public static Image Jxlload(string filename, int? page = null, int? n = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Jxlload(filename, page: int, n: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

JxlloadBuffer(byte[], out ForeignFlags, int?, int?, bool?, Access?, FailOn?, bool?)

Load JPEG-XL image.

Declaration
public static Image JxlloadBuffer(byte[] buffer, out Enums.ForeignFlags flags, int? page = null, int? n = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.JxlloadBuffer(buffer, out var flags, page: int, n: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

JxlloadBuffer(byte[], int?, int?, bool?, Access?, FailOn?, bool?)

Load JPEG-XL image.

Declaration
public static Image JxlloadBuffer(byte[] buffer, int? page = null, int? n = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.JxlloadBuffer(buffer, page: int, n: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

JxlloadSource(Source, out ForeignFlags, int?, int?, bool?, Access?, FailOn?, bool?)

Load JPEG-XL image.

Declaration
public static Image JxlloadSource(Source source, out Enums.ForeignFlags flags, int? page = null, int? n = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.JxlloadSource(source, out var flags, page: int, n: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

JxlloadSource(Source, int?, int?, bool?, Access?, FailOn?, bool?)

Load JPEG-XL image.

Declaration
public static Image JxlloadSource(Source source, int? page = null, int? n = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.JxlloadSource(source, page: int, n: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

JxlloadStream(Stream, out ForeignFlags, int?, int?, bool?, Access?, FailOn?, bool?)

Load JPEG-XL image.

Declaration
public static Image JxlloadStream(Stream stream, out Enums.ForeignFlags flags, int? page = null, int? n = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.JxlloadStream(stream, out var flags, page: int, n: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

JxlloadStream(Stream, int?, int?, bool?, Access?, FailOn?, bool?)

Load JPEG-XL image.

Declaration
public static Image JxlloadStream(Stream stream, int? page = null, int? n = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.JxlloadStream(stream, page: int, n: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Jxlsave(string, int?, double?, int?, bool?, int?, ForeignKeep?, double[], int?, string)

Save image in JPEG-XL format.

Declaration
public void Jxlsave(string filename, int? tier = null, double? distance = null, int? effort = null, bool? lossless = null, int? q = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

int? tier

Decode speed tier.

double? distance

Target butteraugli distance.

int? effort

Encoding effort.

bool? lossless

Enable lossless compression.

int? q

Quality factor.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Jxlsave(filename, tier: int, distance: double, effort: int, lossless: bool, q: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

JxlsaveBuffer(int?, double?, int?, bool?, int?, ForeignKeep?, double[], int?, string)

Save image in JPEG-XL format.

Declaration
public byte[] JxlsaveBuffer(int? tier = null, double? distance = null, int? effort = null, bool? lossless = null, int? q = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
int? tier

Decode speed tier.

double? distance

Target butteraugli distance.

int? effort

Encoding effort.

bool? lossless

Enable lossless compression.

int? q

Quality factor.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Returns
Type Description
byte[]

An array of bytes.

Examples
byte[] buffer = in.JxlsaveBuffer(tier: int, distance: double, effort: int, lossless: bool, q: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

JxlsaveStream(Stream, int?, double?, int?, bool?, int?, ForeignKeep?, double[], int?, string)

Save image in JPEG-XL format.

Declaration
public void JxlsaveStream(Stream stream, int? tier = null, double? distance = null, int? effort = null, bool? lossless = null, int? q = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Stream stream

Stream to save to.

int? tier

Decode speed tier.

double? distance

Target butteraugli distance.

int? effort

Encoding effort.

bool? lossless

Enable lossless compression.

int? q

Quality factor.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.JxlsaveStream(stream, tier: int, distance: double, effort: int, lossless: bool, q: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

JxlsaveTarget(Target, int?, double?, int?, bool?, int?, ForeignKeep?, double[], int?, string)

Save image in JPEG-XL format.

Declaration
public void JxlsaveTarget(Target target, int? tier = null, double? distance = null, int? effort = null, bool? lossless = null, int? q = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Target target

Target to save to.

int? tier

Decode speed tier.

double? distance

Target butteraugli distance.

int? effort

Encoding effort.

bool? lossless

Enable lossless compression.

int? q

Quality factor.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.JxlsaveTarget(target, tier: int, distance: double, effort: int, lossless: bool, q: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

LCh2CMC()

Transform LCh to CMC.

Declaration
public Image LCh2CMC()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.LCh2CMC();

LCh2Lab()

Transform LCh to Lab.

Declaration
public Image LCh2Lab()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.LCh2Lab();

Lab2LCh()

Transform Lab to LCh.

Declaration
public Image Lab2LCh()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Lab2LCh();

Lab2LabQ()

Transform float Lab to LabQ coding.

Declaration
public Image Lab2LabQ()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Lab2LabQ();

Lab2LabS()

Transform float Lab to signed short.

Declaration
public Image Lab2LabS()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Lab2LabS();

Lab2XYZ(double[])

Transform CIELAB to XYZ.

Declaration
public Image Lab2XYZ(double[] temp = null)
Parameters
Type Name Description
double[] temp

Color temperature.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Lab2XYZ(temp: double[]);

LabQ2Lab()

Unpack a LabQ image to float Lab.

Declaration
public Image LabQ2Lab()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.LabQ2Lab();

LabQ2LabS()

Unpack a LabQ image to short Lab.

Declaration
public Image LabQ2LabS()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.LabQ2LabS();

LabQ2sRGB()

Convert a LabQ image to sRGB.

Declaration
public Image LabQ2sRGB()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.LabQ2sRGB();

LabS2Lab()

Transform signed short Lab to float.

Declaration
public Image LabS2Lab()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.LabS2Lab();

LabS2LabQ()

Transform short Lab to LabQ coding.

Declaration
public Image LabS2LabQ()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.LabS2LabQ();

Labelregions()

Label regions in an image.

Declaration
public Image Labelregions()
Returns
Type Description
Image

A new Image.

Examples
using Image mask = in.Labelregions();

Labelregions(out int)

Label regions in an image.

Declaration
public Image Labelregions(out int segments)
Parameters
Type Name Description
int segments

Number of discrete contiguous regions.

Returns
Type Description
Image

A new Image.

Examples
using Image mask = in.Labelregions(out var segments);

Linear(double[], double[], bool?)

Calculate (a * in + b).

Declaration
public Image Linear(double[] a, double[] b, bool? uchar = null)
Parameters
Type Name Description
double[] a

Multiply by this.

double[] b

Add this.

bool? uchar

Output should be uchar.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Linear(a, b, uchar: bool);

Linecache(int?, Access?, bool?, bool?)

Cache an image as a set of lines.

Declaration
public Image Linecache(int? tileHeight = null, Enums.Access? access = null, bool? threaded = null, bool? persistent = null)
Parameters
Type Name Description
int? tileHeight

Tile height in pixels.

Enums.Access? access

Expected access pattern.

bool? threaded

Allow threaded access.

bool? persistent

Keep cache between evaluations.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Linecache(tileHeight: int, access: Enums.Access, threaded: bool, persistent: bool);

Log()

Return the natural log of an image.

Declaration
public Image Log()
Returns
Type Description
Image

A new Image.

Log10()

Return the log base 10 of an image.

Declaration
public Image Log10()
Returns
Type Description
Image

A new Image.

Logmat(double, double, bool?, Precision?)

Make a Laplacian of Gaussian image.

Declaration
public static Image Logmat(double sigma, double minAmpl, bool? separable = null, Enums.Precision? precision = null)
Parameters
Type Name Description
double sigma

Radius of Gaussian.

double minAmpl

Minimum amplitude of Gaussian.

bool? separable

Generate separable Gaussian.

Enums.Precision? precision

Generate with this precision.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Logmat(sigma, minAmpl, separable: bool, precision: Enums.Precision);

Magickload(string, out ForeignFlags, string, int?, int?, bool?, Access?, FailOn?, bool?)

Load file with ImageMagick.

Declaration
public static Image Magickload(string filename, out Enums.ForeignFlags flags, string density = null, int? page = null, int? n = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

string density

Canvas resolution for rendering vector formats like SVG.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Magickload(filename, out var flags, density: string, page: int, n: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Magickload(string, string, int?, int?, bool?, Access?, FailOn?, bool?)

Load file with ImageMagick.

Declaration
public static Image Magickload(string filename, string density = null, int? page = null, int? n = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

string density

Canvas resolution for rendering vector formats like SVG.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Magickload(filename, density: string, page: int, n: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

MagickloadBuffer(byte[], out ForeignFlags, string, int?, int?, bool?, Access?, FailOn?, bool?)

Load buffer with ImageMagick.

Declaration
public static Image MagickloadBuffer(byte[] buffer, out Enums.ForeignFlags flags, string density = null, int? page = null, int? n = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

Enums.ForeignFlags flags

Flags for this file.

string density

Canvas resolution for rendering vector formats like SVG.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MagickloadBuffer(buffer, out var flags, density: string, page: int, n: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

MagickloadBuffer(byte[], string, int?, int?, bool?, Access?, FailOn?, bool?)

Load buffer with ImageMagick.

Declaration
public static Image MagickloadBuffer(byte[] buffer, string density = null, int? page = null, int? n = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

string density

Canvas resolution for rendering vector formats like SVG.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MagickloadBuffer(buffer, density: string, page: int, n: int, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Magicksave(string, string, int?, bool?, bool?, int?, ForeignKeep?, double[], int?, string)

Save file with ImageMagick.

Declaration
public void Magicksave(string filename, string format = null, int? quality = null, bool? optimizeGifFrames = null, bool? optimizeGifTransparency = null, int? bitdepth = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

string format

Format to save in.

int? quality

Quality to use.

bool? optimizeGifFrames

Apply GIF frames optimization.

bool? optimizeGifTransparency

Apply GIF transparency optimization.

int? bitdepth

Number of bits per pixel.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Magicksave(filename, format: string, quality: int, optimizeGifFrames: bool, optimizeGifTransparency: bool, bitdepth: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

MagicksaveBuffer(string, int?, bool?, bool?, int?, ForeignKeep?, double[], int?, string)

Save image to magick buffer.

Declaration
public byte[] MagicksaveBuffer(string format = null, int? quality = null, bool? optimizeGifFrames = null, bool? optimizeGifTransparency = null, int? bitdepth = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string format

Format to save in.

int? quality

Quality to use.

bool? optimizeGifFrames

Apply GIF frames optimization.

bool? optimizeGifTransparency

Apply GIF transparency optimization.

int? bitdepth

Number of bits per pixel.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Returns
Type Description
byte[]

An array of bytes.

Examples
byte[] buffer = in.MagicksaveBuffer(format: string, quality: int, optimizeGifFrames: bool, optimizeGifTransparency: bool, bitdepth: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Mapim(Image, GObject, double[], bool?, Extend?)

Resample with a map image.

Declaration
public Image Mapim(Image index, GObject interpolate = null, double[] background = null, bool? premultiplied = null, Enums.Extend? extend = null)
Parameters
Type Name Description
Image index

Index pixels with this.

GObject interpolate

Interpolate pixels with this.

double[] background

Background value.

bool? premultiplied

Images have premultiplied alpha.

Enums.Extend? extend

How to generate the extra pixels.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Mapim(index, interpolate: GObject, background: double[], premultiplied: bool, extend: Enums.Extend);

Maplut(Image, int?)

Map an image though a lut.

Declaration
public Image Maplut(Image lut, int? band = null)
Parameters
Type Name Description
Image lut

Look-up table image.

int? band

Apply one-band lut to this band of in.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Maplut(lut, band: int);

MaskButterworth(int, int, double, double, double, bool?, bool?, bool?, bool?)

Make a butterworth filter.

Declaration
public static Image MaskButterworth(int width, int height, double order, double frequencyCutoff, double amplitudeCutoff, bool? uchar = null, bool? nodc = null, bool? reject = null, bool? optical = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

double order

Filter order.

double frequencyCutoff

Frequency cutoff.

double amplitudeCutoff

Amplitude cutoff.

bool? uchar

Output an unsigned char image.

bool? nodc

Remove DC component.

bool? reject

Invert the sense of the filter.

bool? optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MaskButterworth(width, height, order, frequencyCutoff, amplitudeCutoff, uchar: bool, nodc: bool, reject: bool, optical: bool);

MaskButterworthBand(int, int, double, double, double, double, double, bool?, bool?, bool?, bool?)

Make a butterworth_band filter.

Declaration
public static Image MaskButterworthBand(int width, int height, double order, double frequencyCutoffX, double frequencyCutoffY, double radius, double amplitudeCutoff, bool? uchar = null, bool? nodc = null, bool? reject = null, bool? optical = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

double order

Filter order.

double frequencyCutoffX

Frequency cutoff x.

double frequencyCutoffY

Frequency cutoff y.

double radius

Radius of circle.

double amplitudeCutoff

Amplitude cutoff.

bool? uchar

Output an unsigned char image.

bool? nodc

Remove DC component.

bool? reject

Invert the sense of the filter.

bool? optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MaskButterworthBand(width, height, order, frequencyCutoffX, frequencyCutoffY, radius, amplitudeCutoff, uchar: bool, nodc: bool, reject: bool, optical: bool);

MaskButterworthRing(int, int, double, double, double, double, bool?, bool?, bool?, bool?)

Make a butterworth ring filter.

Declaration
public static Image MaskButterworthRing(int width, int height, double order, double frequencyCutoff, double amplitudeCutoff, double ringwidth, bool? uchar = null, bool? nodc = null, bool? reject = null, bool? optical = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

double order

Filter order.

double frequencyCutoff

Frequency cutoff.

double amplitudeCutoff

Amplitude cutoff.

double ringwidth

Ringwidth.

bool? uchar

Output an unsigned char image.

bool? nodc

Remove DC component.

bool? reject

Invert the sense of the filter.

bool? optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MaskButterworthRing(width, height, order, frequencyCutoff, amplitudeCutoff, ringwidth, uchar: bool, nodc: bool, reject: bool, optical: bool);

MaskFractal(int, int, double, bool?, bool?, bool?, bool?)

Make fractal filter.

Declaration
public static Image MaskFractal(int width, int height, double fractalDimension, bool? uchar = null, bool? nodc = null, bool? reject = null, bool? optical = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

double fractalDimension

Fractal dimension.

bool? uchar

Output an unsigned char image.

bool? nodc

Remove DC component.

bool? reject

Invert the sense of the filter.

bool? optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MaskFractal(width, height, fractalDimension, uchar: bool, nodc: bool, reject: bool, optical: bool);

MaskGaussian(int, int, double, double, bool?, bool?, bool?, bool?)

Make a gaussian filter.

Declaration
public static Image MaskGaussian(int width, int height, double frequencyCutoff, double amplitudeCutoff, bool? uchar = null, bool? nodc = null, bool? reject = null, bool? optical = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

double frequencyCutoff

Frequency cutoff.

double amplitudeCutoff

Amplitude cutoff.

bool? uchar

Output an unsigned char image.

bool? nodc

Remove DC component.

bool? reject

Invert the sense of the filter.

bool? optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MaskGaussian(width, height, frequencyCutoff, amplitudeCutoff, uchar: bool, nodc: bool, reject: bool, optical: bool);

MaskGaussianBand(int, int, double, double, double, double, bool?, bool?, bool?, bool?)

Make a gaussian filter.

Declaration
public static Image MaskGaussianBand(int width, int height, double frequencyCutoffX, double frequencyCutoffY, double radius, double amplitudeCutoff, bool? uchar = null, bool? nodc = null, bool? reject = null, bool? optical = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

double frequencyCutoffX

Frequency cutoff x.

double frequencyCutoffY

Frequency cutoff y.

double radius

Radius of circle.

double amplitudeCutoff

Amplitude cutoff.

bool? uchar

Output an unsigned char image.

bool? nodc

Remove DC component.

bool? reject

Invert the sense of the filter.

bool? optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MaskGaussianBand(width, height, frequencyCutoffX, frequencyCutoffY, radius, amplitudeCutoff, uchar: bool, nodc: bool, reject: bool, optical: bool);

MaskGaussianRing(int, int, double, double, double, bool?, bool?, bool?, bool?)

Make a gaussian ring filter.

Declaration
public static Image MaskGaussianRing(int width, int height, double frequencyCutoff, double amplitudeCutoff, double ringwidth, bool? uchar = null, bool? nodc = null, bool? reject = null, bool? optical = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

double frequencyCutoff

Frequency cutoff.

double amplitudeCutoff

Amplitude cutoff.

double ringwidth

Ringwidth.

bool? uchar

Output an unsigned char image.

bool? nodc

Remove DC component.

bool? reject

Invert the sense of the filter.

bool? optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MaskGaussianRing(width, height, frequencyCutoff, amplitudeCutoff, ringwidth, uchar: bool, nodc: bool, reject: bool, optical: bool);

MaskIdeal(int, int, double, bool?, bool?, bool?, bool?)

Make an ideal filter.

Declaration
public static Image MaskIdeal(int width, int height, double frequencyCutoff, bool? uchar = null, bool? nodc = null, bool? reject = null, bool? optical = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

double frequencyCutoff

Frequency cutoff.

bool? uchar

Output an unsigned char image.

bool? nodc

Remove DC component.

bool? reject

Invert the sense of the filter.

bool? optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MaskIdeal(width, height, frequencyCutoff, uchar: bool, nodc: bool, reject: bool, optical: bool);

MaskIdealBand(int, int, double, double, double, bool?, bool?, bool?, bool?)

Make an ideal band filter.

Declaration
public static Image MaskIdealBand(int width, int height, double frequencyCutoffX, double frequencyCutoffY, double radius, bool? uchar = null, bool? nodc = null, bool? reject = null, bool? optical = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

double frequencyCutoffX

Frequency cutoff x.

double frequencyCutoffY

Frequency cutoff y.

double radius

Radius of circle.

bool? uchar

Output an unsigned char image.

bool? nodc

Remove DC component.

bool? reject

Invert the sense of the filter.

bool? optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MaskIdealBand(width, height, frequencyCutoffX, frequencyCutoffY, radius, uchar: bool, nodc: bool, reject: bool, optical: bool);

MaskIdealRing(int, int, double, double, bool?, bool?, bool?, bool?)

Make an ideal ring filter.

Declaration
public static Image MaskIdealRing(int width, int height, double frequencyCutoff, double ringwidth, bool? uchar = null, bool? nodc = null, bool? reject = null, bool? optical = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

double frequencyCutoff

Frequency cutoff.

double ringwidth

Ringwidth.

bool? uchar

Output an unsigned char image.

bool? nodc

Remove DC component.

bool? reject

Invert the sense of the filter.

bool? optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MaskIdealRing(width, height, frequencyCutoff, ringwidth, uchar: bool, nodc: bool, reject: bool, optical: bool);

Match(Image, int, int, int, int, int, int, int, int, int?, int?, bool?, GObject)

First-order match of two images.

Declaration
public Image Match(Image sec, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int? hwindow = null, int? harea = null, bool? search = null, GObject interpolate = null)
Parameters
Type Name Description
Image sec

Secondary image.

int xr1

Position of first reference tie-point.

int yr1

Position of first reference tie-point.

int xs1

Position of first secondary tie-point.

int ys1

Position of first secondary tie-point.

int xr2

Position of second reference tie-point.

int yr2

Position of second reference tie-point.

int xs2

Position of second secondary tie-point.

int ys2

Position of second secondary tie-point.

int? hwindow

Half window size.

int? harea

Half area size.

bool? search

Search to improve tie-points.

GObject interpolate

Interpolate pixels with this.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = ref.Match(sec, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, hwindow: int, harea: int, search: bool, interpolate: GObject);

Math(OperationMath)

Apply a math operation to an image.

Declaration
public Image Math(Enums.OperationMath math)
Parameters
Type Name Description
Enums.OperationMath math

Math to perform.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Math(math);

Math2(Image, OperationMath2)

Binary math operations.

Declaration
public Image Math2(Image right, Enums.OperationMath2 math2)
Parameters
Type Name Description
Image right

Right-hand image argument.

Enums.OperationMath2 math2

Math to perform.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = left.Math2(right, math2);

Math2Const(OperationMath2, double[])

Binary math operations with a constant.

Declaration
public Image Math2Const(Enums.OperationMath2 math2, double[] c)
Parameters
Type Name Description
Enums.OperationMath2 math2

Math to perform.

double[] c

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Math2Const(math2, c);

Matload(string, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load mat from file.

Declaration
public static Image Matload(string filename, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Matload(filename, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Matload(string, bool?, Access?, FailOn?, bool?)

Load mat from file.

Declaration
public static Image Matload(string filename, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Matload(filename, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Matrixinvert()

Invert an matrix.

Declaration
public Image Matrixinvert()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Matrixinvert();

Matrixload(string, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load matrix.

Declaration
public static Image Matrixload(string filename, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Matrixload(filename, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Matrixload(string, bool?, Access?, FailOn?, bool?)

Load matrix.

Declaration
public static Image Matrixload(string filename, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Matrixload(filename, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

MatrixloadSource(Source, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load matrix.

Declaration
public static Image MatrixloadSource(Source source, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MatrixloadSource(source, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

MatrixloadSource(Source, bool?, Access?, FailOn?, bool?)

Load matrix.

Declaration
public static Image MatrixloadSource(Source source, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MatrixloadSource(source, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

MatrixloadStream(Stream, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load matrix.

Declaration
public static Image MatrixloadStream(Stream stream, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MatrixloadStream(stream, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

MatrixloadStream(Stream, bool?, Access?, FailOn?, bool?)

Load matrix.

Declaration
public static Image MatrixloadStream(Stream stream, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.MatrixloadStream(stream, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Matrixprint(ForeignKeep?, double[], int?, string)

Print matrix.

Declaration
public void Matrixprint(Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Matrixprint(keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Matrixsave(string, ForeignKeep?, double[], int?, string)

Save image to matrix.

Declaration
public void Matrixsave(string filename, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Matrixsave(filename, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

MatrixsaveStream(Stream, ForeignKeep?, double[], int?, string)

Save image to matrix.

Declaration
public void MatrixsaveStream(Stream stream, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Stream stream

Stream to save to.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.MatrixsaveStream(stream, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

MatrixsaveTarget(Target, ForeignKeep?, double[], int?, string)

Save image to matrix.

Declaration
public void MatrixsaveTarget(Target target, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Target target

Target to save to.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.MatrixsaveTarget(target, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Max(out int, out int, out double[], out int[], out int[], int?)

Find image maximum.

Declaration
public double Max(out int x, out int y, out double[] outArray, out int[] xArray, out int[] yArray, int? size = null)
Parameters
Type Name Description
int x

Horizontal position of maximum.

int y

Vertical position of maximum.

double[] outArray

Array of output values.

int[] xArray

Array of horizontal positions.

int[] yArray

Array of vertical positions.

int? size

Number of maximum values to find.

Returns
Type Description
double

A double.

Examples
double @out = in.Max(out var x, out var y, out var outArray, out var xArray, out var yArray, size: int);

Max(out int, out int, out double[], out int[], int?)

Find image maximum.

Declaration
public double Max(out int x, out int y, out double[] outArray, out int[] xArray, int? size = null)
Parameters
Type Name Description
int x

Horizontal position of maximum.

int y

Vertical position of maximum.

double[] outArray

Array of output values.

int[] xArray

Array of horizontal positions.

int? size

Number of maximum values to find.

Returns
Type Description
double

A double.

Examples
double @out = in.Max(out var x, out var y, out var outArray, out var xArray, size: int);

Max(out int, out int, out double[], int?)

Find image maximum.

Declaration
public double Max(out int x, out int y, out double[] outArray, int? size = null)
Parameters
Type Name Description
int x

Horizontal position of maximum.

int y

Vertical position of maximum.

double[] outArray

Array of output values.

int? size

Number of maximum values to find.

Returns
Type Description
double

A double.

Examples
double @out = in.Max(out var x, out var y, out var outArray, size: int);

Max(out int, out int, int?)

Find image maximum.

Declaration
public double Max(out int x, out int y, int? size = null)
Parameters
Type Name Description
int x

Horizontal position of maximum.

int y

Vertical position of maximum.

int? size

Number of maximum values to find.

Returns
Type Description
double

A double.

Examples
double @out = in.Max(out var x, out var y, size: int);

Max(out int, int?)

Find image maximum.

Declaration
public double Max(out int x, int? size = null)
Parameters
Type Name Description
int x

Horizontal position of maximum.

int? size

Number of maximum values to find.

Returns
Type Description
double

A double.

Examples
double @out = in.Max(out var x, size: int);

Max(int?)

Find image maximum.

Declaration
public double Max(int? size = null)
Parameters
Type Name Description
int? size

Number of maximum values to find.

Returns
Type Description
double

A double.

Examples
double @out = in.Max(size: int);

MaxPos()

Return the coordinates of the image maximum.

Declaration
public double[] MaxPos()
Returns
Type Description
double[]

An array of doubles.

Maxpair(Image)

Maximum of a pair of images.

Declaration
public Image Maxpair(Image right)
Parameters
Type Name Description
Image right

Right-hand image argument.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = left.Maxpair(right);

Measure(int, int, int?, int?, int?, int?)

Measure a set of patches on a color chart.

Declaration
public Image Measure(int h, int v, int? left = null, int? top = null, int? width = null, int? height = null)
Parameters
Type Name Description
int h

Number of patches across chart.

int v

Number of patches down chart.

int? left

Left edge of extract area.

int? top

Top edge of extract area.

int? width

Width of extract area.

int? height

Height of extract area.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Measure(h, v, left: int, top: int, width: int, height: int);

Median(int)

size x size median filter.

Declaration
public Image Median(int size)
Parameters
Type Name Description
int size

The median filter.

Returns
Type Description
Image

A new Image.

Merge(Image, Direction, int, int, int?)

Merge two images.

Declaration
public Image Merge(Image sec, Enums.Direction direction, int dx, int dy, int? mblend = null)
Parameters
Type Name Description
Image sec

Secondary image.

Enums.Direction direction

Horizontal or vertical merge.

int dx

Horizontal displacement from sec to ref.

int dy

Vertical displacement from sec to ref.

int? mblend

Maximum blend size.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = ref.Merge(sec, direction, dx, dy, mblend: int);

Min(out int, out int, out double[], out int[], out int[], int?)

Find image minimum.

Declaration
public double Min(out int x, out int y, out double[] outArray, out int[] xArray, out int[] yArray, int? size = null)
Parameters
Type Name Description
int x

Horizontal position of minimum.

int y

Vertical position of minimum.

double[] outArray

Array of output values.

int[] xArray

Array of horizontal positions.

int[] yArray

Array of vertical positions.

int? size

Number of minimum values to find.

Returns
Type Description
double

A double.

Examples
double @out = in.Min(out var x, out var y, out var outArray, out var xArray, out var yArray, size: int);

Min(out int, out int, out double[], out int[], int?)

Find image minimum.

Declaration
public double Min(out int x, out int y, out double[] outArray, out int[] xArray, int? size = null)
Parameters
Type Name Description
int x

Horizontal position of minimum.

int y

Vertical position of minimum.

double[] outArray

Array of output values.

int[] xArray

Array of horizontal positions.

int? size

Number of minimum values to find.

Returns
Type Description
double

A double.

Examples
double @out = in.Min(out var x, out var y, out var outArray, out var xArray, size: int);

Min(out int, out int, out double[], int?)

Find image minimum.

Declaration
public double Min(out int x, out int y, out double[] outArray, int? size = null)
Parameters
Type Name Description
int x

Horizontal position of minimum.

int y

Vertical position of minimum.

double[] outArray

Array of output values.

int? size

Number of minimum values to find.

Returns
Type Description
double

A double.

Examples
double @out = in.Min(out var x, out var y, out var outArray, size: int);

Min(out int, out int, int?)

Find image minimum.

Declaration
public double Min(out int x, out int y, int? size = null)
Parameters
Type Name Description
int x

Horizontal position of minimum.

int y

Vertical position of minimum.

int? size

Number of minimum values to find.

Returns
Type Description
double

A double.

Examples
double @out = in.Min(out var x, out var y, size: int);

Min(out int, int?)

Find image minimum.

Declaration
public double Min(out int x, int? size = null)
Parameters
Type Name Description
int x

Horizontal position of minimum.

int? size

Number of minimum values to find.

Returns
Type Description
double

A double.

Examples
double @out = in.Min(out var x, size: int);

Min(int?)

Find image minimum.

Declaration
public double Min(int? size = null)
Parameters
Type Name Description
int? size

Number of minimum values to find.

Returns
Type Description
double

A double.

Examples
double @out = in.Min(size: int);

MinPos()

Return the coordinates of the image minimum.

Declaration
public double[] MinPos()
Returns
Type Description
double[]

An array of doubles.

Minpair(Image)

Minimum of a pair of images.

Declaration
public Image Minpair(Image right)
Parameters
Type Name Description
Image right

Right-hand image argument.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = left.Minpair(right);

Morph(Image, OperationMorphology)

Morphology operation.

Declaration
public Image Morph(Image mask, Enums.OperationMorphology morph)
Parameters
Type Name Description
Image mask

Input matrix image.

Enums.OperationMorphology morph

Morphological operation to perform.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Morph(mask, morph);

Mosaic(Image, Direction, int, int, int, int, out int, out int, out double, out double, out double, out double, int?, int?, int?, int?)

Mosaic two images.

Declaration
public Image Mosaic(Image sec, Enums.Direction direction, int xref, int yref, int xsec, int ysec, out int dx0, out int dy0, out double scale1, out double angle1, out double dy1, out double dx1, int? hwindow = null, int? harea = null, int? mblend = null, int? bandno = null)
Parameters
Type Name Description
Image sec

Secondary image.

Enums.Direction direction

Horizontal or vertical mosaic.

int xref

Position of reference tie-point.

int yref

Position of reference tie-point.

int xsec

Position of secondary tie-point.

int ysec

Position of secondary tie-point.

int dx0

Detected integer offset.

int dy0

Detected integer offset.

double scale1

Detected scale.

double angle1

Detected rotation.

double dy1

Detected first-order displacement.

double dx1

Detected first-order displacement.

int? hwindow

Half window size.

int? harea

Half area size.

int? mblend

Maximum blend size.

int? bandno

Band to search for features on.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = ref.Mosaic(sec, direction, xref, yref, xsec, ysec, out var dx0, out var dy0, out var scale1, out var angle1, out var dy1, out var dx1, hwindow: int, harea: int, mblend: int, bandno: int);

Mosaic(Image, Direction, int, int, int, int, out int, out int, out double, out double, out double, int?, int?, int?, int?)

Mosaic two images.

Declaration
public Image Mosaic(Image sec, Enums.Direction direction, int xref, int yref, int xsec, int ysec, out int dx0, out int dy0, out double scale1, out double angle1, out double dy1, int? hwindow = null, int? harea = null, int? mblend = null, int? bandno = null)
Parameters
Type Name Description
Image sec

Secondary image.

Enums.Direction direction

Horizontal or vertical mosaic.

int xref

Position of reference tie-point.

int yref

Position of reference tie-point.

int xsec

Position of secondary tie-point.

int ysec

Position of secondary tie-point.

int dx0

Detected integer offset.

int dy0

Detected integer offset.

double scale1

Detected scale.

double angle1

Detected rotation.

double dy1

Detected first-order displacement.

int? hwindow

Half window size.

int? harea

Half area size.

int? mblend

Maximum blend size.

int? bandno

Band to search for features on.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = ref.Mosaic(sec, direction, xref, yref, xsec, ysec, out var dx0, out var dy0, out var scale1, out var angle1, out var dy1, hwindow: int, harea: int, mblend: int, bandno: int);

Mosaic(Image, Direction, int, int, int, int, out int, out int, out double, out double, int?, int?, int?, int?)

Mosaic two images.

Declaration
public Image Mosaic(Image sec, Enums.Direction direction, int xref, int yref, int xsec, int ysec, out int dx0, out int dy0, out double scale1, out double angle1, int? hwindow = null, int? harea = null, int? mblend = null, int? bandno = null)
Parameters
Type Name Description
Image sec

Secondary image.

Enums.Direction direction

Horizontal or vertical mosaic.

int xref

Position of reference tie-point.

int yref

Position of reference tie-point.

int xsec

Position of secondary tie-point.

int ysec

Position of secondary tie-point.

int dx0

Detected integer offset.

int dy0

Detected integer offset.

double scale1

Detected scale.

double angle1

Detected rotation.

int? hwindow

Half window size.

int? harea

Half area size.

int? mblend

Maximum blend size.

int? bandno

Band to search for features on.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = ref.Mosaic(sec, direction, xref, yref, xsec, ysec, out var dx0, out var dy0, out var scale1, out var angle1, hwindow: int, harea: int, mblend: int, bandno: int);

Mosaic(Image, Direction, int, int, int, int, out int, out int, out double, int?, int?, int?, int?)

Mosaic two images.

Declaration
public Image Mosaic(Image sec, Enums.Direction direction, int xref, int yref, int xsec, int ysec, out int dx0, out int dy0, out double scale1, int? hwindow = null, int? harea = null, int? mblend = null, int? bandno = null)
Parameters
Type Name Description
Image sec

Secondary image.

Enums.Direction direction

Horizontal or vertical mosaic.

int xref

Position of reference tie-point.

int yref

Position of reference tie-point.

int xsec

Position of secondary tie-point.

int ysec

Position of secondary tie-point.

int dx0

Detected integer offset.

int dy0

Detected integer offset.

double scale1

Detected scale.

int? hwindow

Half window size.

int? harea

Half area size.

int? mblend

Maximum blend size.

int? bandno

Band to search for features on.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = ref.Mosaic(sec, direction, xref, yref, xsec, ysec, out var dx0, out var dy0, out var scale1, hwindow: int, harea: int, mblend: int, bandno: int);

Mosaic(Image, Direction, int, int, int, int, out int, out int, int?, int?, int?, int?)

Mosaic two images.

Declaration
public Image Mosaic(Image sec, Enums.Direction direction, int xref, int yref, int xsec, int ysec, out int dx0, out int dy0, int? hwindow = null, int? harea = null, int? mblend = null, int? bandno = null)
Parameters
Type Name Description
Image sec

Secondary image.

Enums.Direction direction

Horizontal or vertical mosaic.

int xref

Position of reference tie-point.

int yref

Position of reference tie-point.

int xsec

Position of secondary tie-point.

int ysec

Position of secondary tie-point.

int dx0

Detected integer offset.

int dy0

Detected integer offset.

int? hwindow

Half window size.

int? harea

Half area size.

int? mblend

Maximum blend size.

int? bandno

Band to search for features on.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = ref.Mosaic(sec, direction, xref, yref, xsec, ysec, out var dx0, out var dy0, hwindow: int, harea: int, mblend: int, bandno: int);

Mosaic(Image, Direction, int, int, int, int, out int, int?, int?, int?, int?)

Mosaic two images.

Declaration
public Image Mosaic(Image sec, Enums.Direction direction, int xref, int yref, int xsec, int ysec, out int dx0, int? hwindow = null, int? harea = null, int? mblend = null, int? bandno = null)
Parameters
Type Name Description
Image sec

Secondary image.

Enums.Direction direction

Horizontal or vertical mosaic.

int xref

Position of reference tie-point.

int yref

Position of reference tie-point.

int xsec

Position of secondary tie-point.

int ysec

Position of secondary tie-point.

int dx0

Detected integer offset.

int? hwindow

Half window size.

int? harea

Half area size.

int? mblend

Maximum blend size.

int? bandno

Band to search for features on.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = ref.Mosaic(sec, direction, xref, yref, xsec, ysec, out var dx0, hwindow: int, harea: int, mblend: int, bandno: int);

Mosaic(Image, Direction, int, int, int, int, int?, int?, int?, int?)

Mosaic two images.

Declaration
public Image Mosaic(Image sec, Enums.Direction direction, int xref, int yref, int xsec, int ysec, int? hwindow = null, int? harea = null, int? mblend = null, int? bandno = null)
Parameters
Type Name Description
Image sec

Secondary image.

Enums.Direction direction

Horizontal or vertical mosaic.

int xref

Position of reference tie-point.

int yref

Position of reference tie-point.

int xsec

Position of secondary tie-point.

int ysec

Position of secondary tie-point.

int? hwindow

Half window size.

int? harea

Half area size.

int? mblend

Maximum blend size.

int? bandno

Band to search for features on.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = ref.Mosaic(sec, direction, xref, yref, xsec, ysec, hwindow: int, harea: int, mblend: int, bandno: int);

Mosaic1(Image, Direction, int, int, int, int, int, int, int, int, int?, int?, bool?, GObject, int?)

First-order mosaic of two images.

Declaration
public Image Mosaic1(Image sec, Enums.Direction direction, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, int? hwindow = null, int? harea = null, bool? search = null, GObject interpolate = null, int? mblend = null)
Parameters
Type Name Description
Image sec

Secondary image.

Enums.Direction direction

Horizontal or vertical mosaic.

int xr1

Position of first reference tie-point.

int yr1

Position of first reference tie-point.

int xs1

Position of first secondary tie-point.

int ys1

Position of first secondary tie-point.

int xr2

Position of second reference tie-point.

int yr2

Position of second reference tie-point.

int xs2

Position of second secondary tie-point.

int ys2

Position of second secondary tie-point.

int? hwindow

Half window size.

int? harea

Half area size.

bool? search

Search to improve tie-points.

GObject interpolate

Interpolate pixels with this.

int? mblend

Maximum blend size.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = ref.Mosaic1(sec, direction, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, hwindow: int, harea: int, search: bool, interpolate: GObject, mblend: int);

Msb(int?)

Pick most-significant byte from an image.

Declaration
public Image Msb(int? band = null)
Parameters
Type Name Description
int? band

Band to msb.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Msb(band: int);

Multiply(Image)

Multiply two images.

Declaration
public Image Multiply(Image right)
Parameters
Type Name Description
Image right

Right-hand image argument.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = left.Multiply(right);

Mutate(Action<MutableImage>)

Mutate an image with a delegate. Inside the delegate, you can call methods which modify the image, such as setting or removing metadata, or modifying pixels.

Declaration
public virtual Image Mutate(Action<MutableImage> action)
Parameters
Type Name Description
Action<MutableImage> action
Returns
Type Description
Image

A new Image.

Examples
using var mutated = image.Mutate(mutable =>
{
    for (var i = 0; i <= 100; i++)
    {
        var j = i / 100.0;
        mutable.DrawLine(new[] { 255.0 }, (int)(mutable.Width * j), 0, 0, (int)(mutable.Height * (1 - j)));
    }
});

NewFromArray<T>(T[,], double, double)

Create an image from a 2D array.

Declaration
public static Image NewFromArray<T>(T[,] array, double scale = 1, double offset = 0) where T : struct, IEquatable<T>
Parameters
Type Name Description
T[,] array

Create the image from these values.

double scale

Default to 1.0. What to divide each pixel by after convolution. Useful for integer convolution masks.

double offset

Default to 0.0. What to subtract from each pixel after convolution. Useful for integer convolution masks.

Returns
Type Description
Image

A new Image.

Type Parameters
Name Description
T
Remarks

A new one-band image with Double pixels is created from the array. These images are useful with the libvips convolution operator Conv(Image, Precision?, int?, int?).

Exceptions
Type Condition
VipsException

If unable to make image from array.

NewFromArray<T>(T[], double, double)

Create an image from a 1D array.

Declaration
public static Image NewFromArray<T>(T[] array, double scale = 1, double offset = 0) where T : struct, IEquatable<T>
Parameters
Type Name Description
T[] array

Create the image from these values. 1D arrays become a single row of pixels.

double scale

Default to 1.0. What to divide each pixel by after convolution. Useful for integer convolution masks.

double offset

Default to 0.0. What to subtract from each pixel after convolution. Useful for integer convolution masks.

Returns
Type Description
Image

A new Image.

Type Parameters
Name Description
T
Remarks

A new one-band image with Double pixels is created from the array. These images are useful with the libvips convolution operator Conv(Image, Precision?, int?, int?).

Exceptions
Type Condition
VipsException

If unable to make image from array.

NewFromArray<T>(T[][], double, double)

Create an image from a 2D array.

Declaration
public static Image NewFromArray<T>(T[][] array, double scale = 1, double offset = 0) where T : struct, IEquatable<T>
Parameters
Type Name Description
T[][] array

Create the image from these values.

double scale

Default to 1.0. What to divide each pixel by after convolution. Useful for integer convolution masks.

double offset

Default to 0.0. What to subtract from each pixel after convolution. Useful for integer convolution masks.

Returns
Type Description
Image

A new Image.

Type Parameters
Name Description
T
Remarks

A new one-band image with Double pixels is created from the array. These images are useful with the libvips convolution operator Conv(Image, Precision?, int?, int?).

Exceptions
Type Condition
VipsException

If unable to make image from array.

NewFromBuffer(byte[], string, Access?, FailOn?, VOption)

Load a formatted image from memory.

Declaration
public static Image NewFromBuffer(byte[] data, string strOptions = "", Enums.Access? access = null, Enums.FailOn? failOn = null, VOption kwargs = null)
Parameters
Type Name Description
byte[] data

The memory object to load the image from.

string strOptions

Load options as a string. Use Empty for no options.

Enums.Access? access

Hint the expected access pattern for the image.

Enums.FailOn? failOn

The type of error that will cause load to fail. By default, loaders are permissive, that is, None.

VOption kwargs

Optional options that depend on the load operation.

Returns
Type Description
Image

A new Image.

Remarks

This behaves exactly as NewFromFile(string, bool?, Access?, FailOn?, VOption), but the image is loaded from the memory object rather than from a file. The memory object can be a string or buffer.

Exceptions
Type Condition
VipsException

If unable to load from data.

NewFromBuffer(char[], string, Access?, FailOn?, VOption)

Load a formatted image from memory.

Declaration
public static Image NewFromBuffer(char[] data, string strOptions = "", Enums.Access? access = null, Enums.FailOn? failOn = null, VOption kwargs = null)
Parameters
Type Name Description
char[] data

The memory object to load the image from.

string strOptions

Load options as a string. Use Empty for no options.

Enums.Access? access

Hint the expected access pattern for the image.

Enums.FailOn? failOn

The type of error that will cause load to fail. By default, loaders are permissive, that is, None.

VOption kwargs

Optional options that depend on the load operation.

Returns
Type Description
Image

A new Image.

Remarks

This behaves exactly as NewFromFile(string, bool?, Access?, FailOn?, VOption), but the image is loaded from the memory object rather than from a file. The memory object can be a string or buffer.

Exceptions
Type Condition
VipsException

If unable to load from data.

NewFromBuffer(ReadOnlySpan<byte>, string, Access?, FailOn?, VOption)

Load a formatted image from memory.

Declaration
public static Image NewFromBuffer(ReadOnlySpan<byte> data, string strOptions = "", Enums.Access? access = null, Enums.FailOn? failOn = null, VOption kwargs = null)
Parameters
Type Name Description
ReadOnlySpan<byte> data

The memory object to load the image from.

string strOptions

Load options as a string. Use Empty for no options.

Enums.Access? access

Hint the expected access pattern for the image.

Enums.FailOn? failOn

The type of error that will cause load to fail. By default, loaders are permissive, that is, None.

VOption kwargs

Optional options that depend on the load operation.

Returns
Type Description
Image

A new Image.

Remarks

This behaves exactly as NewFromFile(string, bool?, Access?, FailOn?, VOption), but the image is loaded from the memory object rather than from a file. The memory object can be a string or buffer.

Exceptions
Type Condition
VipsException

If unable to load from data.

NewFromBuffer(string, string, Access?, FailOn?, VOption)

Load a formatted image from memory.

Declaration
public static Image NewFromBuffer(string data, string strOptions = "", Enums.Access? access = null, Enums.FailOn? failOn = null, VOption kwargs = null)
Parameters
Type Name Description
string data

The memory object to load the image from.

string strOptions

Load options as a string. Use Empty for no options.

Enums.Access? access

Hint the expected access pattern for the image.

Enums.FailOn? failOn

The type of error that will cause load to fail. By default, loaders are permissive, that is, None.

VOption kwargs

Optional options that depend on the load operation.

Returns
Type Description
Image

A new Image.

Remarks

This behaves exactly as NewFromFile(string, bool?, Access?, FailOn?, VOption), but the image is loaded from the memory object rather than from a file. The memory object can be a string or buffer.

Exceptions
Type Condition
VipsException

If unable to load from data.

NewFromFile(string, bool?, Access?, FailOn?, VOption)

Load an image from a file.

Declaration
public static Image NewFromFile(string vipsFilename, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, VOption kwargs = null)
Parameters
Type Name Description
string vipsFilename

The disc file to load the image from, with optional appended arguments.

bool? memory

If set to true, load the image via memory rather than via a temporary disc file. See NewTempFile(string) for notes on where temporary files are created. Small images are loaded via memory by default, use VIPS_DISC_THRESHOLD to set the definition of small.

Enums.Access? access

Hint the expected access pattern for the image.

Enums.FailOn? failOn

The type of error that will cause load to fail. By default, loaders are permissive, that is, None.

VOption kwargs

Optional options that depend on the load operation.

Returns
Type Description
Image

A new Image.

Remarks

This method can load images in any format supported by vips. The filename can include load options, for example:

using var image = Image.NewFromFile("fred.jpg[shrink=2]");

You can also supply options as keyword arguments, for example:

using var image = Image.NewFromFile("fred.jpg", new VOption
{
    {"shrink", 2}
});

The full set of options available depend upon the load operation that will be executed. Try something like:

$ vips jpegload

at the command-line to see a summary of the available options for the JPEG loader.

Loading is fast: only enough of the image is loaded to be able to fill out the header. Pixels will only be decompressed when they are needed.

Exceptions
Type Condition
VipsException

If unable to load from vipsFilename.

NewFromImage(Image)

Make a new image from an existing one.

Declaration
public Image NewFromImage(Image value)
Parameters
Type Name Description
Image value

The value for the pixels. Use a single number to make a one-band image; use an array constant to make a many-band image.

Returns
Type Description
Image

A new Image.

Remarks

A new image is created which has the same size, format, interpretation and resolution as this, but with every pixel set to value.

NewFromImage(params double[])

Make a new image from an existing one.

Declaration
public Image NewFromImage(params double[] doubles)
Parameters
Type Name Description
double[] doubles

The value for the pixels. Use a single number to make a one-band image; use an array constant to make a many-band image.

Returns
Type Description
Image

A new Image.

Remarks

A new image is created which has the same size, format, interpretation and resolution as this, but with every pixel set to value.

NewFromImage(params int[])

Make a new image from an existing one.

Declaration
public Image NewFromImage(params int[] ints)
Parameters
Type Name Description
int[] ints

The value for the pixels. Use a single number to make a one-band image; use an array constant to make a many-band image.

Returns
Type Description
Image

A new Image.

Remarks

A new image is created which has the same size, format, interpretation and resolution as this, but with every pixel set to value.

NewFromMemory(Array, int, int, int, BandFormat)

Wrap an image around a memory array.

Declaration
public static Image NewFromMemory(Array data, int width, int height, int bands, Enums.BandFormat format)
Parameters
Type Name Description
Array data

A memory object.

int width

Image width in pixels.

int height

Image height in pixels.

int bands

Number of bands.

Enums.BandFormat format

Band format.

Returns
Type Description
Image

A new Image.

Remarks

Wraps an image around a C-style memory array. For example, if the data memory array contains four bytes with the values 1, 2, 3, 4, you can make a one-band, 2x2 uchar image from it like this:

using var image = Image.NewFromMemory(data, 2, 2, 1, Enums.BandFormat.Uchar);

A reference is kept to the data object, so it will not be garbage-collected until the returned image is garbage-collected.

This method is useful for efficiently transferring images from GDI+ into libvips.

See WriteToMemory() for the opposite operation.

Use Copy(int?, int?, int?, BandFormat?, Coding?, Interpretation?, double?, double?, int?, int?) to set other image attributes.

Exceptions
Type Condition
VipsException

If unable to make image from data.

NewFromMemory(nint, ulong, int, int, int, BandFormat)

Wrap an image around a memory area.

Declaration
public static Image NewFromMemory(nint data, ulong size, int width, int height, int bands, Enums.BandFormat format)
Parameters
Type Name Description
nint data

A unmanaged block of memory.

ulong size

Length of memory.

int width

Image width in pixels.

int height

Image height in pixels.

int bands

Number of bands.

Enums.BandFormat format

Band format.

Returns
Type Description
Image

A new Image.

Remarks

Because libvips is "borrowing" data from the caller, this function is extremely dangerous. Unless you are very careful, you will get crashes or memory corruption. Use NewFromMemoryCopy(nint, ulong, int, int, int, BandFormat) instead if you are at all unsure.

Exceptions
Type Condition
VipsException

If unable to make image from data.

NewFromMemoryCopy(nint, ulong, int, int, int, BandFormat)

Like NewFromMemory(nint, ulong, int, int, int, BandFormat), but libvips will make a copy of the memory area. This means more memory use and an extra copy operation, but is much simpler and safer.

Declaration
public static Image NewFromMemoryCopy(nint data, ulong size, int width, int height, int bands, Enums.BandFormat format)
Parameters
Type Name Description
nint data

A unmanaged block of memory.

ulong size

Length of memory.

int width

Image width in pixels.

int height

Image height in pixels.

int bands

Number of bands.

Enums.BandFormat format

Band format.

Returns
Type Description
Image

A new Image.

Exceptions
Type Condition
VipsException

If unable to make image from data.

NewFromMemoryCopy<T>(ReadOnlySpan<T>, int, int, int, BandFormat)

Like NewFromMemory<T>(ReadOnlyMemory<T>, int, int, int, BandFormat), but for ReadOnlySpan<T>, so we must copy as it could be allocated on the stack.

Declaration
public static Image NewFromMemoryCopy<T>(ReadOnlySpan<T> data, int width, int height, int bands, Enums.BandFormat format) where T : unmanaged
Parameters
Type Name Description
ReadOnlySpan<T> data

A ReadOnlySpan<T>.

int width

Image width in pixels.

int height

Image height in pixels.

int bands

Number of bands.

Enums.BandFormat format

Band format.

Returns
Type Description
Image

A new Image.

Type Parameters
Name Description
T
Exceptions
Type Condition
VipsException

If unable to make image from data.

NewFromMemory<T>(ReadOnlyMemory<T>, int, int, int, BandFormat)

Wrap an image around a memory array.

Declaration
public static Image NewFromMemory<T>(ReadOnlyMemory<T> data, int width, int height, int bands, Enums.BandFormat format) where T : unmanaged
Parameters
Type Name Description
ReadOnlyMemory<T> data

A ReadOnlyMemory<T>.

int width

Image width in pixels.

int height

Image height in pixels.

int bands

Number of bands.

Enums.BandFormat format

Band format.

Returns
Type Description
Image

A new Image.

Type Parameters
Name Description
T
Exceptions
Type Condition
VipsException

If unable to make image from data.

NewFromSource(Source, string, Access?, FailOn?, VOption)

Load a formatted image from a source.

Declaration
public static Image NewFromSource(Source source, string strOptions = "", Enums.Access? access = null, Enums.FailOn? failOn = null, VOption kwargs = null)
Parameters
Type Name Description
Source source

The source to load the image from.

string strOptions

Load options as a string. Use Empty for no options.

Enums.Access? access

Hint the expected access pattern for the image.

Enums.FailOn? failOn

The type of error that will cause load to fail. By default, loaders are permissive, that is, None.

VOption kwargs

Optional options that depend on the load operation.

Returns
Type Description
Image

A new Image.

Remarks

This behaves exactly as NewFromFile(string, bool?, Access?, FailOn?, VOption), but the image is loaded from a source rather than from a file. At least libvips 8.9 is needed.

Exceptions
Type Condition
VipsException

If unable to load from source.

NewFromStream(Stream, string, Access?, FailOn?, VOption)

Load a formatted image from a stream.

Declaration
public static Image NewFromStream(Stream stream, string strOptions = "", Enums.Access? access = null, Enums.FailOn? failOn = null, VOption kwargs = null)
Parameters
Type Name Description
Stream stream

The stream to load the image from.

string strOptions

Load options as a string. Use Empty for no options.

Enums.Access? access

Hint the expected access pattern for the image.

Enums.FailOn? failOn

The type of error that will cause load to fail. By default, loaders are permissive, that is, None.

VOption kwargs

Optional options that depend on the load operation.

Returns
Type Description
Image

A new Image.

Remarks

This behaves exactly as NewFromSource(Source, string, Access?, FailOn?, VOption), but the image is loaded from a stream rather than from a source. At least libvips 8.9 is needed.

Exceptions
Type Condition
VipsException

If unable to load from stream.

NewTempFile(string)

Make a new temporary image.

Declaration
public static Image NewTempFile(string format)
Parameters
Type Name Description
string format

The format for the temp file, for example %s.v for a vips format file. The %s is substituted by the file path.

Returns
Type Description
Image

A new Image.

Remarks

Returns an image backed by a temporary file. When written to with Write(Image), a temporary file will be created on disc in the specified format. When the image is closed, the file will be deleted automatically.

The file is created in the temporary directory. This is set with the environment variable TMPDIR. If this is not set, then on Unix systems, vips will default to /tmp. On Windows, vips uses GetTempPath() to find the temporary directory.

vips uses g_mkstemp() to make the temporary filename. They generally look something like vips-12-EJKJFGH.v.

Exceptions
Type Condition
VipsException

If unable to make temp file from format.

Niftiload(string, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load NIfTI volume.

Declaration
public static Image Niftiload(string filename, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Niftiload(filename, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Niftiload(string, bool?, Access?, FailOn?, bool?)

Load NIfTI volume.

Declaration
public static Image Niftiload(string filename, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Niftiload(filename, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

NiftiloadSource(Source, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load NIfTI volumes.

Declaration
public static Image NiftiloadSource(Source source, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.NiftiloadSource(source, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

NiftiloadSource(Source, bool?, Access?, FailOn?, bool?)

Load NIfTI volumes.

Declaration
public static Image NiftiloadSource(Source source, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.NiftiloadSource(source, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

NiftiloadStream(Stream, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load NIfTI volumes.

Declaration
public static Image NiftiloadStream(Stream stream, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.NiftiloadStream(stream, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

NiftiloadStream(Stream, bool?, Access?, FailOn?, bool?)

Load NIfTI volumes.

Declaration
public static Image NiftiloadStream(Stream stream, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.NiftiloadStream(stream, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Niftisave(string, ForeignKeep?, double[], int?, string)

Save image to nifti file.

Declaration
public void Niftisave(string filename, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Niftisave(filename, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

NotEqual(Image)

This operation compares two images on inequality.

Declaration
public Image NotEqual(Image right)
Parameters
Type Name Description
Image right

A Image to compare.

Returns
Type Description
Image

A new Image.

NotEqual(double)

This operation compares two images on inequality.

Declaration
public Image NotEqual(double right)
Parameters
Type Name Description
double right

A double constant to compare.

Returns
Type Description
Image

A new Image.

NotEqual(double[])

This operation compares two images on inequality.

Declaration
public Image NotEqual(double[] right)
Parameters
Type Name Description
double[] right

A double array to compare.

Returns
Type Description
Image

A new Image.

NotEqual(int[])

This operation compares two images on inequality.

Declaration
public Image NotEqual(int[] right)
Parameters
Type Name Description
int[] right

A integer array to compare.

Returns
Type Description
Image

A new Image.

Openexrload(string, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load an OpenEXR image.

Declaration
public static Image Openexrload(string filename, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Openexrload(filename, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Openexrload(string, bool?, Access?, FailOn?, bool?)

Load an OpenEXR image.

Declaration
public static Image Openexrload(string filename, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Openexrload(filename, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Openslideload(string, out ForeignFlags, int?, bool?, string, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load file with OpenSlide.

Declaration
public static Image Openslideload(string filename, out Enums.ForeignFlags flags, int? level = null, bool? autocrop = null, string associated = null, bool? attachAssociated = null, bool? rgb = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

int? level

Load this level from the file.

bool? autocrop

Crop to image bounds.

string associated

Load this associated image.

bool? attachAssociated

Attach all associated images.

bool? rgb

Output RGB (not RGBA).

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Openslideload(filename, out var flags, level: int, autocrop: bool, associated: string, attachAssociated: bool, rgb: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Openslideload(string, int?, bool?, string, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load file with OpenSlide.

Declaration
public static Image Openslideload(string filename, int? level = null, bool? autocrop = null, string associated = null, bool? attachAssociated = null, bool? rgb = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

int? level

Load this level from the file.

bool? autocrop

Crop to image bounds.

string associated

Load this associated image.

bool? attachAssociated

Attach all associated images.

bool? rgb

Output RGB (not RGBA).

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Openslideload(filename, level: int, autocrop: bool, associated: string, attachAssociated: bool, rgb: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

OpenslideloadSource(Source, out ForeignFlags, int?, bool?, string, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load source with OpenSlide.

Declaration
public static Image OpenslideloadSource(Source source, out Enums.ForeignFlags flags, int? level = null, bool? autocrop = null, string associated = null, bool? attachAssociated = null, bool? rgb = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

int? level

Load this level from the file.

bool? autocrop

Crop to image bounds.

string associated

Load this associated image.

bool? attachAssociated

Attach all associated images.

bool? rgb

Output RGB (not RGBA).

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.OpenslideloadSource(source, out var flags, level: int, autocrop: bool, associated: string, attachAssociated: bool, rgb: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

OpenslideloadSource(Source, int?, bool?, string, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load source with OpenSlide.

Declaration
public static Image OpenslideloadSource(Source source, int? level = null, bool? autocrop = null, string associated = null, bool? attachAssociated = null, bool? rgb = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

int? level

Load this level from the file.

bool? autocrop

Crop to image bounds.

string associated

Load this associated image.

bool? attachAssociated

Attach all associated images.

bool? rgb

Output RGB (not RGBA).

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.OpenslideloadSource(source, level: int, autocrop: bool, associated: string, attachAssociated: bool, rgb: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

OpenslideloadStream(Stream, out ForeignFlags, int?, bool?, string, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load stream with OpenSlide.

Declaration
public static Image OpenslideloadStream(Stream stream, out Enums.ForeignFlags flags, int? level = null, bool? autocrop = null, string associated = null, bool? attachAssociated = null, bool? rgb = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

int? level

Load this level from the file.

bool? autocrop

Crop to image bounds.

string associated

Load this associated image.

bool? attachAssociated

Attach all associated images.

bool? rgb

Output RGB (not RGBA).

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.OpenslideloadStream(stream, out var flags, level: int, autocrop: bool, associated: string, attachAssociated: bool, rgb: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

OpenslideloadStream(Stream, int?, bool?, string, bool?, bool?, bool?, Access?, FailOn?, bool?)

Load stream with OpenSlide.

Declaration
public static Image OpenslideloadStream(Stream stream, int? level = null, bool? autocrop = null, string associated = null, bool? attachAssociated = null, bool? rgb = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

int? level

Load this level from the file.

bool? autocrop

Crop to image bounds.

string associated

Load this associated image.

bool? attachAssociated

Attach all associated images.

bool? rgb

Output RGB (not RGBA).

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.OpenslideloadStream(stream, level: int, autocrop: bool, associated: string, attachAssociated: bool, rgb: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Pdfload(string, out ForeignFlags, int?, int?, double?, double?, double[], string, bool?, Access?, FailOn?, bool?)

Load PDF from file.

Declaration
public static Image Pdfload(string filename, out Enums.ForeignFlags flags, int? page = null, int? n = null, double? dpi = null, double? scale = null, double[] background = null, string password = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? dpi

DPI to render at.

double? scale

Factor to scale by.

double[] background

Background colour.

string password

Password to decrypt with.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Pdfload(filename, out var flags, page: int, n: int, dpi: double, scale: double, background: double[], password: string, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Pdfload(string, int?, int?, double?, double?, double[], string, bool?, Access?, FailOn?, bool?)

Load PDF from file.

Declaration
public static Image Pdfload(string filename, int? page = null, int? n = null, double? dpi = null, double? scale = null, double[] background = null, string password = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? dpi

DPI to render at.

double? scale

Factor to scale by.

double[] background

Background colour.

string password

Password to decrypt with.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Pdfload(filename, page: int, n: int, dpi: double, scale: double, background: double[], password: string, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PdfloadBuffer(byte[], out ForeignFlags, int?, int?, double?, double?, double[], string, bool?, Access?, FailOn?, bool?)

Load PDF from buffer.

Declaration
public static Image PdfloadBuffer(byte[] buffer, out Enums.ForeignFlags flags, int? page = null, int? n = null, double? dpi = null, double? scale = null, double[] background = null, string password = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? dpi

DPI to render at.

double? scale

Factor to scale by.

double[] background

Background colour.

string password

Password to decrypt with.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PdfloadBuffer(buffer, out var flags, page: int, n: int, dpi: double, scale: double, background: double[], password: string, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PdfloadBuffer(byte[], int?, int?, double?, double?, double[], string, bool?, Access?, FailOn?, bool?)

Load PDF from buffer.

Declaration
public static Image PdfloadBuffer(byte[] buffer, int? page = null, int? n = null, double? dpi = null, double? scale = null, double[] background = null, string password = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? dpi

DPI to render at.

double? scale

Factor to scale by.

double[] background

Background colour.

string password

Password to decrypt with.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PdfloadBuffer(buffer, page: int, n: int, dpi: double, scale: double, background: double[], password: string, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PdfloadSource(Source, out ForeignFlags, int?, int?, double?, double?, double[], string, bool?, Access?, FailOn?, bool?)

Load PDF from source.

Declaration
public static Image PdfloadSource(Source source, out Enums.ForeignFlags flags, int? page = null, int? n = null, double? dpi = null, double? scale = null, double[] background = null, string password = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? dpi

DPI to render at.

double? scale

Factor to scale by.

double[] background

Background colour.

string password

Password to decrypt with.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PdfloadSource(source, out var flags, page: int, n: int, dpi: double, scale: double, background: double[], password: string, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PdfloadSource(Source, int?, int?, double?, double?, double[], string, bool?, Access?, FailOn?, bool?)

Load PDF from source.

Declaration
public static Image PdfloadSource(Source source, int? page = null, int? n = null, double? dpi = null, double? scale = null, double[] background = null, string password = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? dpi

DPI to render at.

double? scale

Factor to scale by.

double[] background

Background colour.

string password

Password to decrypt with.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PdfloadSource(source, page: int, n: int, dpi: double, scale: double, background: double[], password: string, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PdfloadStream(Stream, out ForeignFlags, int?, int?, double?, double?, double[], string, bool?, Access?, FailOn?, bool?)

Load PDF from stream.

Declaration
public static Image PdfloadStream(Stream stream, out Enums.ForeignFlags flags, int? page = null, int? n = null, double? dpi = null, double? scale = null, double[] background = null, string password = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? dpi

DPI to render at.

double? scale

Factor to scale by.

double[] background

Background colour.

string password

Password to decrypt with.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PdfloadStream(stream, out var flags, page: int, n: int, dpi: double, scale: double, background: double[], password: string, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PdfloadStream(Stream, int?, int?, double?, double?, double[], string, bool?, Access?, FailOn?, bool?)

Load PDF from stream.

Declaration
public static Image PdfloadStream(Stream stream, int? page = null, int? n = null, double? dpi = null, double? scale = null, double[] background = null, string password = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? dpi

DPI to render at.

double? scale

Factor to scale by.

double[] background

Background colour.

string password

Password to decrypt with.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PdfloadStream(stream, page: int, n: int, dpi: double, scale: double, background: double[], password: string, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Percent(double)

Find threshold for percent of pixels.

Declaration
public int Percent(double percent)
Parameters
Type Name Description
double percent

Percent of pixels.

Returns
Type Description
int

A int.

Examples
int threshold = in.Percent(percent);

Perlin(int, int, int?, bool?, int?)

Make a perlin noise image.

Declaration
public static Image Perlin(int width, int height, int? cellSize = null, bool? uchar = null, int? seed = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

int? cellSize

Size of Perlin cells.

bool? uchar

Output an unsigned char image.

int? seed

Random number seed.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Perlin(width, height, cellSize: int, uchar: bool, seed: int);

Phasecor(Image)

Calculate phase correlation.

Declaration
public Image Phasecor(Image in2)
Parameters
Type Name Description
Image in2

Second input image.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Phasecor(in2);

Pngload(string, out ForeignFlags, bool?, bool?, Access?, FailOn?, bool?)

Load png from file.

Declaration
public static Image Pngload(string filename, out Enums.ForeignFlags flags, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Pngload(filename, out var flags, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Pngload(string, bool?, bool?, Access?, FailOn?, bool?)

Load png from file.

Declaration
public static Image Pngload(string filename, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Pngload(filename, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PngloadBuffer(byte[], out ForeignFlags, bool?, bool?, Access?, FailOn?, bool?)

Load png from buffer.

Declaration
public static Image PngloadBuffer(byte[] buffer, out Enums.ForeignFlags flags, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PngloadBuffer(buffer, out var flags, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PngloadBuffer(byte[], bool?, bool?, Access?, FailOn?, bool?)

Load png from buffer.

Declaration
public static Image PngloadBuffer(byte[] buffer, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PngloadBuffer(buffer, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PngloadSource(Source, out ForeignFlags, bool?, bool?, Access?, FailOn?, bool?)

Load png from source.

Declaration
public static Image PngloadSource(Source source, out Enums.ForeignFlags flags, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PngloadSource(source, out var flags, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PngloadSource(Source, bool?, bool?, Access?, FailOn?, bool?)

Load png from source.

Declaration
public static Image PngloadSource(Source source, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PngloadSource(source, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PngloadStream(Stream, out ForeignFlags, bool?, bool?, Access?, FailOn?, bool?)

Load png from stream.

Declaration
public static Image PngloadStream(Stream stream, out Enums.ForeignFlags flags, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PngloadStream(stream, out var flags, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PngloadStream(Stream, bool?, bool?, Access?, FailOn?, bool?)

Load png from stream.

Declaration
public static Image PngloadStream(Stream stream, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

bool? unlimited

Remove all denial of service limits.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PngloadStream(stream, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Pngsave(string, int?, bool?, ForeignPngFilter?, bool?, int?, double?, int?, int?, ForeignKeep?, double[], int?, string)

Save image to file as PNG.

Declaration
public void Pngsave(string filename, int? compression = null, bool? interlace = null, Enums.ForeignPngFilter? filter = null, bool? palette = null, int? q = null, double? dither = null, int? bitdepth = null, int? effort = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

int? compression

Compression factor.

bool? interlace

Interlace image.

Enums.ForeignPngFilter? filter

libspng row filter flag(s).

bool? palette

Quantise to 8bpp palette.

int? q

Quantisation quality.

double? dither

Amount of dithering.

int? bitdepth

Write as a 1, 2, 4, 8 or 16 bit image.

int? effort

Quantisation CPU effort.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Pngsave(filename, compression: int, interlace: bool, filter: Enums.ForeignPngFilter, palette: bool, q: int, dither: double, bitdepth: int, effort: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

PngsaveBuffer(int?, bool?, ForeignPngFilter?, bool?, int?, double?, int?, int?, ForeignKeep?, double[], int?, string)

Save image to buffer as PNG.

Declaration
public byte[] PngsaveBuffer(int? compression = null, bool? interlace = null, Enums.ForeignPngFilter? filter = null, bool? palette = null, int? q = null, double? dither = null, int? bitdepth = null, int? effort = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
int? compression

Compression factor.

bool? interlace

Interlace image.

Enums.ForeignPngFilter? filter

libspng row filter flag(s).

bool? palette

Quantise to 8bpp palette.

int? q

Quantisation quality.

double? dither

Amount of dithering.

int? bitdepth

Write as a 1, 2, 4, 8 or 16 bit image.

int? effort

Quantisation CPU effort.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Returns
Type Description
byte[]

An array of bytes.

Examples
byte[] buffer = in.PngsaveBuffer(compression: int, interlace: bool, filter: Enums.ForeignPngFilter, palette: bool, q: int, dither: double, bitdepth: int, effort: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

PngsaveStream(Stream, int?, bool?, ForeignPngFilter?, bool?, int?, double?, int?, int?, ForeignKeep?, double[], int?, string)

Save image to stream as PNG.

Declaration
public void PngsaveStream(Stream stream, int? compression = null, bool? interlace = null, Enums.ForeignPngFilter? filter = null, bool? palette = null, int? q = null, double? dither = null, int? bitdepth = null, int? effort = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Stream stream

Stream to save to.

int? compression

Compression factor.

bool? interlace

Interlace image.

Enums.ForeignPngFilter? filter

libspng row filter flag(s).

bool? palette

Quantise to 8bpp palette.

int? q

Quantisation quality.

double? dither

Amount of dithering.

int? bitdepth

Write as a 1, 2, 4, 8 or 16 bit image.

int? effort

Quantisation CPU effort.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.PngsaveStream(stream, compression: int, interlace: bool, filter: Enums.ForeignPngFilter, palette: bool, q: int, dither: double, bitdepth: int, effort: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

PngsaveTarget(Target, int?, bool?, ForeignPngFilter?, bool?, int?, double?, int?, int?, ForeignKeep?, double[], int?, string)

Save image to target as PNG.

Declaration
public void PngsaveTarget(Target target, int? compression = null, bool? interlace = null, Enums.ForeignPngFilter? filter = null, bool? palette = null, int? q = null, double? dither = null, int? bitdepth = null, int? effort = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Target target

Target to save to.

int? compression

Compression factor.

bool? interlace

Interlace image.

Enums.ForeignPngFilter? filter

libspng row filter flag(s).

bool? palette

Quantise to 8bpp palette.

int? q

Quantisation quality.

double? dither

Amount of dithering.

int? bitdepth

Write as a 1, 2, 4, 8 or 16 bit image.

int? effort

Quantisation CPU effort.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.PngsaveTarget(target, compression: int, interlace: bool, filter: Enums.ForeignPngFilter, palette: bool, q: int, dither: double, bitdepth: int, effort: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Polar()

Return an image converted to polar coordinates.

Declaration
public Image Polar()
Returns
Type Description
Image

A new Image.

Pow(Image)

Raise to power of an image.

Declaration
public Image Pow(Image exp)
Parameters
Type Name Description
Image exp

To the power of this.

Returns
Type Description
Image

A new Image.

Pow(double)

Raise to power of an constant.

Declaration
public Image Pow(double exp)
Parameters
Type Name Description
double exp

To the power of this.

Returns
Type Description
Image

A new Image.

Pow(double[])

Raise to power of an array.

Declaration
public Image Pow(double[] exp)
Parameters
Type Name Description
double[] exp

To the power of this.

Returns
Type Description
Image

A new Image.

Pow(int[])

Raise to power of an array.

Declaration
public Image Pow(int[] exp)
Parameters
Type Name Description
int[] exp

To the power of this.

Returns
Type Description
Image

A new Image.

Ppmload(string, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load ppm from file.

Declaration
public static Image Ppmload(string filename, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Ppmload(filename, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Ppmload(string, bool?, Access?, FailOn?, bool?)

Load ppm from file.

Declaration
public static Image Ppmload(string filename, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Ppmload(filename, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PpmloadSource(Source, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load ppm base class.

Declaration
public static Image PpmloadSource(Source source, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PpmloadSource(source, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PpmloadSource(Source, bool?, Access?, FailOn?, bool?)

Load ppm base class.

Declaration
public static Image PpmloadSource(Source source, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PpmloadSource(source, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PpmloadStream(Stream, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load ppm base class.

Declaration
public static Image PpmloadStream(Stream stream, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PpmloadStream(stream, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

PpmloadStream(Stream, bool?, Access?, FailOn?, bool?)

Load ppm base class.

Declaration
public static Image PpmloadStream(Stream stream, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.PpmloadStream(stream, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Ppmsave(string, ForeignPpmFormat?, bool?, int?, ForeignKeep?, double[], int?, string)

Save image to ppm file.

Declaration
public void Ppmsave(string filename, Enums.ForeignPpmFormat? format = null, bool? ascii = null, int? bitdepth = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

Enums.ForeignPpmFormat? format

Format to save in.

bool? ascii

Save as ascii.

int? bitdepth

Set to 1 to write as a 1 bit image.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Ppmsave(filename, format: Enums.ForeignPpmFormat, ascii: bool, bitdepth: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

PpmsaveStream(Stream, ForeignPpmFormat?, bool?, int?, ForeignKeep?, double[], int?, string)

Save to ppm.

Declaration
public void PpmsaveStream(Stream stream, Enums.ForeignPpmFormat? format = null, bool? ascii = null, int? bitdepth = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Stream stream

Stream to save to.

Enums.ForeignPpmFormat? format

Format to save in.

bool? ascii

Save as ascii.

int? bitdepth

Set to 1 to write as a 1 bit image.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.PpmsaveStream(stream, format: Enums.ForeignPpmFormat, ascii: bool, bitdepth: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

PpmsaveTarget(Target, ForeignPpmFormat?, bool?, int?, ForeignKeep?, double[], int?, string)

Save to ppm.

Declaration
public void PpmsaveTarget(Target target, Enums.ForeignPpmFormat? format = null, bool? ascii = null, int? bitdepth = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Target target

Target to save to.

Enums.ForeignPpmFormat? format

Format to save in.

bool? ascii

Save as ascii.

int? bitdepth

Set to 1 to write as a 1 bit image.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.PpmsaveTarget(target, format: Enums.ForeignPpmFormat, ascii: bool, bitdepth: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Premultiply(double?)

Premultiply image alpha.

Declaration
public Image Premultiply(double? maxAlpha = null)
Parameters
Type Name Description
double? maxAlpha

Maximum value of alpha channel.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Premultiply(maxAlpha: double);

Prewitt()

Prewitt edge detector.

Declaration
public Image Prewitt()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Prewitt();

Profile()

Find image profiles.

Declaration
public object[] Profile()
Returns
Type Description
object[]

An array of objects.

Examples
var output = in.Profile();

ProfileLoad(string)

Load named ICC profile.

Declaration
public static byte[] ProfileLoad(string name)
Parameters
Type Name Description
string name

Profile name.

Returns
Type Description
byte[]

An array of bytes.

Examples
byte[] profile = NetVips.Image.ProfileLoad(name);

Project()

Find image projections.

Declaration
public object[] Project()
Returns
Type Description
object[]

An array of objects.

Examples
var output = in.Project();

Quadratic(Image, GObject)

Resample an image with a quadratic transform.

Declaration
public Image Quadratic(Image coeff, GObject interpolate = null)
Parameters
Type Name Description
Image coeff

Coefficient matrix.

GObject interpolate

Interpolate values with this.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Quadratic(coeff, interpolate: GObject);

Rad2float()

Unpack Radiance coding to float RGB.

Declaration
public Image Rad2float()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Rad2float();

Radload(string, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load a Radiance image from a file.

Declaration
public static Image Radload(string filename, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Radload(filename, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Radload(string, bool?, Access?, FailOn?, bool?)

Load a Radiance image from a file.

Declaration
public static Image Radload(string filename, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Radload(filename, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

RadloadBuffer(byte[], out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load rad from buffer.

Declaration
public static Image RadloadBuffer(byte[] buffer, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.RadloadBuffer(buffer, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

RadloadBuffer(byte[], bool?, Access?, FailOn?, bool?)

Load rad from buffer.

Declaration
public static Image RadloadBuffer(byte[] buffer, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.RadloadBuffer(buffer, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

RadloadSource(Source, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load rad from source.

Declaration
public static Image RadloadSource(Source source, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.RadloadSource(source, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

RadloadSource(Source, bool?, Access?, FailOn?, bool?)

Load rad from source.

Declaration
public static Image RadloadSource(Source source, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.RadloadSource(source, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

RadloadStream(Stream, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load rad from stream.

Declaration
public static Image RadloadStream(Stream stream, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.RadloadStream(stream, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

RadloadStream(Stream, bool?, Access?, FailOn?, bool?)

Load rad from stream.

Declaration
public static Image RadloadStream(Stream stream, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.RadloadStream(stream, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Radsave(string, ForeignKeep?, double[], int?, string)

Save image to Radiance file.

Declaration
public void Radsave(string filename, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Radsave(filename, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

RadsaveBuffer(ForeignKeep?, double[], int?, string)

Save image to Radiance buffer.

Declaration
public byte[] RadsaveBuffer(Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Returns
Type Description
byte[]

An array of bytes.

Examples
byte[] buffer = in.RadsaveBuffer(keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

RadsaveStream(Stream, ForeignKeep?, double[], int?, string)

Save image to Radiance stream.

Declaration
public void RadsaveStream(Stream stream, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Stream stream

Stream to save to.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.RadsaveStream(stream, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

RadsaveTarget(Target, ForeignKeep?, double[], int?, string)

Save image to Radiance target.

Declaration
public void RadsaveTarget(Target target, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Target target

Target to save to.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.RadsaveTarget(target, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Rank(int, int, int)

Rank filter.

Declaration
public Image Rank(int width, int height, int index)
Parameters
Type Name Description
int width

Window width in pixels.

int height

Window height in pixels.

int index

Select pixel at index.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Rank(width, height, index);

Rawload(string, int, int, int, out ForeignFlags, ulong?, BandFormat?, Interpretation?, bool?, Access?, FailOn?, bool?)

Load raw data from a file.

Declaration
public static Image Rawload(string filename, int width, int height, int bands, out Enums.ForeignFlags flags, ulong? offset = null, Enums.BandFormat? format = null, Enums.Interpretation? interpretation = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

int width

Image width in pixels.

int height

Image height in pixels.

int bands

Number of bands in image.

Enums.ForeignFlags flags

Flags for this file.

ulong? offset

Offset in bytes from start of file.

Enums.BandFormat? format

Pixel format in image.

Enums.Interpretation? interpretation

Pixel interpretation.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Rawload(filename, width, height, bands, out var flags, offset: ulong, format: Enums.BandFormat, interpretation: Enums.Interpretation, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Rawload(string, int, int, int, ulong?, BandFormat?, Interpretation?, bool?, Access?, FailOn?, bool?)

Load raw data from a file.

Declaration
public static Image Rawload(string filename, int width, int height, int bands, ulong? offset = null, Enums.BandFormat? format = null, Enums.Interpretation? interpretation = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

int width

Image width in pixels.

int height

Image height in pixels.

int bands

Number of bands in image.

ulong? offset

Offset in bytes from start of file.

Enums.BandFormat? format

Pixel format in image.

Enums.Interpretation? interpretation

Pixel interpretation.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Rawload(filename, width, height, bands, offset: ulong, format: Enums.BandFormat, interpretation: Enums.Interpretation, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Rawsave(string, ForeignKeep?, double[], int?, string)

Save image to raw file.

Declaration
public void Rawsave(string filename, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Rawsave(filename, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

RawsaveBuffer(ForeignKeep?, double[], int?, string)

Write raw image to buffer.

Declaration
public byte[] RawsaveBuffer(Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Returns
Type Description
byte[]

An array of bytes.

Examples
byte[] buffer = in.RawsaveBuffer(keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

RawsaveStream(Stream, ForeignKeep?, double[], int?, string)

Write raw image to stream.

Declaration
public void RawsaveStream(Stream stream, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Stream stream

Stream to save to.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.RawsaveStream(stream, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

RawsaveTarget(Target, ForeignKeep?, double[], int?, string)

Write raw image to target.

Declaration
public void RawsaveTarget(Target target, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Target target

Target to save to.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.RawsaveTarget(target, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Real()

Return the real part of a complex image.

Declaration
public Image Real()
Returns
Type Description
Image

A new Image.

Recomb(Image)

Linear recombination with matrix.

Declaration
public Image Recomb(Image m)
Parameters
Type Name Description
Image m

Matrix of coefficients.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Recomb(m);

Rect()

Return an image converted to rectangular coordinates.

Declaration
public Image Rect()
Returns
Type Description
Image

A new Image.

Reduce(double, double, Kernel?, double?)

Reduce an image.

Declaration
public Image Reduce(double hshrink, double vshrink, Enums.Kernel? kernel = null, double? gap = null)
Parameters
Type Name Description
double hshrink

Horizontal shrink factor.

double vshrink

Vertical shrink factor.

Enums.Kernel? kernel

Resampling kernel.

double? gap

Reducing gap.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Reduce(hshrink, vshrink, kernel: Enums.Kernel, gap: double);

Reduceh(double, Kernel?, double?)

Shrink an image horizontally.

Declaration
public Image Reduceh(double hshrink, Enums.Kernel? kernel = null, double? gap = null)
Parameters
Type Name Description
double hshrink

Horizontal shrink factor.

Enums.Kernel? kernel

Resampling kernel.

double? gap

Reducing gap.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Reduceh(hshrink, kernel: Enums.Kernel, gap: double);

Reducev(double, Kernel?, double?)

Shrink an image vertically.

Declaration
public Image Reducev(double vshrink, Enums.Kernel? kernel = null, double? gap = null)
Parameters
Type Name Description
double vshrink

Vertical shrink factor.

Enums.Kernel? kernel

Resampling kernel.

double? gap

Reducing gap.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Reducev(vshrink, kernel: Enums.Kernel, gap: double);

Relational(Image, OperationRelational)

Relational operation on two images.

Declaration
public Image Relational(Image right, Enums.OperationRelational relational)
Parameters
Type Name Description
Image right

Right-hand image argument.

Enums.OperationRelational relational

Relational to perform.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = left.Relational(right, relational);

RelationalConst(OperationRelational, double[])

Relational operations against a constant.

Declaration
public Image RelationalConst(Enums.OperationRelational relational, double[] c)
Parameters
Type Name Description
Enums.OperationRelational relational

Relational to perform.

double[] c

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.RelationalConst(relational, c);

Remainder(Image)

Remainder after integer division of two images.

Declaration
public Image Remainder(Image right)
Parameters
Type Name Description
Image right

Right-hand image argument.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = left.Remainder(right);

RemainderConst(double[])

Remainder after integer division of an image and a constant.

Declaration
public Image RemainderConst(double[] c)
Parameters
Type Name Description
double[] c

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.RemainderConst(c);

Replicate(int, int)

Replicate an image.

Declaration
public Image Replicate(int across, int down)
Parameters
Type Name Description
int across

Repeat this many times horizontally.

int down

Repeat this many times vertically.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Replicate(across, down);

Resize(double, Kernel?, double?, double?)

Resize an image.

Declaration
public Image Resize(double scale, Enums.Kernel? kernel = null, double? gap = null, double? vscale = null)
Parameters
Type Name Description
double scale

Scale image by this factor.

Enums.Kernel? kernel

Resampling kernel.

double? gap

Reducing gap.

double? vscale

Vertical scale image by this factor.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Resize(scale, kernel: Enums.Kernel, gap: double, vscale: double);

Rint()

Return the nearest integral value.

Declaration
public Image Rint()
Returns
Type Description
Image

A new Image.

Rot(Angle)

Rotate an image.

Declaration
public Image Rot(Enums.Angle angle)
Parameters
Type Name Description
Enums.Angle angle

Angle to rotate image.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Rot(angle);

Rot180()

Rotate 180 degrees.

Declaration
public Image Rot180()
Returns
Type Description
Image

A new Image.

Rot270()

Rotate 270 degrees clockwise.

Declaration
public Image Rot270()
Returns
Type Description
Image

A new Image.

Rot45(Angle45?)

Rotate an image.

Declaration
public Image Rot45(Enums.Angle45? angle = null)
Parameters
Type Name Description
Enums.Angle45? angle

Angle to rotate image.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Rot45(angle: Enums.Angle45);

Rot90()

Rotate 90 degrees clockwise.

Declaration
public Image Rot90()
Returns
Type Description
Image

A new Image.

Rotate(double, GObject, double[], double?, double?, double?, double?)

Rotate an image by a number of degrees.

Declaration
public Image Rotate(double angle, GObject interpolate = null, double[] background = null, double? odx = null, double? ody = null, double? idx = null, double? idy = null)
Parameters
Type Name Description
double angle

Rotate clockwise by this many degrees.

GObject interpolate

Interpolate pixels with this.

double[] background

Background value.

double? odx

Horizontal output displacement.

double? ody

Vertical output displacement.

double? idx

Horizontal input displacement.

double? idy

Vertical input displacement.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Rotate(angle, interpolate: GObject, background: double[], odx: double, ody: double, idx: double, idy: double);

Round(OperationRound)

Perform a round function on an image.

Declaration
public Image Round(Enums.OperationRound round)
Parameters
Type Name Description
Enums.OperationRound round

Rounding operation to perform.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Round(round);

SRGB2HSV()

Transform sRGB to HSV.

Declaration
public Image SRGB2HSV()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.SRGB2HSV();

SRGB2scRGB()

Convert an sRGB image to scRGB.

Declaration
public Image SRGB2scRGB()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.SRGB2scRGB();

ScRGB2BW(int?)

Convert scRGB to BW.

Declaration
public Image ScRGB2BW(int? depth = null)
Parameters
Type Name Description
int? depth

Output device space depth in bits.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.ScRGB2BW(depth: int);

ScRGB2XYZ()

Transform scRGB to XYZ.

Declaration
public Image ScRGB2XYZ()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.ScRGB2XYZ();

ScRGB2sRGB(int?)

Convert an scRGB image to sRGB.

Declaration
public Image ScRGB2sRGB(int? depth = null)
Parameters
Type Name Description
int? depth

Output device space depth in bits.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.ScRGB2sRGB(depth: int);

ScaleImage(double?, bool?)

Scale an image to 0 - 255.

Declaration
public Image ScaleImage(double? exp = null, bool? log = null)
Parameters
Type Name Description
double? exp

Exponent for log scale.

bool? log

Log scale.

Returns
Type Description
Image

A new Image.

Remarks

This is the libvips scale operation, renamed to avoid a clash with the scale for convolution masks.

Examples
using Image @out = in.Scale(exp: double, log: bool);

Scharr()

Scharr edge detector.

Declaration
public Image Scharr()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Scharr();

Sdf(int, int, SdfShape, double?, double[], double[], double[])

Create an SDF image.

Declaration
public static Image Sdf(int width, int height, Enums.SdfShape shape, double? r = null, double[] a = null, double[] b = null, double[] corners = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

Enums.SdfShape shape

SDF shape to create.

double? r

Radius.

double[] a

Point a.

double[] b

Point b.

double[] corners

Corner radii.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Sdf(width, height, shape, r: double, a: double[], b: double[], corners: double[]);

Sequential(int?)

Check sequential access.

Declaration
public Image Sequential(int? tileHeight = null)
Parameters
Type Name Description
int? tileHeight

Tile height in pixels.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Sequential(tileHeight: int);

SetKill(bool)

Set the kill flag on an image. Handy for stopping sets of threads.

Declaration
public void SetKill(bool kill)
Parameters
Type Name Description
bool kill

The kill state.

Remarks

At least libvips 8.8 is needed.

SetProgress(bool)

Enable progress reporting on an image.

Declaration
public void SetProgress(bool progress)
Parameters
Type Name Description
bool progress

true to enable progress reporting; otherwise, false.

Remarks

When progress reporting is enabled, evaluation of the most downstream image from this image will report progress using the PreEval, Eval and PostEval signals.

SetProgress(IProgress<int>, CancellationToken)

Attach progress feedback, if required.

Declaration
public void SetProgress(IProgress<int> progress, CancellationToken token = default)
Parameters
Type Name Description
IProgress<int> progress

A provider for progress updates.

CancellationToken token

Cancellation token to block evaluation on this image.

Remarks

You can use this function to update user-interfaces with progress feedback, for example:

using var image = Image.NewFromFile("huge.jpg", access: Enums.Access.Sequential);

var progress = new Progress<int>(percent =>
{
    Console.Write($"\r{percent}% complete");
});
image.SetProgress(progress);

image.Dzsave("image-pyramid");

If a cancellation has been requested for this token (see token) it will block the evaluation of this image on libvips >= 8.8 (see SetKill(bool)). If this version requirement is not met, it will only stop updating the progress.

Sharpen(double?, double?, double?, double?, double?, double?)

Unsharp masking for print.

Declaration
public Image Sharpen(double? sigma = null, double? x1 = null, double? y2 = null, double? y3 = null, double? m1 = null, double? m2 = null)
Parameters
Type Name Description
double? sigma

Sigma of Gaussian.

double? x1

Flat/jaggy threshold.

double? y2

Maximum brightening.

double? y3

Maximum darkening.

double? m1

Slope for flat areas.

double? m2

Slope for jaggy areas.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Sharpen(sigma: double, x1: double, y2: double, y3: double, m1: double, m2: double);

Shrink(double, double, bool?)

Shrink an image.

Declaration
public Image Shrink(double hshrink, double vshrink, bool? ceil = null)
Parameters
Type Name Description
double hshrink

Horizontal shrink factor.

double vshrink

Vertical shrink factor.

bool? ceil

Round-up output dimensions.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Shrink(hshrink, vshrink, ceil: bool);

Shrinkh(int, bool?)

Shrink an image horizontally.

Declaration
public Image Shrinkh(int hshrink, bool? ceil = null)
Parameters
Type Name Description
int hshrink

Horizontal shrink factor.

bool? ceil

Round-up output dimensions.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Shrinkh(hshrink, ceil: bool);

Shrinkv(int, bool?)

Shrink an image vertically.

Declaration
public Image Shrinkv(int vshrink, bool? ceil = null)
Parameters
Type Name Description
int vshrink

Vertical shrink factor.

bool? ceil

Round-up output dimensions.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Shrinkv(vshrink, ceil: bool);

Sign()

Unit vector of pixel.

Declaration
public Image Sign()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Sign();

SignalConnect(Signals, EvalDelegate, nint)

Connects a callback function (callback) to a signal on this image.

Declaration
public ulong SignalConnect(Enums.Signals signal, Image.EvalDelegate callback, nint data = 0)
Parameters
Type Name Description
Enums.Signals signal

A signal to be used on this image. See Enums.Signals.

Image.EvalDelegate callback

The callback to connect.

nint data

Data to pass to handler calls.

Returns
Type Description
ulong

The handler id.

Remarks

The callback will be triggered every time this signal is issued on this image.

Exceptions
Type Condition
ArgumentException

If it failed to connect the signal.

Similarity(double?, double?, GObject, double[], double?, double?, double?, double?)

Similarity transform of an image.

Declaration
public Image Similarity(double? scale = null, double? angle = null, GObject interpolate = null, double[] background = null, double? odx = null, double? ody = null, double? idx = null, double? idy = null)
Parameters
Type Name Description
double? scale

Scale by this factor.

double? angle

Rotate clockwise by this many degrees.

GObject interpolate

Interpolate pixels with this.

double[] background

Background value.

double? odx

Horizontal output displacement.

double? ody

Vertical output displacement.

double? idx

Horizontal input displacement.

double? idy

Vertical input displacement.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Similarity(scale: double, angle: double, interpolate: GObject, background: double[], odx: double, ody: double, idx: double, idy: double);

Sin()

Return the sine of an image in degrees.

Declaration
public Image Sin()
Returns
Type Description
Image

A new Image.

Sines(int, int, bool?, double?, double?)

Make a 2D sine wave.

Declaration
public static Image Sines(int width, int height, bool? uchar = null, double? hfreq = null, double? vfreq = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

bool? uchar

Output an unsigned char image.

double? hfreq

Horizontal spatial frequency.

double? vfreq

Vertical spatial frequency.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Sines(width, height, uchar: bool, hfreq: double, vfreq: double);

Sinh()

Return the hyperbolic sine of an image in radians.

Declaration
public Image Sinh()
Returns
Type Description
Image

A new Image.

Smartcrop(int, int, out int, out int, Interesting?, bool?)

Extract an area from an image.

Declaration
public Image Smartcrop(int width, int height, out int attentionX, out int attentionY, Enums.Interesting? interesting = null, bool? premultiplied = null)
Parameters
Type Name Description
int width

Width of extract area.

int height

Height of extract area.

int attentionX

Horizontal position of attention centre.

int attentionY

Vertical position of attention centre.

Enums.Interesting? interesting

How to measure interestingness.

bool? premultiplied

Input image already has premultiplied alpha.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = input.Smartcrop(width, height, out var attentionX, out var attentionY, interesting: Enums.Interesting, premultiplied: bool);

Smartcrop(int, int, out int, Interesting?, bool?)

Extract an area from an image.

Declaration
public Image Smartcrop(int width, int height, out int attentionX, Enums.Interesting? interesting = null, bool? premultiplied = null)
Parameters
Type Name Description
int width

Width of extract area.

int height

Height of extract area.

int attentionX

Horizontal position of attention centre.

Enums.Interesting? interesting

How to measure interestingness.

bool? premultiplied

Input image already has premultiplied alpha.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = input.Smartcrop(width, height, out var attentionX, interesting: Enums.Interesting, premultiplied: bool);

Smartcrop(int, int, Interesting?, bool?)

Extract an area from an image.

Declaration
public Image Smartcrop(int width, int height, Enums.Interesting? interesting = null, bool? premultiplied = null)
Parameters
Type Name Description
int width

Width of extract area.

int height

Height of extract area.

Enums.Interesting? interesting

How to measure interestingness.

bool? premultiplied

Input image already has premultiplied alpha.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = input.Smartcrop(width, height, interesting: Enums.Interesting, premultiplied: bool);

Sobel()

Sobel edge detector.

Declaration
public Image Sobel()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Sobel();

Spcor(Image)

Spatial correlation.

Declaration
public Image Spcor(Image @ref)
Parameters
Type Name Description
Image ref

Input reference image.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Spcor(@ref);

Spectrum()

Make displayable power spectrum.

Declaration
public Image Spectrum()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Spectrum();

Stats()

Find many image stats.

Declaration
public Image Stats()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Stats();

Stdif(int, int, double?, double?, double?, double?)

Statistical difference.

Declaration
public Image Stdif(int width, int height, double? s0 = null, double? b = null, double? m0 = null, double? a = null)
Parameters
Type Name Description
int width

Window width in pixels.

int height

Window height in pixels.

double? s0

New deviation.

double? b

Weight of new deviation.

double? m0

New mean.

double? a

Weight of new mean.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Stdif(width, height, s0: double, b: double, m0: double, a: double);

Subsample(int, int, bool?)

Subsample an image.

Declaration
public Image Subsample(int xfac, int yfac, bool? point = null)
Parameters
Type Name Description
int xfac

Horizontal subsample factor.

int yfac

Vertical subsample factor.

bool? point

Point sample.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = input.Subsample(xfac, yfac, point: bool);

Subtract(Image)

Subtract two images.

Declaration
public Image Subtract(Image right)
Parameters
Type Name Description
Image right

Right-hand image argument.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = left.Subtract(right);

Sum(params Image[])

Sum an array of images.

Declaration
public static Image Sum(params Image[] @in)
Parameters
Type Name Description
Image[] in

Array of input images.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Sum(@in);

Svgload(string, out ForeignFlags, double?, double?, bool?, bool?, Access?, FailOn?, bool?)

Load SVG with rsvg.

Declaration
public static Image Svgload(string filename, out Enums.ForeignFlags flags, double? dpi = null, double? scale = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

double? dpi

Render at this DPI.

double? scale

Scale output by this factor.

bool? unlimited

Allow SVG of any size.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Svgload(filename, out var flags, dpi: double, scale: double, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Svgload(string, double?, double?, bool?, bool?, Access?, FailOn?, bool?)

Load SVG with rsvg.

Declaration
public static Image Svgload(string filename, double? dpi = null, double? scale = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

double? dpi

Render at this DPI.

double? scale

Scale output by this factor.

bool? unlimited

Allow SVG of any size.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Svgload(filename, dpi: double, scale: double, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

SvgloadBuffer(byte[], out ForeignFlags, double?, double?, bool?, bool?, Access?, FailOn?, bool?)

Load SVG with rsvg.

Declaration
public static Image SvgloadBuffer(byte[] buffer, out Enums.ForeignFlags flags, double? dpi = null, double? scale = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

Enums.ForeignFlags flags

Flags for this file.

double? dpi

Render at this DPI.

double? scale

Scale output by this factor.

bool? unlimited

Allow SVG of any size.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.SvgloadBuffer(buffer, out var flags, dpi: double, scale: double, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

SvgloadBuffer(byte[], double?, double?, bool?, bool?, Access?, FailOn?, bool?)

Load SVG with rsvg.

Declaration
public static Image SvgloadBuffer(byte[] buffer, double? dpi = null, double? scale = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

double? dpi

Render at this DPI.

double? scale

Scale output by this factor.

bool? unlimited

Allow SVG of any size.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.SvgloadBuffer(buffer, dpi: double, scale: double, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

SvgloadSource(Source, out ForeignFlags, double?, double?, bool?, bool?, Access?, FailOn?, bool?)

Load svg from source.

Declaration
public static Image SvgloadSource(Source source, out Enums.ForeignFlags flags, double? dpi = null, double? scale = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

double? dpi

Render at this DPI.

double? scale

Scale output by this factor.

bool? unlimited

Allow SVG of any size.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.SvgloadSource(source, out var flags, dpi: double, scale: double, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

SvgloadSource(Source, double?, double?, bool?, bool?, Access?, FailOn?, bool?)

Load svg from source.

Declaration
public static Image SvgloadSource(Source source, double? dpi = null, double? scale = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

double? dpi

Render at this DPI.

double? scale

Scale output by this factor.

bool? unlimited

Allow SVG of any size.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.SvgloadSource(source, dpi: double, scale: double, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

SvgloadStream(Stream, out ForeignFlags, double?, double?, bool?, bool?, Access?, FailOn?, bool?)

Load svg from stream.

Declaration
public static Image SvgloadStream(Stream stream, out Enums.ForeignFlags flags, double? dpi = null, double? scale = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

double? dpi

Render at this DPI.

double? scale

Scale output by this factor.

bool? unlimited

Allow SVG of any size.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.SvgloadStream(stream, out var flags, dpi: double, scale: double, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

SvgloadStream(Stream, double?, double?, bool?, bool?, Access?, FailOn?, bool?)

Load svg from stream.

Declaration
public static Image SvgloadStream(Stream stream, double? dpi = null, double? scale = null, bool? unlimited = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

double? dpi

Render at this DPI.

double? scale

Scale output by this factor.

bool? unlimited

Allow SVG of any size.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.SvgloadStream(stream, dpi: double, scale: double, unlimited: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Switch(params Image[])

Find the index of the first non-zero pixel in tests.

Declaration
public static Image Switch(params Image[] tests)
Parameters
Type Name Description
Image[] tests

Table of images to test.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Switch(tests);

System(string, out Image, Image[], string, string)

Run an external command.

Declaration
public static void System(string cmdFormat, out Image @out, Image[] @in = null, string outFormat = null, string inFormat = null)
Parameters
Type Name Description
string cmdFormat

Command to run.

Image out

Output image.

Image[] in

Array of input images.

string outFormat

Format for output filename.

string inFormat

Format for input filename.

Examples
NetVips.Image.System(cmdFormat, out var @out, @in: Image[], outFormat: string, inFormat: string);

System(string, out Image, out string, Image[], string, string)

Run an external command.

Declaration
public static void System(string cmdFormat, out Image @out, out string log, Image[] @in = null, string outFormat = null, string inFormat = null)
Parameters
Type Name Description
string cmdFormat

Command to run.

Image out

Output image.

string log

Command log.

Image[] in

Array of input images.

string outFormat

Format for output filename.

string inFormat

Format for input filename.

Examples
NetVips.Image.System(cmdFormat, out var @out, out var log, @in: Image[], outFormat: string, inFormat: string);

System(string, Image[], string, string)

Run an external command.

Declaration
public static void System(string cmdFormat, Image[] @in = null, string outFormat = null, string inFormat = null)
Parameters
Type Name Description
string cmdFormat

Command to run.

Image[] in

Array of input images.

string outFormat

Format for output filename.

string inFormat

Format for input filename.

Examples
NetVips.Image.System(cmdFormat, @in: Image[], outFormat: string, inFormat: string);

Tan()

Return the tangent of an image in degrees.

Declaration
public Image Tan()
Returns
Type Description
Image

A new Image.

Tanh()

Return the hyperbolic tangent of an image in radians.

Declaration
public Image Tanh()
Returns
Type Description
Image

A new Image.

Text(string, out int, string, int?, int?, Align?, bool?, int?, int?, string, bool?, TextWrap?)

Make a text image.

Declaration
public static Image Text(string text, out int autofitDpi, string font = null, int? width = null, int? height = null, Enums.Align? align = null, bool? justify = null, int? dpi = null, int? spacing = null, string fontfile = null, bool? rgba = null, Enums.TextWrap? wrap = null)
Parameters
Type Name Description
string text

Text to render.

int autofitDpi

DPI selected by autofit.

string font

Font to render with.

int? width

Maximum image width in pixels.

int? height

Maximum image height in pixels.

Enums.Align? align

Align on the low, centre or high edge.

bool? justify

Justify lines.

int? dpi

DPI to render at.

int? spacing

Line spacing.

string fontfile

Load this font file.

bool? rgba

Enable RGBA output.

Enums.TextWrap? wrap

Wrap lines on word or character boundaries.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Text(text, out var autofitDpi, font: string, width: int, height: int, align: Enums.Align, justify: bool, dpi: int, spacing: int, fontfile: string, rgba: bool, wrap: Enums.TextWrap);

Text(string, string, int?, int?, Align?, bool?, int?, int?, string, bool?, TextWrap?)

Make a text image.

Declaration
public static Image Text(string text, string font = null, int? width = null, int? height = null, Enums.Align? align = null, bool? justify = null, int? dpi = null, int? spacing = null, string fontfile = null, bool? rgba = null, Enums.TextWrap? wrap = null)
Parameters
Type Name Description
string text

Text to render.

string font

Font to render with.

int? width

Maximum image width in pixels.

int? height

Maximum image height in pixels.

Enums.Align? align

Align on the low, centre or high edge.

bool? justify

Justify lines.

int? dpi

DPI to render at.

int? spacing

Line spacing.

string fontfile

Load this font file.

bool? rgba

Enable RGBA output.

Enums.TextWrap? wrap

Wrap lines on word or character boundaries.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Text(text, font: string, width: int, height: int, align: Enums.Align, justify: bool, dpi: int, spacing: int, fontfile: string, rgba: bool, wrap: Enums.TextWrap);

Thumbnail(string, int, int?, Size?, bool?, Interesting?, bool?, string, string, Intent?, FailOn?)

Generate thumbnail from file.

Declaration
public static Image Thumbnail(string filename, int width, int? height = null, Enums.Size? size = null, bool? noRotate = null, Enums.Interesting? crop = null, bool? linear = null, string importProfile = null, string exportProfile = null, Enums.Intent? intent = null, Enums.FailOn? failOn = null)
Parameters
Type Name Description
string filename

Filename to read from.

int width

Size to this width.

int? height

Size to this height.

Enums.Size? size

Only upsize, only downsize, or both.

bool? noRotate

Don't use orientation tags to rotate image upright.

Enums.Interesting? crop

Reduce to fill target rectangle, then crop.

bool? linear

Reduce in linear light.

string importProfile

Fallback import profile.

string exportProfile

Fallback export profile.

Enums.Intent? intent

Rendering intent.

Enums.FailOn? failOn

Error level to fail on.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Thumbnail(filename, width, height: int, size: Enums.Size, noRotate: bool, crop: Enums.Interesting, linear: bool, importProfile: string, exportProfile: string, intent: Enums.Intent, failOn: Enums.FailOn);

ThumbnailBuffer(byte[], int, string, int?, Size?, bool?, Interesting?, bool?, string, string, Intent?, FailOn?)

Generate thumbnail from buffer.

Declaration
public static Image ThumbnailBuffer(byte[] buffer, int width, string optionString = null, int? height = null, Enums.Size? size = null, bool? noRotate = null, Enums.Interesting? crop = null, bool? linear = null, string importProfile = null, string exportProfile = null, Enums.Intent? intent = null, Enums.FailOn? failOn = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

int width

Size to this width.

string optionString

Options that are passed on to the underlying loader.

int? height

Size to this height.

Enums.Size? size

Only upsize, only downsize, or both.

bool? noRotate

Don't use orientation tags to rotate image upright.

Enums.Interesting? crop

Reduce to fill target rectangle, then crop.

bool? linear

Reduce in linear light.

string importProfile

Fallback import profile.

string exportProfile

Fallback export profile.

Enums.Intent? intent

Rendering intent.

Enums.FailOn? failOn

Error level to fail on.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.ThumbnailBuffer(buffer, width, optionString: string, height: int, size: Enums.Size, noRotate: bool, crop: Enums.Interesting, linear: bool, importProfile: string, exportProfile: string, intent: Enums.Intent, failOn: Enums.FailOn);

ThumbnailImage(int, int?, Size?, bool?, Interesting?, bool?, string, string, Intent?, FailOn?)

Generate thumbnail from image.

Declaration
public Image ThumbnailImage(int width, int? height = null, Enums.Size? size = null, bool? noRotate = null, Enums.Interesting? crop = null, bool? linear = null, string importProfile = null, string exportProfile = null, Enums.Intent? intent = null, Enums.FailOn? failOn = null)
Parameters
Type Name Description
int width

Size to this width.

int? height

Size to this height.

Enums.Size? size

Only upsize, only downsize, or both.

bool? noRotate

Don't use orientation tags to rotate image upright.

Enums.Interesting? crop

Reduce to fill target rectangle, then crop.

bool? linear

Reduce in linear light.

string importProfile

Fallback import profile.

string exportProfile

Fallback export profile.

Enums.Intent? intent

Rendering intent.

Enums.FailOn? failOn

Error level to fail on.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.ThumbnailImage(width, height: int, size: Enums.Size, noRotate: bool, crop: Enums.Interesting, linear: bool, importProfile: string, exportProfile: string, intent: Enums.Intent, failOn: Enums.FailOn);

ThumbnailSource(Source, int, string, int?, Size?, bool?, Interesting?, bool?, string, string, Intent?, FailOn?)

Generate thumbnail from source.

Declaration
public static Image ThumbnailSource(Source source, int width, string optionString = null, int? height = null, Enums.Size? size = null, bool? noRotate = null, Enums.Interesting? crop = null, bool? linear = null, string importProfile = null, string exportProfile = null, Enums.Intent? intent = null, Enums.FailOn? failOn = null)
Parameters
Type Name Description
Source source

Source to load from.

int width

Size to this width.

string optionString

Options that are passed on to the underlying loader.

int? height

Size to this height.

Enums.Size? size

Only upsize, only downsize, or both.

bool? noRotate

Don't use orientation tags to rotate image upright.

Enums.Interesting? crop

Reduce to fill target rectangle, then crop.

bool? linear

Reduce in linear light.

string importProfile

Fallback import profile.

string exportProfile

Fallback export profile.

Enums.Intent? intent

Rendering intent.

Enums.FailOn? failOn

Error level to fail on.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.ThumbnailSource(source, width, optionString: string, height: int, size: Enums.Size, noRotate: bool, crop: Enums.Interesting, linear: bool, importProfile: string, exportProfile: string, intent: Enums.Intent, failOn: Enums.FailOn);

ThumbnailStream(Stream, int, string, int?, Size?, bool?, Interesting?, bool?, string, string, Intent?, FailOn?)

Generate thumbnail from stream.

Declaration
public static Image ThumbnailStream(Stream stream, int width, string optionString = null, int? height = null, Enums.Size? size = null, bool? noRotate = null, Enums.Interesting? crop = null, bool? linear = null, string importProfile = null, string exportProfile = null, Enums.Intent? intent = null, Enums.FailOn? failOn = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

int width

Size to this width.

string optionString

Options that are passed on to the underlying loader.

int? height

Size to this height.

Enums.Size? size

Only upsize, only downsize, or both.

bool? noRotate

Don't use orientation tags to rotate image upright.

Enums.Interesting? crop

Reduce to fill target rectangle, then crop.

bool? linear

Reduce in linear light.

string importProfile

Fallback import profile.

string exportProfile

Fallback export profile.

Enums.Intent? intent

Rendering intent.

Enums.FailOn? failOn

Error level to fail on.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.ThumbnailStream(stream, width, optionString: string, height: int, size: Enums.Size, noRotate: bool, crop: Enums.Interesting, linear: bool, importProfile: string, exportProfile: string, intent: Enums.Intent, failOn: Enums.FailOn);

Tiffload(string, out ForeignFlags, int?, int?, int?, bool?, bool?, Access?, FailOn?, bool?)

Load tiff from file.

Declaration
public static Image Tiffload(string filename, out Enums.ForeignFlags flags, int? page = null, int? subifd = null, int? n = null, bool? autorotate = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? subifd

Subifd index.

int? n

Number of pages to load, -1 for all.

bool? autorotate

Rotate image using orientation tag.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Tiffload(filename, out var flags, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Tiffload(string, int?, int?, int?, bool?, bool?, Access?, FailOn?, bool?)

Load tiff from file.

Declaration
public static Image Tiffload(string filename, int? page = null, int? subifd = null, int? n = null, bool? autorotate = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

int? page

First page to load.

int? subifd

Subifd index.

int? n

Number of pages to load, -1 for all.

bool? autorotate

Rotate image using orientation tag.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Tiffload(filename, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

TiffloadBuffer(byte[], out ForeignFlags, int?, int?, int?, bool?, bool?, Access?, FailOn?, bool?)

Load tiff from buffer.

Declaration
public static Image TiffloadBuffer(byte[] buffer, out Enums.ForeignFlags flags, int? page = null, int? subifd = null, int? n = null, bool? autorotate = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? subifd

Subifd index.

int? n

Number of pages to load, -1 for all.

bool? autorotate

Rotate image using orientation tag.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.TiffloadBuffer(buffer, out var flags, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

TiffloadBuffer(byte[], int?, int?, int?, bool?, bool?, Access?, FailOn?, bool?)

Load tiff from buffer.

Declaration
public static Image TiffloadBuffer(byte[] buffer, int? page = null, int? subifd = null, int? n = null, bool? autorotate = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

int? page

First page to load.

int? subifd

Subifd index.

int? n

Number of pages to load, -1 for all.

bool? autorotate

Rotate image using orientation tag.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.TiffloadBuffer(buffer, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

TiffloadSource(Source, out ForeignFlags, int?, int?, int?, bool?, bool?, Access?, FailOn?, bool?)

Load tiff from source.

Declaration
public static Image TiffloadSource(Source source, out Enums.ForeignFlags flags, int? page = null, int? subifd = null, int? n = null, bool? autorotate = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? subifd

Subifd index.

int? n

Number of pages to load, -1 for all.

bool? autorotate

Rotate image using orientation tag.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.TiffloadSource(source, out var flags, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

TiffloadSource(Source, int?, int?, int?, bool?, bool?, Access?, FailOn?, bool?)

Load tiff from source.

Declaration
public static Image TiffloadSource(Source source, int? page = null, int? subifd = null, int? n = null, bool? autorotate = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

int? page

First page to load.

int? subifd

Subifd index.

int? n

Number of pages to load, -1 for all.

bool? autorotate

Rotate image using orientation tag.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.TiffloadSource(source, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

TiffloadStream(Stream, out ForeignFlags, int?, int?, int?, bool?, bool?, Access?, FailOn?, bool?)

Load tiff from stream.

Declaration
public static Image TiffloadStream(Stream stream, out Enums.ForeignFlags flags, int? page = null, int? subifd = null, int? n = null, bool? autorotate = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? subifd

Subifd index.

int? n

Number of pages to load, -1 for all.

bool? autorotate

Rotate image using orientation tag.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.TiffloadStream(stream, out var flags, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

TiffloadStream(Stream, int?, int?, int?, bool?, bool?, Access?, FailOn?, bool?)

Load tiff from stream.

Declaration
public static Image TiffloadStream(Stream stream, int? page = null, int? subifd = null, int? n = null, bool? autorotate = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

int? page

First page to load.

int? subifd

Subifd index.

int? n

Number of pages to load, -1 for all.

bool? autorotate

Rotate image using orientation tag.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.TiffloadStream(stream, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Tiffsave(string, ForeignTiffCompression?, int?, ForeignTiffPredictor?, bool?, int?, int?, bool?, bool?, int?, ForeignTiffResunit?, double?, double?, bool?, bool?, RegionShrink?, int?, bool?, ForeignDzDepth?, bool?, bool?, ForeignKeep?, double[], int?, string)

Save image to tiff file.

Declaration
public void Tiffsave(string filename, Enums.ForeignTiffCompression? compression = null, int? q = null, Enums.ForeignTiffPredictor? predictor = null, bool? tile = null, int? tileWidth = null, int? tileHeight = null, bool? pyramid = null, bool? miniswhite = null, int? bitdepth = null, Enums.ForeignTiffResunit? resunit = null, double? xres = null, double? yres = null, bool? bigtiff = null, bool? properties = null, Enums.RegionShrink? regionShrink = null, int? level = null, bool? lossless = null, Enums.ForeignDzDepth? depth = null, bool? subifd = null, bool? premultiply = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

Enums.ForeignTiffCompression? compression

Compression for this file.

int? q

Q factor.

Enums.ForeignTiffPredictor? predictor

Compression prediction.

bool? tile

Write a tiled tiff.

int? tileWidth

Tile width in pixels.

int? tileHeight

Tile height in pixels.

bool? pyramid

Write a pyramidal tiff.

bool? miniswhite

Use 0 for white in 1-bit images.

int? bitdepth

Write as a 1, 2, 4 or 8 bit image.

Enums.ForeignTiffResunit? resunit

Resolution unit.

double? xres

Horizontal resolution in pixels/mm.

double? yres

Vertical resolution in pixels/mm.

bool? bigtiff

Write a bigtiff image.

bool? properties

Write a properties document to IMAGEDESCRIPTION.

Enums.RegionShrink? regionShrink

Method to shrink regions.

int? level

Deflate (1-9, default 6) or ZSTD (1-22, default 9) compression level.

bool? lossless

Enable WEBP lossless mode.

Enums.ForeignDzDepth? depth

Pyramid depth.

bool? subifd

Save pyr layers as sub-IFDs.

bool? premultiply

Save with premultiplied alpha.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Tiffsave(filename, compression: Enums.ForeignTiffCompression, q: int, predictor: Enums.ForeignTiffPredictor, tile: bool, tileWidth: int, tileHeight: int, pyramid: bool, miniswhite: bool, bitdepth: int, resunit: Enums.ForeignTiffResunit, xres: double, yres: double, bigtiff: bool, properties: bool, regionShrink: Enums.RegionShrink, level: int, lossless: bool, depth: Enums.ForeignDzDepth, subifd: bool, premultiply: bool, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

TiffsaveBuffer(ForeignTiffCompression?, int?, ForeignTiffPredictor?, bool?, int?, int?, bool?, bool?, int?, ForeignTiffResunit?, double?, double?, bool?, bool?, RegionShrink?, int?, bool?, ForeignDzDepth?, bool?, bool?, ForeignKeep?, double[], int?, string)

Save image to tiff buffer.

Declaration
public byte[] TiffsaveBuffer(Enums.ForeignTiffCompression? compression = null, int? q = null, Enums.ForeignTiffPredictor? predictor = null, bool? tile = null, int? tileWidth = null, int? tileHeight = null, bool? pyramid = null, bool? miniswhite = null, int? bitdepth = null, Enums.ForeignTiffResunit? resunit = null, double? xres = null, double? yres = null, bool? bigtiff = null, bool? properties = null, Enums.RegionShrink? regionShrink = null, int? level = null, bool? lossless = null, Enums.ForeignDzDepth? depth = null, bool? subifd = null, bool? premultiply = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Enums.ForeignTiffCompression? compression

Compression for this file.

int? q

Q factor.

Enums.ForeignTiffPredictor? predictor

Compression prediction.

bool? tile

Write a tiled tiff.

int? tileWidth

Tile width in pixels.

int? tileHeight

Tile height in pixels.

bool? pyramid

Write a pyramidal tiff.

bool? miniswhite

Use 0 for white in 1-bit images.

int? bitdepth

Write as a 1, 2, 4 or 8 bit image.

Enums.ForeignTiffResunit? resunit

Resolution unit.

double? xres

Horizontal resolution in pixels/mm.

double? yres

Vertical resolution in pixels/mm.

bool? bigtiff

Write a bigtiff image.

bool? properties

Write a properties document to IMAGEDESCRIPTION.

Enums.RegionShrink? regionShrink

Method to shrink regions.

int? level

Deflate (1-9, default 6) or ZSTD (1-22, default 9) compression level.

bool? lossless

Enable WEBP lossless mode.

Enums.ForeignDzDepth? depth

Pyramid depth.

bool? subifd

Save pyr layers as sub-IFDs.

bool? premultiply

Save with premultiplied alpha.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Returns
Type Description
byte[]

An array of bytes.

Examples
byte[] buffer = in.TiffsaveBuffer(compression: Enums.ForeignTiffCompression, q: int, predictor: Enums.ForeignTiffPredictor, tile: bool, tileWidth: int, tileHeight: int, pyramid: bool, miniswhite: bool, bitdepth: int, resunit: Enums.ForeignTiffResunit, xres: double, yres: double, bigtiff: bool, properties: bool, regionShrink: Enums.RegionShrink, level: int, lossless: bool, depth: Enums.ForeignDzDepth, subifd: bool, premultiply: bool, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

TiffsaveStream(Stream, ForeignTiffCompression?, int?, ForeignTiffPredictor?, bool?, int?, int?, bool?, bool?, int?, ForeignTiffResunit?, double?, double?, bool?, bool?, RegionShrink?, int?, bool?, ForeignDzDepth?, bool?, bool?, ForeignKeep?, double[], int?, string)

Save image to tiff stream.

Declaration
public void TiffsaveStream(Stream stream, Enums.ForeignTiffCompression? compression = null, int? q = null, Enums.ForeignTiffPredictor? predictor = null, bool? tile = null, int? tileWidth = null, int? tileHeight = null, bool? pyramid = null, bool? miniswhite = null, int? bitdepth = null, Enums.ForeignTiffResunit? resunit = null, double? xres = null, double? yres = null, bool? bigtiff = null, bool? properties = null, Enums.RegionShrink? regionShrink = null, int? level = null, bool? lossless = null, Enums.ForeignDzDepth? depth = null, bool? subifd = null, bool? premultiply = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Stream stream

Stream to save to.

Enums.ForeignTiffCompression? compression

Compression for this file.

int? q

Q factor.

Enums.ForeignTiffPredictor? predictor

Compression prediction.

bool? tile

Write a tiled tiff.

int? tileWidth

Tile width in pixels.

int? tileHeight

Tile height in pixels.

bool? pyramid

Write a pyramidal tiff.

bool? miniswhite

Use 0 for white in 1-bit images.

int? bitdepth

Write as a 1, 2, 4 or 8 bit image.

Enums.ForeignTiffResunit? resunit

Resolution unit.

double? xres

Horizontal resolution in pixels/mm.

double? yres

Vertical resolution in pixels/mm.

bool? bigtiff

Write a bigtiff image.

bool? properties

Write a properties document to IMAGEDESCRIPTION.

Enums.RegionShrink? regionShrink

Method to shrink regions.

int? level

Deflate (1-9, default 6) or ZSTD (1-22, default 9) compression level.

bool? lossless

Enable WEBP lossless mode.

Enums.ForeignDzDepth? depth

Pyramid depth.

bool? subifd

Save pyr layers as sub-IFDs.

bool? premultiply

Save with premultiplied alpha.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.TiffsaveStream(stream, compression: Enums.ForeignTiffCompression, q: int, predictor: Enums.ForeignTiffPredictor, tile: bool, tileWidth: int, tileHeight: int, pyramid: bool, miniswhite: bool, bitdepth: int, resunit: Enums.ForeignTiffResunit, xres: double, yres: double, bigtiff: bool, properties: bool, regionShrink: Enums.RegionShrink, level: int, lossless: bool, depth: Enums.ForeignDzDepth, subifd: bool, premultiply: bool, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

TiffsaveTarget(Target, ForeignTiffCompression?, int?, ForeignTiffPredictor?, bool?, int?, int?, bool?, bool?, int?, ForeignTiffResunit?, double?, double?, bool?, bool?, RegionShrink?, int?, bool?, ForeignDzDepth?, bool?, bool?, ForeignKeep?, double[], int?, string)

Save image to tiff target.

Declaration
public void TiffsaveTarget(Target target, Enums.ForeignTiffCompression? compression = null, int? q = null, Enums.ForeignTiffPredictor? predictor = null, bool? tile = null, int? tileWidth = null, int? tileHeight = null, bool? pyramid = null, bool? miniswhite = null, int? bitdepth = null, Enums.ForeignTiffResunit? resunit = null, double? xres = null, double? yres = null, bool? bigtiff = null, bool? properties = null, Enums.RegionShrink? regionShrink = null, int? level = null, bool? lossless = null, Enums.ForeignDzDepth? depth = null, bool? subifd = null, bool? premultiply = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Target target

Target to save to.

Enums.ForeignTiffCompression? compression

Compression for this file.

int? q

Q factor.

Enums.ForeignTiffPredictor? predictor

Compression prediction.

bool? tile

Write a tiled tiff.

int? tileWidth

Tile width in pixels.

int? tileHeight

Tile height in pixels.

bool? pyramid

Write a pyramidal tiff.

bool? miniswhite

Use 0 for white in 1-bit images.

int? bitdepth

Write as a 1, 2, 4 or 8 bit image.

Enums.ForeignTiffResunit? resunit

Resolution unit.

double? xres

Horizontal resolution in pixels/mm.

double? yres

Vertical resolution in pixels/mm.

bool? bigtiff

Write a bigtiff image.

bool? properties

Write a properties document to IMAGEDESCRIPTION.

Enums.RegionShrink? regionShrink

Method to shrink regions.

int? level

Deflate (1-9, default 6) or ZSTD (1-22, default 9) compression level.

bool? lossless

Enable WEBP lossless mode.

Enums.ForeignDzDepth? depth

Pyramid depth.

bool? subifd

Save pyr layers as sub-IFDs.

bool? premultiply

Save with premultiplied alpha.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.TiffsaveTarget(target, compression: Enums.ForeignTiffCompression, q: int, predictor: Enums.ForeignTiffPredictor, tile: bool, tileWidth: int, tileHeight: int, pyramid: bool, miniswhite: bool, bitdepth: int, resunit: Enums.ForeignTiffResunit, xres: double, yres: double, bigtiff: bool, properties: bool, regionShrink: Enums.RegionShrink, level: int, lossless: bool, depth: Enums.ForeignDzDepth, subifd: bool, premultiply: bool, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Tilecache(int?, int?, int?, Access?, bool?, bool?)

Cache an image as a set of tiles.

Declaration
public Image Tilecache(int? tileWidth = null, int? tileHeight = null, int? maxTiles = null, Enums.Access? access = null, bool? threaded = null, bool? persistent = null)
Parameters
Type Name Description
int? tileWidth

Tile width in pixels.

int? tileHeight

Tile height in pixels.

int? maxTiles

Maximum number of tiles to cache.

Enums.Access? access

Expected access pattern.

bool? threaded

Allow threaded access.

bool? persistent

Keep cache between evaluations.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Tilecache(tileWidth: int, tileHeight: int, maxTiles: int, access: Enums.Access, threaded: bool, persistent: bool);

ToString()

Returns a string that represents the current image.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents the current image.

Overrides
object.ToString()

Tonelut(int?, int?, double?, double?, double?, double?, double?, double?, double?, double?)

Build a look-up table.

Declaration
public static Image Tonelut(int? inMax = null, int? outMax = null, double? lb = null, double? lw = null, double? ps = null, double? pm = null, double? ph = null, double? s = null, double? m = null, double? h = null)
Parameters
Type Name Description
int? inMax

Size of LUT to build.

int? outMax

Maximum value in output LUT.

double? lb

Lowest value in output.

double? lw

Highest value in output.

double? ps

Position of shadow.

double? pm

Position of mid-tones.

double? ph

Position of highlights.

double? s

Adjust shadows by this much.

double? m

Adjust mid-tones by this much.

double? h

Adjust highlights by this much.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Tonelut(inMax: int, outMax: int, lb: double, lw: double, ps: double, pm: double, ph: double, s: double, m: double, h: double);

Transpose3d(int?)

Transpose3d an image.

Declaration
public Image Transpose3d(int? pageHeight = null)
Parameters
Type Name Description
int? pageHeight

Height of each input page.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Transpose3d(pageHeight: int);

Unpremultiply(double?, int?)

Unpremultiply image alpha.

Declaration
public Image Unpremultiply(double? maxAlpha = null, int? alphaBand = null)
Parameters
Type Name Description
double? maxAlpha

Maximum value of alpha channel.

int? alphaBand

Unpremultiply with this alpha.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Unpremultiply(maxAlpha: double, alphaBand: int);

Vipsload(string, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load vips from file.

Declaration
public static Image Vipsload(string filename, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Vipsload(filename, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Vipsload(string, bool?, Access?, FailOn?, bool?)

Load vips from file.

Declaration
public static Image Vipsload(string filename, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Vipsload(filename, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

VipsloadSource(Source, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load vips from source.

Declaration
public static Image VipsloadSource(Source source, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.VipsloadSource(source, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

VipsloadSource(Source, bool?, Access?, FailOn?, bool?)

Load vips from source.

Declaration
public static Image VipsloadSource(Source source, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.VipsloadSource(source, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

VipsloadStream(Stream, out ForeignFlags, bool?, Access?, FailOn?, bool?)

Load vips from stream.

Declaration
public static Image VipsloadStream(Stream stream, out Enums.ForeignFlags flags, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.VipsloadStream(stream, out var flags, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

VipsloadStream(Stream, bool?, Access?, FailOn?, bool?)

Load vips from stream.

Declaration
public static Image VipsloadStream(Stream stream, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.VipsloadStream(stream, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Vipssave(string, ForeignKeep?, double[], int?, string)

Save image to file in vips format.

Declaration
public void Vipssave(string filename, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Vipssave(filename, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

VipssaveStream(Stream, ForeignKeep?, double[], int?, string)

Save image to stream in vips format.

Declaration
public void VipssaveStream(Stream stream, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Stream stream

Stream to save to.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.VipssaveStream(stream, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

VipssaveTarget(Target, ForeignKeep?, double[], int?, string)

Save image to target in vips format.

Declaration
public void VipssaveTarget(Target target, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Target target

Target to save to.

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.VipssaveTarget(target, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Webpload(string, out ForeignFlags, int?, int?, double?, bool?, Access?, FailOn?, bool?)

Load webp from file.

Declaration
public static Image Webpload(string filename, out Enums.ForeignFlags flags, int? page = null, int? n = null, double? scale = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? scale

Factor to scale by.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Webpload(filename, out var flags, page: int, n: int, scale: double, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Webpload(string, int?, int?, double?, bool?, Access?, FailOn?, bool?)

Load webp from file.

Declaration
public static Image Webpload(string filename, int? page = null, int? n = null, double? scale = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
string filename

Filename to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? scale

Factor to scale by.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Webpload(filename, page: int, n: int, scale: double, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

WebploadBuffer(byte[], out ForeignFlags, int?, int?, double?, bool?, Access?, FailOn?, bool?)

Load webp from buffer.

Declaration
public static Image WebploadBuffer(byte[] buffer, out Enums.ForeignFlags flags, int? page = null, int? n = null, double? scale = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? scale

Factor to scale by.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.WebploadBuffer(buffer, out var flags, page: int, n: int, scale: double, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

WebploadBuffer(byte[], int?, int?, double?, bool?, Access?, FailOn?, bool?)

Load webp from buffer.

Declaration
public static Image WebploadBuffer(byte[] buffer, int? page = null, int? n = null, double? scale = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
byte[] buffer

Buffer to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? scale

Factor to scale by.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.WebploadBuffer(buffer, page: int, n: int, scale: double, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

WebploadSource(Source, out ForeignFlags, int?, int?, double?, bool?, Access?, FailOn?, bool?)

Load webp from source.

Declaration
public static Image WebploadSource(Source source, out Enums.ForeignFlags flags, int? page = null, int? n = null, double? scale = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? scale

Factor to scale by.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.WebploadSource(source, out var flags, page: int, n: int, scale: double, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

WebploadSource(Source, int?, int?, double?, bool?, Access?, FailOn?, bool?)

Load webp from source.

Declaration
public static Image WebploadSource(Source source, int? page = null, int? n = null, double? scale = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Source source

Source to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? scale

Factor to scale by.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.WebploadSource(source, page: int, n: int, scale: double, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

WebploadStream(Stream, out ForeignFlags, int?, int?, double?, bool?, Access?, FailOn?, bool?)

Load webp from stream.

Declaration
public static Image WebploadStream(Stream stream, out Enums.ForeignFlags flags, int? page = null, int? n = null, double? scale = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

Enums.ForeignFlags flags

Flags for this file.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? scale

Factor to scale by.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.WebploadStream(stream, out var flags, page: int, n: int, scale: double, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

WebploadStream(Stream, int?, int?, double?, bool?, Access?, FailOn?, bool?)

Load webp from stream.

Declaration
public static Image WebploadStream(Stream stream, int? page = null, int? n = null, double? scale = null, bool? memory = null, Enums.Access? access = null, Enums.FailOn? failOn = null, bool? revalidate = null)
Parameters
Type Name Description
Stream stream

Stream to load from.

int? page

First page to load.

int? n

Number of pages to load, -1 for all.

double? scale

Factor to scale by.

bool? memory

Force open via memory.

Enums.Access? access

Required access pattern for this file.

Enums.FailOn? failOn

Error level to fail on.

bool? revalidate

Don't use a cached result for this operation.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.WebploadStream(stream, page: int, n: int, scale: double, memory: bool, access: Enums.Access, failOn: Enums.FailOn, revalidate: bool);

Webpsave(string, int?, bool?, ForeignWebpPreset?, bool?, bool?, int?, bool?, int?, int?, int?, int?, bool?, bool?, int?, ForeignKeep?, double[], int?, string)

Save as WebP.

Declaration
public void Webpsave(string filename, int? q = null, bool? lossless = null, Enums.ForeignWebpPreset? preset = null, bool? smartSubsample = null, bool? nearLossless = null, int? alphaQ = null, bool? minSize = null, int? kmin = null, int? kmax = null, int? effort = null, int? targetSize = null, bool? mixed = null, bool? smartDeblock = null, int? passes = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
string filename

Filename to save to.

int? q

Q factor.

bool? lossless

Enable lossless compression.

Enums.ForeignWebpPreset? preset

Preset for lossy compression.

bool? smartSubsample

Enable high quality chroma subsampling.

bool? nearLossless

Enable preprocessing in lossless mode (uses Q).

int? alphaQ

Change alpha plane fidelity for lossy compression.

bool? minSize

Optimise for minimum size.

int? kmin

Minimum number of frames between key frames.

int? kmax

Maximum number of frames between key frames.

int? effort

Level of CPU effort to reduce file size.

int? targetSize

Desired target size in bytes.

bool? mixed

Allow mixed encoding (might reduce file size).

bool? smartDeblock

Enable auto-adjusting of the deblocking filter.

int? passes

Number of entropy-analysis passes (in [1..10]).

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.Webpsave(filename, q: int, lossless: bool, preset: Enums.ForeignWebpPreset, smartSubsample: bool, nearLossless: bool, alphaQ: int, minSize: bool, kmin: int, kmax: int, effort: int, targetSize: int, mixed: bool, smartDeblock: bool, passes: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

WebpsaveBuffer(int?, bool?, ForeignWebpPreset?, bool?, bool?, int?, bool?, int?, int?, int?, int?, bool?, bool?, int?, ForeignKeep?, double[], int?, string)

Save as WebP.

Declaration
public byte[] WebpsaveBuffer(int? q = null, bool? lossless = null, Enums.ForeignWebpPreset? preset = null, bool? smartSubsample = null, bool? nearLossless = null, int? alphaQ = null, bool? minSize = null, int? kmin = null, int? kmax = null, int? effort = null, int? targetSize = null, bool? mixed = null, bool? smartDeblock = null, int? passes = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
int? q

Q factor.

bool? lossless

Enable lossless compression.

Enums.ForeignWebpPreset? preset

Preset for lossy compression.

bool? smartSubsample

Enable high quality chroma subsampling.

bool? nearLossless

Enable preprocessing in lossless mode (uses Q).

int? alphaQ

Change alpha plane fidelity for lossy compression.

bool? minSize

Optimise for minimum size.

int? kmin

Minimum number of frames between key frames.

int? kmax

Maximum number of frames between key frames.

int? effort

Level of CPU effort to reduce file size.

int? targetSize

Desired target size in bytes.

bool? mixed

Allow mixed encoding (might reduce file size).

bool? smartDeblock

Enable auto-adjusting of the deblocking filter.

int? passes

Number of entropy-analysis passes (in [1..10]).

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Returns
Type Description
byte[]

An array of bytes.

Examples
byte[] buffer = in.WebpsaveBuffer(q: int, lossless: bool, preset: Enums.ForeignWebpPreset, smartSubsample: bool, nearLossless: bool, alphaQ: int, minSize: bool, kmin: int, kmax: int, effort: int, targetSize: int, mixed: bool, smartDeblock: bool, passes: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

WebpsaveMime(int?, bool?, ForeignWebpPreset?, bool?, bool?, int?, bool?, int?, int?, int?, int?, bool?, bool?, int?, ForeignKeep?, double[], int?, string)

Save image to webp mime.

Declaration
public void WebpsaveMime(int? q = null, bool? lossless = null, Enums.ForeignWebpPreset? preset = null, bool? smartSubsample = null, bool? nearLossless = null, int? alphaQ = null, bool? minSize = null, int? kmin = null, int? kmax = null, int? effort = null, int? targetSize = null, bool? mixed = null, bool? smartDeblock = null, int? passes = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
int? q

Q factor.

bool? lossless

Enable lossless compression.

Enums.ForeignWebpPreset? preset

Preset for lossy compression.

bool? smartSubsample

Enable high quality chroma subsampling.

bool? nearLossless

Enable preprocessing in lossless mode (uses Q).

int? alphaQ

Change alpha plane fidelity for lossy compression.

bool? minSize

Optimise for minimum size.

int? kmin

Minimum number of frames between key frames.

int? kmax

Maximum number of frames between key frames.

int? effort

Level of CPU effort to reduce file size.

int? targetSize

Desired target size in bytes.

bool? mixed

Allow mixed encoding (might reduce file size).

bool? smartDeblock

Enable auto-adjusting of the deblocking filter.

int? passes

Number of entropy-analysis passes (in [1..10]).

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.WebpsaveMime(q: int, lossless: bool, preset: Enums.ForeignWebpPreset, smartSubsample: bool, nearLossless: bool, alphaQ: int, minSize: bool, kmin: int, kmax: int, effort: int, targetSize: int, mixed: bool, smartDeblock: bool, passes: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

WebpsaveStream(Stream, int?, bool?, ForeignWebpPreset?, bool?, bool?, int?, bool?, int?, int?, int?, int?, bool?, bool?, int?, ForeignKeep?, double[], int?, string)

Save as WebP.

Declaration
public void WebpsaveStream(Stream stream, int? q = null, bool? lossless = null, Enums.ForeignWebpPreset? preset = null, bool? smartSubsample = null, bool? nearLossless = null, int? alphaQ = null, bool? minSize = null, int? kmin = null, int? kmax = null, int? effort = null, int? targetSize = null, bool? mixed = null, bool? smartDeblock = null, int? passes = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Stream stream

Stream to save to.

int? q

Q factor.

bool? lossless

Enable lossless compression.

Enums.ForeignWebpPreset? preset

Preset for lossy compression.

bool? smartSubsample

Enable high quality chroma subsampling.

bool? nearLossless

Enable preprocessing in lossless mode (uses Q).

int? alphaQ

Change alpha plane fidelity for lossy compression.

bool? minSize

Optimise for minimum size.

int? kmin

Minimum number of frames between key frames.

int? kmax

Maximum number of frames between key frames.

int? effort

Level of CPU effort to reduce file size.

int? targetSize

Desired target size in bytes.

bool? mixed

Allow mixed encoding (might reduce file size).

bool? smartDeblock

Enable auto-adjusting of the deblocking filter.

int? passes

Number of entropy-analysis passes (in [1..10]).

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.WebpsaveStream(stream, q: int, lossless: bool, preset: Enums.ForeignWebpPreset, smartSubsample: bool, nearLossless: bool, alphaQ: int, minSize: bool, kmin: int, kmax: int, effort: int, targetSize: int, mixed: bool, smartDeblock: bool, passes: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

WebpsaveTarget(Target, int?, bool?, ForeignWebpPreset?, bool?, bool?, int?, bool?, int?, int?, int?, int?, bool?, bool?, int?, ForeignKeep?, double[], int?, string)

Save as WebP.

Declaration
public void WebpsaveTarget(Target target, int? q = null, bool? lossless = null, Enums.ForeignWebpPreset? preset = null, bool? smartSubsample = null, bool? nearLossless = null, int? alphaQ = null, bool? minSize = null, int? kmin = null, int? kmax = null, int? effort = null, int? targetSize = null, bool? mixed = null, bool? smartDeblock = null, int? passes = null, Enums.ForeignKeep? keep = null, double[] background = null, int? pageHeight = null, string profile = null)
Parameters
Type Name Description
Target target

Target to save to.

int? q

Q factor.

bool? lossless

Enable lossless compression.

Enums.ForeignWebpPreset? preset

Preset for lossy compression.

bool? smartSubsample

Enable high quality chroma subsampling.

bool? nearLossless

Enable preprocessing in lossless mode (uses Q).

int? alphaQ

Change alpha plane fidelity for lossy compression.

bool? minSize

Optimise for minimum size.

int? kmin

Minimum number of frames between key frames.

int? kmax

Maximum number of frames between key frames.

int? effort

Level of CPU effort to reduce file size.

int? targetSize

Desired target size in bytes.

bool? mixed

Allow mixed encoding (might reduce file size).

bool? smartDeblock

Enable auto-adjusting of the deblocking filter.

int? passes

Number of entropy-analysis passes (in [1..10]).

Enums.ForeignKeep? keep

Which metadata to retain.

double[] background

Background value.

int? pageHeight

Set page height for multipage save.

string profile

Filename of ICC profile to embed.

Examples
in.WebpsaveTarget(target, q: int, lossless: bool, preset: Enums.ForeignWebpPreset, smartSubsample: bool, nearLossless: bool, alphaQ: int, minSize: bool, kmin: int, kmax: int, effort: int, targetSize: int, mixed: bool, smartDeblock: bool, passes: int, keep: Enums.ForeignKeep, background: double[], pageHeight: int, profile: string);

Wop(Image)

Raise to power of an image, but with the arguments reversed.

Declaration
public Image Wop(Image @base)
Parameters
Type Name Description
Image base

To the base of this.

Returns
Type Description
Image

A new Image.

Wop(double)

Raise to power of an constant, but with the arguments reversed.

Declaration
public Image Wop(double @base)
Parameters
Type Name Description
double base

To the base of this.

Returns
Type Description
Image

A new Image.

Wop(double[])

Raise to power of an array, but with the arguments reversed.

Declaration
public Image Wop(double[] @base)
Parameters
Type Name Description
double[] base

To the base of this.

Returns
Type Description
Image

A new Image.

Wop(int[])

Raise to power of an array, but with the arguments reversed.

Declaration
public Image Wop(int[] @base)
Parameters
Type Name Description
int[] base

To the base of this.

Returns
Type Description
Image

A new Image.

Worley(int, int, int?, int?)

Make a worley noise image.

Declaration
public static Image Worley(int width, int height, int? cellSize = null, int? seed = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

int? cellSize

Size of Worley cells.

int? seed

Random number seed.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Worley(width, height, cellSize: int, seed: int);

Wrap(int?, int?)

Wrap image origin.

Declaration
public Image Wrap(int? x = null, int? y = null)
Parameters
Type Name Description
int? x

Left edge of input in output.

int? y

Top edge of input in output.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Wrap(x: int, y: int);

Write(Image)

Write an image to another image.

Declaration
public void Write(Image other)
Parameters
Type Name Description
Image other

The Image to write to.

Remarks

This function writes this to another image. Use something like NewTempFile(string) to make an image that can be written to.

Exceptions
Type Condition
VipsException

If unable to write to image.

WriteToBuffer(string, VOption)

Write an image to a formatted string.

Declaration
public byte[] WriteToBuffer(string formatString, VOption kwargs = null)
Parameters
Type Name Description
string formatString

The suffix, plus any string-form arguments.

VOption kwargs

Optional options that depend on the save operation.

Returns
Type Description
byte[]

An array of bytes.

Remarks

This method can save images in any format supported by vips. The format is selected from the suffix in the format string. This can include embedded save options, see NewFromFile(string, bool?, Access?, FailOn?, VOption).

For example:

var data = image.WriteToBuffer(".jpg[Q=95]");

You can also supply options as keyword arguments, for example:

var data = image.WriteToBuffer(".jpg", new VOption
{
    {"Q", 95}
});

The full set of options available depend upon the load operation that will be executed. Try something like:

$ vips jpegsave_buffer

at the command-line to see a summary of the available options for the JPEG saver.

Exceptions
Type Condition
VipsException

If unable to write to buffer.

WriteToFile(string, VOption)

Write an image to a file on disc.

Declaration
public void WriteToFile(string vipsFilename, VOption kwargs = null)
Parameters
Type Name Description
string vipsFilename

The disc file to save the image to, with optional appended arguments.

VOption kwargs

Optional options that depend on the save operation.

Remarks

This method can save images in any format supported by vips. The format is selected from the filename suffix. The filename can include embedded save options, see NewFromFile(string, bool?, Access?, FailOn?, VOption).

For example:

image.WriteToFile("fred.jpg[Q=95]");

You can also supply options as keyword arguments, for example:

image.WriteToFile("fred.jpg", new VOption
{
    {"Q", 95}
});

The full set of options available depend upon the save operation that will be executed. Try something like:

$ vips jpegsave

at the command-line to see a summary of the available options for the JPEG saver.

Exceptions
Type Condition
VipsException

If unable to write to vipsFilename.

WriteToMemory()

Write the image to a large memory array.

Declaration
public byte[] WriteToMemory()
Returns
Type Description
byte[]

An array of bytes.

Remarks

A large area of memory is allocated, the image is rendered to that memory array, and the array is returned as a buffer.

For example, if you have a 2x2 uchar image containing the bytes 1, 2, 3, 4, read left-to-right, top-to-bottom, then:

var buf = image.WriteToMemory();

will return a four byte buffer containing the values 1, 2, 3, 4.

Exceptions
Type Condition
VipsException

If unable to write to memory.

WriteToMemory(out ulong)

Write the image to memory as a simple, unformatted C-style array.

Declaration
public nint WriteToMemory(out ulong size)
Parameters
Type Name Description
ulong size

Output buffer length.

Returns
Type Description
nint

A nint pointing to an unformatted C-style array.

Remarks

The caller is responsible for freeing this memory with Free(nint).

Exceptions
Type Condition
VipsException

If unable to write to memory.

WriteToStream(Stream, string, VOption)

Write an image to a stream.

Declaration
public void WriteToStream(Stream stream, string formatString, VOption kwargs = null)
Parameters
Type Name Description
Stream stream

Write to this stream.

string formatString

The suffix, plus any string-form arguments.

VOption kwargs

Optional options that depend on the save operation.

Remarks

This behaves exactly as WriteToTarget(Target, string, VOption), but the image is written to a stream rather than a target. At least libvips 8.9 is needed.

Exceptions
Type Condition
VipsException

If unable to write to stream.

WriteToTarget(Target, string, VOption)

Write an image to a target.

Declaration
public void WriteToTarget(Target target, string formatString, VOption kwargs = null)
Parameters
Type Name Description
Target target

Write to this target.

string formatString

The suffix, plus any string-form arguments.

VOption kwargs

Optional options that depend on the save operation.

Remarks

This behaves exactly as WriteToFile(string, VOption), but the image is written to a target rather than a file. At least libvips 8.9 is needed.

Exceptions
Type Condition
VipsException

If unable to write to target.

XYZ2CMYK()

Transform XYZ to CMYK.

Declaration
public Image XYZ2CMYK()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.XYZ2CMYK();

XYZ2Lab(double[])

Transform XYZ to Lab.

Declaration
public Image XYZ2Lab(double[] temp = null)
Parameters
Type Name Description
double[] temp

Colour temperature.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.XYZ2Lab(temp: double[]);

XYZ2Yxy()

Transform XYZ to Yxy.

Declaration
public Image XYZ2Yxy()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.XYZ2Yxy();

XYZ2scRGB()

Transform XYZ to scRGB.

Declaration
public Image XYZ2scRGB()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.XYZ2scRGB();

Xyz(int, int, int?, int?, int?)

Make an image where pixel values are coordinates.

Declaration
public static Image Xyz(int width, int height, int? csize = null, int? dsize = null, int? esize = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

int? csize

Size of third dimension.

int? dsize

Size of fourth dimension.

int? esize

Size of fifth dimension.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Xyz(width, height, csize: int, dsize: int, esize: int);

Yxy2XYZ()

Transform Yxy to XYZ.

Declaration
public Image Yxy2XYZ()
Returns
Type Description
Image

A new Image.

Examples
using Image @out = in.Yxy2XYZ();

Zone(int, int, bool?)

Make a zone plate.

Declaration
public static Image Zone(int width, int height, bool? uchar = null)
Parameters
Type Name Description
int width

Image width in pixels.

int height

Image height in pixels.

bool? uchar

Output an unsigned char image.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = NetVips.Image.Zone(width, height, uchar: bool);

Zoom(int, int)

Zoom an image.

Declaration
public Image Zoom(int xfac, int yfac)
Parameters
Type Name Description
int xfac

Horizontal zoom factor.

int yfac

Vertical zoom factor.

Returns
Type Description
Image

A new Image.

Examples
using Image @out = input.Zoom(xfac, yfac);

Operators

operator +(Image, Image)

This operation calculates left + right.

Declaration
public static Image operator +(Image left, Image right)
Parameters
Type Name Description
Image left

Left Image.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator +(Image, double)

This operation calculates left + right.

Declaration
public static Image operator +(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

double right

Right double constant.

Returns
Type Description
Image

A new Image.

operator +(Image, double[])

This operation calculates left + right.

Declaration
public static Image operator +(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

double[] right

Right double array.

Returns
Type Description
Image

A new Image.

operator +(Image, int[])

This operation calculates left + right.

Declaration
public static Image operator +(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

int[] right

Right integer array.

Returns
Type Description
Image

A new Image.

operator +(double, Image)

This operation calculates left + right.

Declaration
public static Image operator +(double left, Image right)
Parameters
Type Name Description
double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator +(double[], Image)

This operation calculates left + right.

Declaration
public static Image operator +(double[] left, Image right)
Parameters
Type Name Description
double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator +(int[], Image)

This operation calculates left + right.

Declaration
public static Image operator +(int[] left, Image right)
Parameters
Type Name Description
int[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator &(Image, Image)

This operation computes the logical bitwise AND of its operands.

Declaration
public static Image operator &(Image left, Image right)
Parameters
Type Name Description
Image left

Left Image.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator &(Image, double)

This operation computes the logical bitwise AND of its operands.

Declaration
public static Image operator &(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

double right

Right double constant.

Returns
Type Description
Image

A new Image.

operator &(Image, double[])

This operation computes the logical bitwise AND of its operands.

Declaration
public static Image operator &(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

double[] right

Right double array.

Returns
Type Description
Image

A new Image.

operator &(Image, int[])

This operation computes the logical bitwise AND of its operands.

Declaration
public static Image operator &(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

int[] right

Right integer array.

Returns
Type Description
Image

A new Image.

operator &(double, Image)

This operation computes the logical bitwise AND of its operands.

Declaration
public static Image operator &(double left, Image right)
Parameters
Type Name Description
double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator &(double[], Image)

This operation computes the logical bitwise AND of its operands.

Declaration
public static Image operator &(double[] left, Image right)
Parameters
Type Name Description
double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator &(int[], Image)

This operation computes the logical bitwise AND of its operands.

Declaration
public static Image operator &(int[] left, Image right)
Parameters
Type Name Description
int[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator |(Image, Image)

This operation computes the bitwise OR of its operands.

Declaration
public static Image operator |(Image left, Image right)
Parameters
Type Name Description
Image left

Left Image.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator |(Image, double)

This operation computes the bitwise OR of its operands.

Declaration
public static Image operator |(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

double right

Right double constant.

Returns
Type Description
Image

A new Image.

operator |(Image, double[])

This operation computes the bitwise OR of its operands.

Declaration
public static Image operator |(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

double[] right

Right double array.

Returns
Type Description
Image

A new Image.

operator |(Image, int[])

This operation computes the bitwise OR of its operands.

Declaration
public static Image operator |(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

int[] right

Right integer array.

Returns
Type Description
Image

A new Image.

operator |(double, Image)

This operation computes the bitwise OR of its operands.

Declaration
public static Image operator |(double left, Image right)
Parameters
Type Name Description
double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator |(double[], Image)

This operation computes the bitwise OR of its operands.

Declaration
public static Image operator |(double[] left, Image right)
Parameters
Type Name Description
double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator |(int[], Image)

This operation computes the bitwise OR of its operands.

Declaration
public static Image operator |(int[] left, Image right)
Parameters
Type Name Description
int[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator /(Image, Image)

This operation calculates left / right.

Declaration
public static Image operator /(Image left, Image right)
Parameters
Type Name Description
Image left

Left Image.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator /(Image, double)

This operation calculates left / right.

Declaration
public static Image operator /(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

double right

Right double constant.

Returns
Type Description
Image

A new Image.

operator /(Image, double[])

This operation calculates left / right.

Declaration
public static Image operator /(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

double[] right

Right double array.

Returns
Type Description
Image

A new Image.

operator /(Image, int[])

This operation calculates left / right.

Declaration
public static Image operator /(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

int[] right

Right integer array.

Returns
Type Description
Image

A new Image.

operator /(double, Image)

This operation calculates left / right.

Declaration
public static Image operator /(double left, Image right)
Parameters
Type Name Description
double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator /(double[], Image)

This operation calculates left / right.

Declaration
public static Image operator /(double[] left, Image right)
Parameters
Type Name Description
double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator /(int[], Image)

This operation calculates left / right.

Declaration
public static Image operator /(int[] left, Image right)
Parameters
Type Name Description
int[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator ==(double, Image)

This operation compares two images on equality.

Declaration
public static Image operator ==(double left, Image right)
Parameters
Type Name Description
double left

Left double constant to compare.

Image right

Right Image to compare.

Returns
Type Description
Image

A new Image.

operator ==(double[], Image)

This operation compares two images on equality.

Declaration
public static Image operator ==(double[] left, Image right)
Parameters
Type Name Description
double[] left

Left double array to compare.

Image right

Right Image to compare.

Returns
Type Description
Image

A new Image.

operator ==(int[], Image)

This operation compares two images on equality.

Declaration
public static Image operator ==(int[] left, Image right)
Parameters
Type Name Description
int[] left

Left integer array to compare.

Image right

Right Image to compare.

Returns
Type Description
Image

A new Image.

operator ^(Image, Image)

This operation computes the bitwise exclusive-OR of its operands.

Declaration
public static Image operator ^(Image left, Image right)
Parameters
Type Name Description
Image left

Left Image.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator ^(Image, double)

This operation computes the bitwise exclusive-OR of its operands.

Declaration
public static Image operator ^(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

double right

Right double constant.

Returns
Type Description
Image

A new Image.

operator ^(Image, double[])

This operation computes the bitwise exclusive-OR of its operands.

Declaration
public static Image operator ^(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

double[] right

Right double array.

Returns
Type Description
Image

A new Image.

operator ^(Image, int[])

This operation computes the bitwise exclusive-OR of its operands.

Declaration
public static Image operator ^(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

int[] right

Right integer array.

Returns
Type Description
Image

A new Image.

operator ^(double, Image)

This operation computes the bitwise exclusive-OR of its operands.

Declaration
public static Image operator ^(double left, Image right)
Parameters
Type Name Description
double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator ^(double[], Image)

This operation computes the bitwise exclusive-OR of its operands.

Declaration
public static Image operator ^(double[] left, Image right)
Parameters
Type Name Description
double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator ^(int[], Image)

This operation computes the bitwise exclusive-OR of its operands.

Declaration
public static Image operator ^(int[] left, Image right)
Parameters
Type Name Description
int[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator false(Image)

Returns a value indicating whether a given Image is definitely false.

Declaration
public static bool operator false(Image image)
Parameters
Type Name Description
Image image

The image to check.

Returns
Type Description
bool

true if image is definitely false; otherwise, false.

operator >(Image, Image)

This operation compares if the left operand is greater than the right operand.

Declaration
public static Image operator >(Image left, Image right)
Parameters
Type Name Description
Image left

Left Image.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator >(Image, double)

This operation compares if the left operand is greater than the right operand.

Declaration
public static Image operator >(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

double right

Right double constant.

Returns
Type Description
Image

A new Image.

operator >(Image, double[])

This operation compares if the left operand is greater than the right operand.

Declaration
public static Image operator >(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

double[] right

Right double array.

Returns
Type Description
Image

A new Image.

operator >(Image, int[])

This operation compares if the left operand is greater than the right operand.

Declaration
public static Image operator >(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

int[] right

Right integer array.

Returns
Type Description
Image

A new Image.

operator >(double, Image)

This operation compares if the left operand is greater than the right operand.

Declaration
public static Image operator >(double left, Image right)
Parameters
Type Name Description
double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator >(double[], Image)

This operation compares if the left operand is greater than the right operand.

Declaration
public static Image operator >(double[] left, Image right)
Parameters
Type Name Description
double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator >(int[], Image)

This operation compares if the left operand is greater than the right operand.

Declaration
public static Image operator >(int[] left, Image right)
Parameters
Type Name Description
int[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator >=(Image, Image)

This operation compares if the left operand is greater than or equal to the right operand.

Declaration
public static Image operator >=(Image left, Image right)
Parameters
Type Name Description
Image left

Left Image.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator >=(Image, double)

This operation compares if the left operand is greater than or equal to the right operand.

Declaration
public static Image operator >=(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

double right

Right double constant.

Returns
Type Description
Image

A new Image.

operator >=(Image, double[])

This operation compares if the left operand is greater than or equal to the right operand.

Declaration
public static Image operator >=(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

double[] right

Right double array.

Returns
Type Description
Image

A new Image.

operator >=(Image, int[])

This operation compares if the left operand is greater than or equal to the right operand.

Declaration
public static Image operator >=(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

int[] right

Right integer array.

Returns
Type Description
Image

A new Image.

operator >=(double, Image)

This operation compares if the left operand is greater than or equal to the right operand.

Declaration
public static Image operator >=(double left, Image right)
Parameters
Type Name Description
double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator >=(double[], Image)

This operation compares if the left operand is greater than or equal to the right operand.

Declaration
public static Image operator >=(double[] left, Image right)
Parameters
Type Name Description
double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator >=(int[], Image)

This operation compares if the left operand is greater than or equal to the right operand.

Declaration
public static Image operator >=(int[] left, Image right)
Parameters
Type Name Description
int[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator !=(double, Image)

This operation compares two images on inequality.

Declaration
public static Image operator !=(double left, Image right)
Parameters
Type Name Description
double left

Left double constant to compare.

Image right

Right Image to compare.

Returns
Type Description
Image

A new Image.

operator !=(double[], Image)

This operation compares two images on inequality.

Declaration
public static Image operator !=(double[] left, Image right)
Parameters
Type Name Description
double[] left

Left double array to compare.

Image right

Right Image to compare.

Returns
Type Description
Image

A new Image.

operator !=(int[], Image)

This operation compares two images on inequality.

Declaration
public static Image operator !=(int[] left, Image right)
Parameters
Type Name Description
int[] left

Left integer array to compare.

Image right

Right Image to compare.

Returns
Type Description
Image

A new Image.

operator <<(Image, int)

This operation shifts its first operand left by the number of bits specified by its second operand.

Declaration
public static Image operator <<(Image left, int right)
Parameters
Type Name Description
Image left

Left Image.

int right

The number of bits.

Returns
Type Description
Image

A new Image.

operator <(Image, Image)

This operation compares if the left operand is less than the right operand.

Declaration
public static Image operator <(Image left, Image right)
Parameters
Type Name Description
Image left

Left Image.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator <(Image, double)

This operation compares if the left operand is less than the right operand.

Declaration
public static Image operator <(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

double right

Right double constant.

Returns
Type Description
Image

A new Image.

operator <(Image, double[])

This operation compares if the left operand is less than the right operand.

Declaration
public static Image operator <(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

double[] right

Right double array.

Returns
Type Description
Image

A new Image.

operator <(Image, int[])

This operation compares if the left operand is less than the right operand.

Declaration
public static Image operator <(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

int[] right

Right integer array.

Returns
Type Description
Image

A new Image.

operator <(double, Image)

This operation compares if the left operand is less than the right operand.

Declaration
public static Image operator <(double left, Image right)
Parameters
Type Name Description
double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator <(double[], Image)

This operation compares if the left operand is less than the right operand.

Declaration
public static Image operator <(double[] left, Image right)
Parameters
Type Name Description
double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator <(int[], Image)

This operation compares if the left operand is less than the right operand.

Declaration
public static Image operator <(int[] left, Image right)
Parameters
Type Name Description
int[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator <=(Image, Image)

This operation compares if the left operand is less than or equal to the right operand.

Declaration
public static Image operator <=(Image left, Image right)
Parameters
Type Name Description
Image left

Left Image.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator <=(Image, double)

This operation compares if the left operand is less than or equal to the right operand.

Declaration
public static Image operator <=(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

double right

Right double constant.

Returns
Type Description
Image

A new Image.

operator <=(Image, double[])

This operation compares if the left operand is less than or equal to the right operand.

Declaration
public static Image operator <=(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

double[] right

Right double array.

Returns
Type Description
Image

A new Image.

operator <=(Image, int[])

This operation compares if the left operand is less than or equal to the right operand.

Declaration
public static Image operator <=(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

int[] right

Right integer array.

Returns
Type Description
Image

A new Image.

operator <=(double, Image)

This operation compares if the left operand is less than or equal to the right operand.

Declaration
public static Image operator <=(double left, Image right)
Parameters
Type Name Description
double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator <=(double[], Image)

This operation compares if the left operand is less than or equal to the right operand.

Declaration
public static Image operator <=(double[] left, Image right)
Parameters
Type Name Description
double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator <=(int[], Image)

This operation compares if the left operand is less than or equal to the right operand.

Declaration
public static Image operator <=(int[] left, Image right)
Parameters
Type Name Description
int[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator %(Image, Image)

This operation calculates left % right (remainder after integer division).

Declaration
public static Image operator %(Image left, Image right)
Parameters
Type Name Description
Image left

Left Image.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator %(Image, double)

This operation calculates left % right (remainder after integer division).

Declaration
public static Image operator %(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

double right

Right double constant.

Returns
Type Description
Image

A new Image.

operator %(Image, double[])

This operation calculates left % right (remainder after integer division).

Declaration
public static Image operator %(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

double[] right

Right double array.

Returns
Type Description
Image

A new Image.

operator %(Image, int[])

This operation calculates left % right (remainder after integer division).

Declaration
public static Image operator %(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

int[] right

Right integer array.

Returns
Type Description
Image

A new Image.

operator %(double, Image)

This operation calculates left % right (remainder after integer division).

Declaration
public static Image operator %(double left, Image right)
Parameters
Type Name Description
double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator %(double[], Image)

This operation calculates left % right (remainder after integer division).

Declaration
public static Image operator %(double[] left, Image right)
Parameters
Type Name Description
double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator %(int[], Image)

This operation calculates left % right (remainder after integer division).

Declaration
public static Image operator %(int[] left, Image right)
Parameters
Type Name Description
int[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator *(Image, Image)

This operation calculates left * right.

Declaration
public static Image operator *(Image left, Image right)
Parameters
Type Name Description
Image left

Left Image.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator *(Image, double)

This operation calculates left * right.

Declaration
public static Image operator *(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

double right

Right double constant.

Returns
Type Description
Image

A new Image.

operator *(Image, double[])

This operation calculates left * right.

Declaration
public static Image operator *(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

double[] right

Right double array.

Returns
Type Description
Image

A new Image.

operator *(Image, int[])

This operation calculates left * right.

Declaration
public static Image operator *(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

int[] right

Right integer array.

Returns
Type Description
Image

A new Image.

operator *(double, Image)

This operation calculates left * right.

Declaration
public static Image operator *(double left, Image right)
Parameters
Type Name Description
double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator *(double[], Image)

This operation calculates left * right.

Declaration
public static Image operator *(double[] left, Image right)
Parameters
Type Name Description
double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator *(int[], Image)

This operation calculates left * right.

Declaration
public static Image operator *(int[] left, Image right)
Parameters
Type Name Description
int[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator >>(Image, int)

This operation shifts its first operand right by the number of bits specified by its second operand.

Declaration
public static Image operator >>(Image left, int right)
Parameters
Type Name Description
Image left

Left Image.

int right

The number of bits.

Returns
Type Description
Image

A new Image.

operator -(Image, Image)

This operation calculates left - right.

Declaration
public static Image operator -(Image left, Image right)
Parameters
Type Name Description
Image left

Left Image.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator -(Image, double)

This operation calculates left - right.

Declaration
public static Image operator -(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

double right

Right double constant.

Returns
Type Description
Image

A new Image.

operator -(Image, double[])

This operation calculates left - right.

Declaration
public static Image operator -(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

double[] right

Right double array.

Returns
Type Description
Image

A new Image.

operator -(Image, int[])

This operation calculates left - right.

Declaration
public static Image operator -(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

int[] right

Right integer array.

Returns
Type Description
Image

A new Image.

operator -(double, Image)

This operation calculates left - right.

Declaration
public static Image operator -(double left, Image right)
Parameters
Type Name Description
double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator -(double[], Image)

This operation calculates left - right.

Declaration
public static Image operator -(double[] left, Image right)
Parameters
Type Name Description
double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator -(int[], Image)

This operation calculates left - right.

Declaration
public static Image operator -(int[] left, Image right)
Parameters
Type Name Description
int[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

operator true(Image)

Returns a value indicating whether a given Image is definitely true.

Declaration
public static bool operator true(Image image)
Parameters
Type Name Description
Image image

The image to check.

Returns
Type Description
bool

true if image is definitely true; otherwise, false.

Implements

IDisposable
In this article
Back to top Generated by DocFX