Show / Hide Table of Contents

Class Image

Wrap a NetVips.Internal.VipsImage object.

Inheritance
System.Object
System.Runtime.ConstrainedExecution.CriticalFinalizerObject
System.Runtime.InteropServices.SafeHandle
GObject
VipsObject
Image
Implements
System.IDisposable
Inherited Members
VipsObject.GetBlurb(String)
VipsObject.SetString(String)
VipsObject.GetDescription()
GObject.SignalConnect(String, Delegate, IntPtr)
GObject.ReleaseHandle()
GObject.IsInvalid
GObject.RefCount
System.Runtime.InteropServices.SafeHandle.handle
System.Runtime.InteropServices.SafeHandle.Close()
System.Runtime.InteropServices.SafeHandle.DangerousAddRef(System.Boolean)
System.Runtime.InteropServices.SafeHandle.DangerousGetHandle()
System.Runtime.InteropServices.SafeHandle.DangerousRelease()
System.Runtime.InteropServices.SafeHandle.Dispose()
System.Runtime.InteropServices.SafeHandle.Dispose(System.Boolean)
System.Runtime.InteropServices.SafeHandle.SetHandle(System.IntPtr)
System.Runtime.InteropServices.SafeHandle.SetHandleAsInvalid()
System.Runtime.InteropServices.SafeHandle.IsClosed
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: NetVips
Assembly: NetVips.dll
Syntax
public sealed class Image : VipsObject, IDisposable

Properties

| Improve this Doc View Source

Bands

Number of bands in image

Declaration
public int Bands { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Coding

Pixel coding

Declaration
public string Coding { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Filename

Image filename

Declaration
public string Filename { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Format

Pixel format in image

Declaration
public string Format { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Height

Image height in pixels

Declaration
public int Height { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Interpretation

Pixel interpretation

Declaration
public string Interpretation { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Item[Int32]

Overload [].

Declaration
public Image this[int i] { get; set; }
Parameters
Type Name Description
System.Int32 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:

var green = rgbImage[1];

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

| Improve this Doc View Source

Item[Int32, Int32]

A synonym for Getpoint(Int32, Int32).

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

Point to read.

System.Int32 y

Point to read.

Property Value
Type Description
System.Double[]

An array of doubles.

Examples
double[] outArray = in[x, y];
| Improve this Doc View Source

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
System.Int32
Remarks

At least libvips 8.8 is needed.

| Improve this Doc View Source

Width

Image width in pixels

Declaration
public int Width { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Xoffset

Horizontal offset of origin

Declaration
public int Xoffset { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Xres

Horizontal resolution in pixels/mm

Declaration
public double Xres { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Yoffset

Vertical offset of origin

Declaration
public int Yoffset { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Yres

Vertical resolution in pixels/mm

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

Methods

| Improve this Doc View Source

Abs()

Absolute value of an image.

Declaration
public Image Abs()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Abs();
| Improve this Doc View Source

Acos()

Return the inverse cosine of an image in degrees.

Declaration
public Image Acos()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

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
Image @out = left.Add(right);
| Improve this Doc View Source

Affine(Double[], GObject, Int32[], Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>, Double[], Nullable<Boolean>, String)

Affine transform of an image.

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

Transformation matrix.

GObject interpolate

Interpolate pixels with this.

System.Int32[] oarea

Area of output to generate.

System.Nullable<System.Double> odx

Horizontal output displacement.

System.Nullable<System.Double> ody

Vertical output displacement.

System.Nullable<System.Double> idx

Horizontal input displacement.

System.Nullable<System.Double> idy

Vertical input displacement.

System.Double[] background

Background value.

System.Nullable<System.Boolean> premultiplied

Images have premultiplied alpha.

System.String extend

How to generate the extra pixels.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Affine(matrix, interpolate: GObject, oarea: int[], odx: double, ody: double, idx: double, idy: double, background: double[], premultiplied: bool, extend: string);
| Improve this Doc View Source

Analyzeload(String, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load an Analyze6 image.

Declaration
public static Image Analyzeload(string filename, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Analyzeload(filename, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Analyzeload(String, Nullable<Boolean>, String, Nullable<Boolean>)

Load an Analyze6 image.

Declaration
public static Image Analyzeload(string filename, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Analyzeload(filename, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Arrayjoin(Image[], Nullable<Int32>, Nullable<Int32>, Double[], String, String, Nullable<Int32>, Nullable<Int32>)

Join an array of images.

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

Array of input images.

System.Nullable<System.Int32> across

Number of images across grid.

System.Nullable<System.Int32> shim

Pixels between images.

System.Double[] background

Colour for new pixels.

System.String halign

Align on the left, centre or right.

System.String valign

Align on the top, centre or bottom.

System.Nullable<System.Int32> hspacing

Horizontal spacing between images.

System.Nullable<System.Int32> vspacing

Vertical spacing between images.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Arrayjoin(@in, across: int, shim: int, background: double[], halign: string, valign: string, hspacing: int, vspacing: int);
| Improve this Doc View Source

Asin()

Return the inverse sine of an image in degrees.

Declaration
public Image Asin()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Atan()

Return the inverse tangent of an image in degrees.

Declaration
public Image Atan()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Autorot()

Autorotate image by exif tag.

Declaration
public Image Autorot()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Autorot();
| Improve this Doc View Source

Autorot(out String)

Autorotate image by exif tag.

Declaration
public Image Autorot(out string angle)
Parameters
Type Name Description
System.String angle

Angle image was rotated by.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Autorot(out var angle);
| Improve this Doc View Source

Autorot(out String, out Boolean)

Autorotate image by exif tag.

Declaration
public Image Autorot(out string angle, out bool flip)
Parameters
Type Name Description
System.String angle

Angle image was rotated by.

System.Boolean flip

Whether the image was flipped or not.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Autorot(out var angle, out var flip);
| Improve this Doc View Source

Avg()

Find image average.

Declaration
public double Avg()
Returns
Type Description
System.Double

A double.

Examples
double @out = in.Avg();
| Improve this Doc View Source

BandAnd()

AND image bands together.

Declaration
public Image BandAnd()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Bandbool(String)

Boolean operation across image bands.

Declaration
public Image Bandbool(string boolean)
Parameters
Type Name Description
System.String boolean

boolean to perform.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Bandbool(boolean);
| Improve this Doc View Source

BandEor()

EOR image bands together.

Declaration
public Image BandEor()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

BandExists(Int32)

Does band exist in image.

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

The index to fetch.

Returns
Type Description
System.Boolean

true if the index exists.

| Improve this Doc View Source

Bandfold(Nullable<Int32>)

Fold up x axis into bands.

Declaration
public Image Bandfold(int? factor = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> factor

Fold by this factor.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Bandfold(factor: int);
| Improve this Doc View Source

Bandjoin(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
Image @out = image.Bandjoin(image2, image3);
| Improve this Doc View Source

Bandjoin(Double[])

Append a set of constants bandwise.

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

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
Image @out = image.Bandjoin(127.5, 255.0);
| Improve this Doc View Source

Bandjoin(Int32[])

Append a set of constants bandwise.

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

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
Image @out = image.Bandjoin(255, 128);
| Improve this Doc View Source

Bandjoin(Object[])

Append a set of mixed images and constants bandwise.

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

Array of mixed images and constants.

Returns
Type Description
Image

A new Image.

Examples
Image @out = image.Bandjoin(image2, 255);
| Improve this Doc View Source

BandjoinConst(Double[])

Append a constant band to an image.

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

Array of constants to add.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.BandjoinConst(c);
| Improve this Doc View Source

Bandmean()

Band-wise average.

Declaration
public Image Bandmean()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Bandmean();
| Improve this Doc View Source

BandOr()

OR image bands together.

Declaration
public Image BandOr()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Bandrank(Image, Nullable<Int32>)

Band-wise rank a image.

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

Input image.

System.Nullable<System.Int32> index

Select this band element from sorted list.

Returns
Type Description
Image

A new Image.

Examples
Image @out = image.Bandrank(other, index: int);
| Improve this Doc View Source

Bandrank(Image[], Nullable<Int32>)

Band-wise rank a set of images.

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

Array of input images.

System.Nullable<System.Int32> index

Select this band element from sorted list.

Returns
Type Description
Image

A new Image.

Examples
Image @out = image.Bandrank(other, index: int);
| Improve this Doc View Source

Bandrank(Double[], Nullable<Int32>)

Band-wise rank a set of constants.

Declaration
public Image Bandrank(double[] doubles, int? index = default(int? ))
Parameters
Type Name Description
System.Double[] doubles

Array of constants.

System.Nullable<System.Int32> index

Select this band element from sorted list.

Returns
Type Description
Image

A new Image

Examples
Image @out = image.Bandrank(other, index: int);
| Improve this Doc View Source

Bandrank(Int32[], Nullable<Int32>)

Band-wise rank a set of constants.

Declaration
public Image Bandrank(int[] ints, int? index = default(int? ))
Parameters
Type Name Description
System.Int32[] ints

Array of constants.

System.Nullable<System.Int32> index

Select this band element from sorted list.

Returns
Type Description
Image

A new Image.

Examples
Image @out = image.Bandrank(other, index: int);
| Improve this Doc View Source

Bandrank(Object[], Nullable<Int32>)

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

Declaration
public Image Bandrank(object[] objects, int? index = default(int? ))
Parameters
Type Name Description
System.Object[] objects

Array of mixed images and constants.

System.Nullable<System.Int32> index

Select this band element from sorted list.

Returns
Type Description
Image

A new Image.

Examples
Image @out = image.Bandrank(new object[] { image2, 255 }, index: int);
| Improve this Doc View Source

Bandsplit()

Split an n-band image into n separate images.

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

An array of Image.

| Improve this Doc View Source

Bandunfold(Nullable<Int32>)

Unfold image bands into x axis.

Declaration
public Image Bandunfold(int? factor = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> factor

Unfold by this factor.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Bandunfold(factor: int);
| Improve this Doc View Source

Black(Int32, Int32, Nullable<Int32>)

Make a black image.

Declaration
public static Image Black(int width, int height, int? bands = default(int? ))
Parameters
Type Name Description
System.Int32 width

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Nullable<System.Int32> bands

Number of bands in image.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Black(width, height, bands: int);
| Improve this Doc View Source

Boolean(Image, String)

Boolean operation on two images.

Declaration
public Image Boolean(Image right, string boolean)
Parameters
Type Name Description
Image right

Right-hand image argument.

System.String boolean

boolean to perform.

Returns
Type Description
Image

A new Image.

Examples
Image @out = left.Boolean(right, boolean);
| Improve this Doc View Source

BooleanConst(String, Double[])

Boolean operations against a constant.

Declaration
public Image BooleanConst(string boolean, double[] c)
Parameters
Type Name Description
System.String boolean

boolean to perform.

System.Double[] c

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.BooleanConst(boolean, c);
| Improve this Doc View Source

Buildlut()

Build a look-up table.

Declaration
public Image Buildlut()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Buildlut();
| Improve this Doc View Source

Byteswap()

Byteswap an image.

Declaration
public Image Byteswap()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Byteswap();
| Improve this Doc View Source

Cache(Nullable<Int32>, Nullable<Int32>, Nullable<Int32>)

Cache an image.

Declaration
public Image Cache(int? maxTiles = default(int? ), int? tileHeight = default(int? ), int? tileWidth = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> maxTiles

Maximum number of tiles to cache.

System.Nullable<System.Int32> tileHeight

Tile height in pixels.

System.Nullable<System.Int32> tileWidth

Tile width in pixels.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Cache(maxTiles: int, tileHeight: int, tileWidth: int);
| Improve this Doc View Source

Canny(Nullable<Double>, String)

Canny edge detector.

Declaration
public Image Canny(double? sigma = default(double? ), string precision = null)
Parameters
Type Name Description
System.Nullable<System.Double> sigma

Sigma of Gaussian.

System.String precision

Convolve with this precision.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Canny(sigma: double, precision: string);
| Improve this Doc View Source

Case(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
Image @out = index.Case(images);
| Improve this Doc View Source

Case(Double[])

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

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

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
Image @out = index.Case(10.5, 20.5);
| Improve this Doc View Source

Case(Int32[])

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

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

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
Image @out = index.Case(10, 20);
| Improve this Doc View Source

Case(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
System.Object[] objects

Array of mixed images and constants.

Returns
Type Description
Image

A new Image.

Examples
Image @out = index.Case(image, 10);
| Improve this Doc View Source

Cast(String, Nullable<Boolean>)

Cast an image.

Declaration
public Image Cast(string format, bool? shift = default(bool? ))
Parameters
Type Name Description
System.String format

Format to cast to.

System.Nullable<System.Boolean> shift

Shift integer values up and down.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Cast(format, shift: bool);
| Improve this Doc View Source

Ceil()

Return the largest integral value not greater than the argument.

Declaration
public Image Ceil()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

CMC2LCh()

Transform LCh to CMC.

Declaration
public Image CMC2LCh()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.CMC2LCh();
| Improve this Doc View Source

CMYK2XYZ()

Transform CMYK to XYZ.

Declaration
public Image CMYK2XYZ()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.CMYK2XYZ();
| Improve this Doc View Source

Colourspace(String, String)

Convert to a new colorspace.

Declaration
public Image Colourspace(string space, string sourceSpace = null)
Parameters
Type Name Description
System.String space

Destination color space.

System.String sourceSpace

Source color space.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Colourspace(space, sourceSpace: string);
| Improve this Doc View Source

Compass(Image, Nullable<Int32>, String, String, String, Nullable<Int32>, Nullable<Int32>)

Convolve with rotating mask.

Declaration
public Image Compass(Image mask, int? times = default(int? ), string angle = null, string combine = null, string precision = null, int? layers = default(int? ), int? cluster = default(int? ))
Parameters
Type Name Description
Image mask

Input matrix image.

System.Nullable<System.Int32> times

Rotate and convolve this many times.

System.String angle

Rotate mask by this much between convolutions.

System.String combine

Combine convolution results like this.

System.String precision

Convolve with this precision.

System.Nullable<System.Int32> layers

Use this many layers in approximation.

System.Nullable<System.Int32> cluster

Cluster lines closer than this in approximation.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Compass(mask, times: int, angle: string, combine: string, precision: string, layers: int, cluster: int);
| Improve this Doc View Source

Complex(String)

Perform a complex operation on an image.

Declaration
public Image Complex(string cmplx)
Parameters
Type Name Description
System.String cmplx

complex to perform.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Complex(cmplx);
| Improve this Doc View Source

Complex2(Image, String)

Complex binary operations on two images.

Declaration
public Image Complex2(Image right, string cmplx)
Parameters
Type Name Description
Image right

Right-hand image argument.

System.String cmplx

binary complex operation to perform.

Returns
Type Description
Image

A new Image.

Examples
Image @out = left.Complex2(right, cmplx);
| Improve this Doc View Source

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
Image @out = left.Complexform(right);
| Improve this Doc View Source

Complexget(String)

Get a component from a complex image.

Declaration
public Image Complexget(string get)
Parameters
Type Name Description
System.String get

complex to perform.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Complexget(get);
| Improve this Doc View Source

Composite(Image, String, Nullable<Int32>, Nullable<Int32>, String, Nullable<Boolean>)

A synonym for Composite2(Image, String, Nullable<Int32>, Nullable<Int32>, String, Nullable<Boolean>).

Declaration
public Image Composite(Image overlay, string mode, int? x = default(int? ), int? y = default(int? ), string compositingSpace = null, bool? premultiplied = default(bool? ))
Parameters
Type Name Description
Image overlay

Overlay image.

System.String mode

VipsBlendMode to join with.

System.Nullable<System.Int32> x

x position of overlay.

System.Nullable<System.Int32> y

y position of overlay.

System.String compositingSpace

Composite images in this colour space.

System.Nullable<System.Boolean> premultiplied

Images have premultiplied alpha.

Returns
Type Description
Image

A new Image.

Examples
Image @out = base.Composite(overlay, mode, x: int, y: int, compositingSpace: string, premultiplied: bool);
| Improve this Doc View Source

Composite(Image[], Int32[], Int32[], Int32[], String, Nullable<Boolean>)

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

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

Array of input images.

System.Int32[] modes

Array of VipsBlendMode to join with.

System.Int32[] x

Array of x coordinates to join at.

System.Int32[] y

Array of y coordinates to join at.

System.String compositingSpace

Composite images in this colour space.

System.Nullable<System.Boolean> premultiplied

Images have premultiplied alpha.

Returns
Type Description
Image

A new Image.

Examples
Image @out = image.Composite(images, modes, x: int[], y: int[], compositingSpace: string, premultiplied: bool);
| Improve this Doc View Source

Composite(Image[], String[], Int32[], Int32[], String, Nullable<Boolean>)

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

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

Array of input images.

System.String[] modes

Array of VipsBlendMode to join with.

System.Int32[] x

Array of x coordinates to join at.

System.Int32[] y

Array of y coordinates to join at.

System.String compositingSpace

Composite images in this colour space.

System.Nullable<System.Boolean> premultiplied

Images have premultiplied alpha.

Returns
Type Description
Image

A new Image.

Examples
Image @out = image.Composite(images, modes, x: int[], y: int[], compositingSpace: string, premultiplied: bool);
| Improve this Doc View Source

Composite2(Image, String, Nullable<Int32>, Nullable<Int32>, String, Nullable<Boolean>)

Blend a pair of images with a blend mode.

Declaration
public Image Composite2(Image overlay, string mode, int? x = default(int? ), int? y = default(int? ), string compositingSpace = null, bool? premultiplied = default(bool? ))
Parameters
Type Name Description
Image overlay

Overlay image.

System.String mode

VipsBlendMode to join with.

System.Nullable<System.Int32> x

x position of overlay.

System.Nullable<System.Int32> y

y position of overlay.

System.String compositingSpace

Composite images in this colour space.

System.Nullable<System.Boolean> premultiplied

Images have premultiplied alpha.

Returns
Type Description
Image

A new Image.

Examples
Image @out = base.Composite2(overlay, mode, x: int, y: int, compositingSpace: string, premultiplied: bool);
| Improve this Doc View Source

Conj()

Return the complex conjugate of an image.

Declaration
public Image Conj()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Contains(String)

Check if the underlying image contains an property of metadata.

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

The name of the piece of metadata to check for.

Returns
Type Description
System.Boolean

true if the metadata exits; otherwise, false.

| Improve this Doc View Source

Conv(Image, String, Nullable<Int32>, Nullable<Int32>)

Convolution operation.

Declaration
public Image Conv(Image mask, string precision = null, int? layers = default(int? ), int? cluster = default(int? ))
Parameters
Type Name Description
Image mask

Input matrix image.

System.String precision

Convolve with this precision.

System.Nullable<System.Int32> layers

Use this many layers in approximation.

System.Nullable<System.Int32> cluster

Cluster lines closer than this in approximation.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Conv(mask, precision: string, layers: int, cluster: int);
| Improve this Doc View Source

Conva(Image, Nullable<Int32>, Nullable<Int32>)

Approximate integer convolution.

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

Input matrix image.

System.Nullable<System.Int32> layers

Use this many layers in approximation.

System.Nullable<System.Int32> cluster

Cluster lines closer than this in approximation.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Conva(mask, layers: int, cluster: int);
| Improve this Doc View Source

Convasep(Image, Nullable<Int32>)

Approximate separable integer convolution.

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

Input matrix image.

System.Nullable<System.Int32> layers

Use this many layers in approximation.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Convasep(mask, layers: int);
| Improve this Doc View Source

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
Image @out = in.Convf(mask);
| Improve this Doc View Source

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
Image @out = in.Convi(mask);
| Improve this Doc View Source

Convsep(Image, String, Nullable<Int32>, Nullable<Int32>)

Seperable convolution operation.

Declaration
public Image Convsep(Image mask, string precision = null, int? layers = default(int? ), int? cluster = default(int? ))
Parameters
Type Name Description
Image mask

Input matrix image.

System.String precision

Convolve with this precision.

System.Nullable<System.Int32> layers

Use this many layers in approximation.

System.Nullable<System.Int32> cluster

Cluster lines closer than this in approximation.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Convsep(mask, precision: string, layers: int, cluster: int);
| Improve this Doc View Source

Copy(Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, String, String, String, Nullable<Double>, Nullable<Double>, Nullable<Int32>, Nullable<Int32>)

Copy an image.

Declaration
public Image Copy(int? width = default(int? ), int? height = default(int? ), int? bands = default(int? ), string format = null, string coding = null, string interpretation = null, double? xres = default(double? ), double? yres = default(double? ), int? xoffset = default(int? ), int? yoffset = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> width

Image width in pixels.

System.Nullable<System.Int32> height

Image height in pixels.

System.Nullable<System.Int32> bands

Number of bands in image.

System.String format

Pixel format in image.

System.String coding

Pixel coding.

System.String interpretation

Pixel interpretation.

System.Nullable<System.Double> xres

Horizontal resolution in pixels/mm.

System.Nullable<System.Double> yres

Vertical resolution in pixels/mm.

System.Nullable<System.Int32> xoffset

Horizontal offset of origin.

System.Nullable<System.Int32> yoffset

Vertical offset of origin.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Copy(width: int, height: int, bands: int, format: string, coding: string, interpretation: string, xres: double, yres: double, xoffset: int, yoffset: int);
| Improve this Doc View Source

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.

| Improve this Doc View Source

Cos()

Return the cosine of an image in degrees.

Declaration
public Image Cos()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Countlines(String)

Count lines in an image.

Declaration
public double Countlines(string direction)
Parameters
Type Name Description
System.String direction

Countlines left-right or up-down.

Returns
Type Description
System.Double

A double.

Examples
double nolines = in.Countlines(direction);
| Improve this Doc View Source

Crop(Int32, Int32, Int32, Int32)

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

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

Left edge of extract area.

System.Int32 top

Top edge of extract area.

System.Int32 width

Width of extract area.

System.Int32 height

Height of extract area.

Returns
Type Description
Image

A new Image.

Examples
Image @out = input.Crop(left, top, width, height);
| Improve this Doc View Source

Csvload(String, out Int32, Nullable<Int32>, Nullable<Int32>, String, String, Nullable<Boolean>, String, Nullable<Boolean>)

Load csv.

Declaration
public static Image Csvload(string filename, out int flags, int? skip = default(int? ), int? lines = default(int? ), string whitespace = null, string separator = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> skip

Skip this many lines at the start of the file.

System.Nullable<System.Int32> lines

Read this many lines from the file.

System.String whitespace

Set of whitespace characters.

System.String separator

Set of separator characters.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Csvload(filename, out var flags, skip: int, lines: int, whitespace: string, separator: string, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Csvload(String, Nullable<Int32>, Nullable<Int32>, String, String, Nullable<Boolean>, String, Nullable<Boolean>)

Load csv.

Declaration
public static Image Csvload(string filename, int? skip = default(int? ), int? lines = default(int? ), string whitespace = null, string separator = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Int32> skip

Skip this many lines at the start of the file.

System.Nullable<System.Int32> lines

Read this many lines from the file.

System.String whitespace

Set of whitespace characters.

System.String separator

Set of separator characters.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Csvload(filename, skip: int, lines: int, whitespace: string, separator: string, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

CsvloadSource(Source, out Int32, Nullable<Int32>, Nullable<Int32>, String, String, Nullable<Boolean>, String, Nullable<Boolean>)

Load csv.

Declaration
public static Image CsvloadSource(Source source, out int flags, int? skip = default(int? ), int? lines = default(int? ), string whitespace = null, string separator = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> skip

Skip this many lines at the start of the file.

System.Nullable<System.Int32> lines

Read this many lines from the file.

System.String whitespace

Set of whitespace characters.

System.String separator

Set of separator characters.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.CsvloadSource(source, out var flags, skip: int, lines: int, whitespace: string, separator: string, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

CsvloadSource(Source, Nullable<Int32>, Nullable<Int32>, String, String, Nullable<Boolean>, String, Nullable<Boolean>)

Load csv.

Declaration
public static Image CsvloadSource(Source source, int? skip = default(int? ), int? lines = default(int? ), string whitespace = null, string separator = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Nullable<System.Int32> skip

Skip this many lines at the start of the file.

System.Nullable<System.Int32> lines

Read this many lines from the file.

System.String whitespace

Set of whitespace characters.

System.String separator

Set of separator characters.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.CsvloadSource(source, skip: int, lines: int, whitespace: string, separator: string, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

CsvloadStream(Stream, out Int32, Nullable<Int32>, Nullable<Int32>, String, String, Nullable<Boolean>, String, Nullable<Boolean>)

Load csv.

Declaration
public static Image CsvloadStream(Stream stream, out int flags, int? skip = default(int? ), int? lines = default(int? ), string whitespace = null, string separator = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> skip

Skip this many lines at the start of the file.

System.Nullable<System.Int32> lines

Read this many lines from the file.

System.String whitespace

Set of whitespace characters.

System.String separator

Set of separator characters.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.CsvloadStream(stream, out var flags, skip: int, lines: int, whitespace: string, separator: string, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

CsvloadStream(Stream, Nullable<Int32>, Nullable<Int32>, String, String, Nullable<Boolean>, String, Nullable<Boolean>)

Load csv.

Declaration
public static Image CsvloadStream(Stream stream, int? skip = default(int? ), int? lines = default(int? ), string whitespace = null, string separator = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Nullable<System.Int32> skip

Skip this many lines at the start of the file.

System.Nullable<System.Int32> lines

Read this many lines from the file.

System.String whitespace

Set of whitespace characters.

System.String separator

Set of separator characters.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.CsvloadStream(stream, skip: int, lines: int, whitespace: string, separator: string, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Csvsave(String, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to csv.

Declaration
public void Csvsave(string filename, string separator = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String filename

Filename to save to.

System.String separator

Separator characters.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Csvsave(filename, separator: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

CsvsaveStream(Stream, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to csv.

Declaration
public void CsvsaveStream(Stream stream, string separator = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to save to.

System.String separator

Separator characters.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.CsvsaveStream(stream, separator: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

CsvsaveTarget(Target, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to csv.

Declaration
public void CsvsaveTarget(Target target, string separator = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
Target target

Target to save to.

System.String separator

Separator characters.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.CsvsaveTarget(target, separator: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

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
Image @out = left.DE00(right);
| Improve this Doc View Source

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
Image @out = left.DE76(right);
| Improve this Doc View Source

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
Image @out = left.DECMC(right);
| Improve this Doc View Source

Deviate()

Find image standard deviation.

Declaration
public double Deviate()
Returns
Type Description
System.Double

A double.

Examples
double @out = in.Deviate();
| Improve this Doc View Source

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.

| Improve this Doc View Source

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
Image @out = left.Divide(right);
| Improve this Doc View Source

DrawCircle(Double[], Int32, Int32, Int32, Nullable<Boolean>)

Draw a circle on an image.

Declaration
public Image DrawCircle(double[] ink, int cx, int cy, int radius, bool? fill = default(bool? ))
Parameters
Type Name Description
System.Double[] ink

Color for pixels.

System.Int32 cx

Centre of draw_circle.

System.Int32 cy

Centre of draw_circle.

System.Int32 radius

Radius in pixels.

System.Nullable<System.Boolean> fill

Draw a solid object.

Returns
Type Description
Image

A new Image.

Examples
Image image = image.DrawCircle(ink, cx, cy, radius, fill: bool);
| Improve this Doc View Source

DrawFlood(Double[], Int32, Int32, Image, Nullable<Boolean>)

Flood-fill an area.

Declaration
public Image DrawFlood(double[] ink, int x, int y, Image test = null, bool? equal = default(bool? ))
Parameters
Type Name Description
System.Double[] ink

Color for pixels.

System.Int32 x

DrawFlood start point.

System.Int32 y

DrawFlood start point.

Image test

Test pixels in this image.

System.Nullable<System.Boolean> equal

DrawFlood while equal to edge.

Returns
Type Description
Image

A new Image.

Examples
Image image = image.DrawFlood(ink, x, y, test: Image, equal: bool);
| Improve this Doc View Source

DrawFlood(Double[], Int32, Int32, out Int32, Image, Nullable<Boolean>)

Flood-fill an area.

Declaration
public Image DrawFlood(double[] ink, int x, int y, out int left, Image test = null, bool? equal = default(bool? ))
Parameters
Type Name Description
System.Double[] ink

Color for pixels.

System.Int32 x

DrawFlood start point.

System.Int32 y

DrawFlood start point.

System.Int32 left

Left edge of modified area.

Image test

Test pixels in this image.

System.Nullable<System.Boolean> equal

DrawFlood while equal to edge.

Returns
Type Description
Image

A new Image.

Examples
Image image = image.DrawFlood(ink, x, y, out var left, test: Image, equal: bool);
| Improve this Doc View Source

DrawFlood(Double[], Int32, Int32, out Int32, out Int32, Image, Nullable<Boolean>)

Flood-fill an area.

Declaration
public Image DrawFlood(double[] ink, int x, int y, out int left, out int top, Image test = null, bool? equal = default(bool? ))
Parameters
Type Name Description
System.Double[] ink

Color for pixels.

System.Int32 x

DrawFlood start point.

System.Int32 y

DrawFlood start point.

System.Int32 left

Left edge of modified area.

System.Int32 top

top edge of modified area.

Image test

Test pixels in this image.

System.Nullable<System.Boolean> equal

DrawFlood while equal to edge.

Returns
Type Description
Image

A new Image.

Examples
Image image = image.DrawFlood(ink, x, y, out var left, out var top, test: Image, equal: bool);
| Improve this Doc View Source

DrawFlood(Double[], Int32, Int32, out Int32, out Int32, out Int32, Image, Nullable<Boolean>)

Flood-fill an area.

Declaration
public Image DrawFlood(double[] ink, int x, int y, out int left, out int top, out int width, Image test = null, bool? equal = default(bool? ))
Parameters
Type Name Description
System.Double[] ink

Color for pixels.

System.Int32 x

DrawFlood start point.

System.Int32 y

DrawFlood start point.

System.Int32 left

Left edge of modified area.

System.Int32 top

top edge of modified area.

System.Int32 width

width of modified area.

Image test

Test pixels in this image.

System.Nullable<System.Boolean> equal

DrawFlood while equal to edge.

Returns
Type Description
Image

A new Image.

Examples
Image image = image.DrawFlood(ink, x, y, out var left, out var top, out var width, test: Image, equal: bool);
| Improve this Doc View Source

DrawFlood(Double[], Int32, Int32, out Int32, out Int32, out Int32, out Int32, Image, Nullable<Boolean>)

Flood-fill an area.

Declaration
public Image DrawFlood(double[] ink, int x, int y, out int left, out int top, out int width, out int height, Image test = null, bool? equal = default(bool? ))
Parameters
Type Name Description
System.Double[] ink

Color for pixels.

System.Int32 x

DrawFlood start point.

System.Int32 y

DrawFlood start point.

System.Int32 left

Left edge of modified area.

System.Int32 top

top edge of modified area.

System.Int32 width

width of modified area.

System.Int32 height

height of modified area.

Image test

Test pixels in this image.

System.Nullable<System.Boolean> equal

DrawFlood while equal to edge.

Returns
Type Description
Image

A new Image.

Examples
Image image = image.DrawFlood(ink, x, y, out var left, out var top, out var width, out var height, test: Image, equal: bool);
| Improve this Doc View Source

DrawImage(Image, Int32, Int32, String)

Paint an image into another image.

Declaration
public Image DrawImage(Image sub, int x, int y, string mode = null)
Parameters
Type Name Description
Image sub

Sub-image to insert into main image.

System.Int32 x

Draw image here.

System.Int32 y

Draw image here.

System.String mode

Combining mode.

Returns
Type Description
Image

A new Image.

Examples
Image image = image.DrawImage(sub, x, y, mode: string);
| Improve this Doc View Source

DrawLine(Double[], Int32, Int32, Int32, Int32)

Draw a line on an image.

Declaration
public Image DrawLine(double[] ink, int x1, int y1, int x2, int y2)
Parameters
Type Name Description
System.Double[] ink

Color for pixels.

System.Int32 x1

Start of draw_line.

System.Int32 y1

Start of draw_line.

System.Int32 x2

End of draw_line.

System.Int32 y2

End of draw_line.

Returns
Type Description
Image

A new Image.

Examples
Image image = image.DrawLine(ink, x1, y1, x2, y2);
| Improve this Doc View Source

DrawMask(Double[], Image, Int32, Int32)

Draw a mask on an image.

Declaration
public Image DrawMask(double[] ink, Image mask, int x, int y)
Parameters
Type Name Description
System.Double[] ink

Color for pixels.

Image mask

Mask of pixels to draw.

System.Int32 x

Draw mask here.

System.Int32 y

Draw mask here.

Returns
Type Description
Image

A new Image.

Examples
Image image = image.DrawMask(ink, mask, x, y);
| Improve this Doc View Source

DrawRect(Double[], Int32, Int32, Int32, Int32, Nullable<Boolean>)

Paint a rectangle on an image.

Declaration
public Image DrawRect(double[] ink, int left, int top, int width, int height, bool? fill = default(bool? ))
Parameters
Type Name Description
System.Double[] ink

Color for pixels.

System.Int32 left

Rect to fill.

System.Int32 top

Rect to fill.

System.Int32 width

Rect to fill.

System.Int32 height

Rect to fill.

System.Nullable<System.Boolean> fill

Draw a solid object.

Returns
Type Description
Image

A new Image.

Examples
Image image = image.DrawRect(ink, left, top, width, height, fill: bool);
| Improve this Doc View Source

DrawSmudge(Int32, Int32, Int32, Int32)

Blur a rectangle on an image.

Declaration
public Image DrawSmudge(int left, int top, int width, int height)
Parameters
Type Name Description
System.Int32 left

Rect to fill.

System.Int32 top

Rect to fill.

System.Int32 width

Rect to fill.

System.Int32 height

Rect to fill.

Returns
Type Description
Image

A new Image.

Examples
Image image = image.DrawSmudge(left, top, width, height);
| Improve this Doc View Source

Dzsave(String, String, String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, String, String, Nullable<Boolean>, Nullable<Int32>, String, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to deepzoom file.

Declaration
public void Dzsave(string filename, string basename = null, string layout = null, string suffix = null, int? overlap = default(int? ), int? tileSize = default(int? ), bool? centre = default(bool? ), string depth = null, string angle = null, string container = null, bool? properties = default(bool? ), int? compression = default(int? ), string regionShrink = null, int? skipBlanks = default(int? ), bool? noStrip = default(bool? ), string id = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String filename

Filename to save to.

System.String basename

Base name to save to.

System.String layout

Directory layout.

System.String suffix

Filename suffix for tiles.

System.Nullable<System.Int32> overlap

Tile overlap in pixels.

System.Nullable<System.Int32> tileSize

Tile size in pixels.

System.Nullable<System.Boolean> centre

Center image in tile.

System.String depth

Pyramid depth.

System.String angle

Rotate image during save.

System.String container

Pyramid container type.

System.Nullable<System.Boolean> properties

Write a properties file to the output directory.

System.Nullable<System.Int32> compression

ZIP deflate compression level.

System.String regionShrink

Method to shrink regions.

System.Nullable<System.Int32> skipBlanks

Skip tiles which are nearly equal to the background.

System.Nullable<System.Boolean> noStrip

Don't strip tile metadata.

System.String id

Resource ID.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Dzsave(filename, basename: string, layout: string, suffix: string, overlap: int, tileSize: int, centre: bool, depth: string, angle: string, container: string, properties: bool, compression: int, regionShrink: string, skipBlanks: int, noStrip: bool, id: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

DzsaveBuffer(String, String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, String, String, Nullable<Boolean>, Nullable<Int32>, String, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to dz buffer.

Declaration
public byte[] DzsaveBuffer(string basename = null, string layout = null, string suffix = null, int? overlap = default(int? ), int? tileSize = default(int? ), bool? centre = default(bool? ), string depth = null, string angle = null, string container = null, bool? properties = default(bool? ), int? compression = default(int? ), string regionShrink = null, int? skipBlanks = default(int? ), bool? noStrip = default(bool? ), string id = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String basename

Base name to save to.

System.String layout

Directory layout.

System.String suffix

Filename suffix for tiles.

System.Nullable<System.Int32> overlap

Tile overlap in pixels.

System.Nullable<System.Int32> tileSize

Tile size in pixels.

System.Nullable<System.Boolean> centre

Center image in tile.

System.String depth

Pyramid depth.

System.String angle

Rotate image during save.

System.String container

Pyramid container type.

System.Nullable<System.Boolean> properties

Write a properties file to the output directory.

System.Nullable<System.Int32> compression

ZIP deflate compression level.

System.String regionShrink

Method to shrink regions.

System.Nullable<System.Int32> skipBlanks

Skip tiles which are nearly equal to the background.

System.Nullable<System.Boolean> noStrip

Don't strip tile metadata.

System.String id

Resource ID.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Returns
Type Description
System.Byte[]

An array of bytes.

Examples
byte[] buffer = in.DzsaveBuffer(basename: string, layout: string, suffix: string, overlap: int, tileSize: int, centre: bool, depth: string, angle: string, container: string, properties: bool, compression: int, regionShrink: string, skipBlanks: int, noStrip: bool, id: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

Embed(Int32, Int32, Int32, Int32, String, Double[])

Embed an image in a larger image.

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

Left edge of input in output.

System.Int32 y

Top edge of input in output.

System.Int32 width

Image width in pixels.

System.Int32 height

Image height in pixels.

System.String extend

How to generate the extra pixels.

System.Double[] background

Color for background pixels.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Embed(x, y, width, height, extend: string, background: double[]);
| Improve this Doc View Source

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.

| Improve this Doc View Source

Equal(Double)

This operation compares two images on equality.

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

A double constant to compare.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Equal(Double[])

This operation compares two images on equality.

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

A double array to compare.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Equal(Int32[])

This operation compares two images on equality.

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

A integer array to compare.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

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
System.Boolean

true if equal; otherwise, false.

| Improve this Doc View Source

Equals(Object)

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

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

The object to compare with the current image.

Returns
Type Description
System.Boolean

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

Overrides
System.Object.Equals(System.Object)
| Improve this Doc View Source

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.

| Improve this Doc View Source

Exp()

Return e ** pixel.

Declaration
public Image Exp()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Exp10()

Return 10 ** pixel.

Declaration
public Image Exp10()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

ExtractArea(Int32, Int32, Int32, Int32)

Extract an area from an image.

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

Left edge of extract area.

System.Int32 top

Top edge of extract area.

System.Int32 width

Width of extract area.

System.Int32 height

Height of extract area.

Returns
Type Description
Image

A new Image.

Examples
Image @out = input.ExtractArea(left, top, width, height);
| Improve this Doc View Source

ExtractBand(Int32, Nullable<Int32>)

Extract band from an image.

Declaration
public Image ExtractBand(int band, int? n = default(int? ))
Parameters
Type Name Description
System.Int32 band

Band to extract.

System.Nullable<System.Int32> n

Number of bands to extract.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.ExtractBand(band, n: int);
| Improve this Doc View Source

Eye(Int32, Int32, Nullable<Boolean>, Nullable<Double>)

Make an image showing the eye's spatial response.

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

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Nullable<System.Boolean> uchar

Output an unsigned char image.

System.Nullable<System.Double> factor

Maximum spatial frequency.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Eye(width, height, uchar: bool, factor: double);
| Improve this Doc View Source

Falsecolour()

False-color an image.

Declaration
public Image Falsecolour()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Falsecolour();
| Improve this Doc View Source

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
Image @out = in.Fastcor(@ref);
| Improve this Doc View Source

FillNearest()

Fill image zeros with nearest non-zero pixel.

Declaration
public Image FillNearest()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.FillNearest();
| Improve this Doc View Source

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
Image @out = in.FillNearest(out var distance);
| Improve this Doc View Source

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
System.String filename

The file to test.

Returns
Type Description
System.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, Nullable<Boolean>, String, Nullable<Boolean>, VOption).

| Improve this Doc View Source

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
System.Byte[] data

The buffer to test.

Returns
Type Description
System.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, String, Nullable<Boolean>, VOption).

| Improve this Doc View Source

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
System.Char[] data

The buffer to test.

Returns
Type Description
System.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, String, Nullable<Boolean>, VOption).

| Improve this Doc View Source

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
System.String data

The buffer to test.

Returns
Type Description
System.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, String, Nullable<Boolean>, VOption).

| Improve this Doc View Source

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
System.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, String, Nullable<Boolean>, VOption).

| Improve this Doc View Source

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
System.IO.Stream stream

The stream to test.

Returns
Type Description
System.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, String, Nullable<Boolean>, VOption).

| Improve this Doc View Source

FindTrim(Nullable<Double>, Double[])

Search an image for non-edge areas.

Declaration
public object[] FindTrim(double? threshold = default(double? ), double[] background = null)
Parameters
Type Name Description
System.Nullable<System.Double> threshold

Object threshold.

System.Double[] background

Color for background pixels.

Returns
Type Description
System.Object[]

An array of objects.

Examples
var output = in.FindTrim(threshold: double, background: double[]);
| Improve this Doc View Source

Fitsload(String, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load a FITS image.

Declaration
public static Image Fitsload(string filename, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Fitsload(filename, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Fitsload(String, Nullable<Boolean>, String, Nullable<Boolean>)

Load a FITS image.

Declaration
public static Image Fitsload(string filename, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Fitsload(filename, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Fitssave(String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to fits file.

Declaration
public void Fitssave(string filename, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String filename

Filename to save to.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Fitssave(filename, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

Flatten(Double[], Nullable<Double>)

Flatten alpha out of an image.

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

Background value.

System.Nullable<System.Double> maxAlpha

Maximum value of alpha channel.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Flatten(background: double[], maxAlpha: double);
| Improve this Doc View Source

Flip(String)

Flip an image.

Declaration
public Image Flip(string direction)
Parameters
Type Name Description
System.String direction

Direction to flip image.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Flip(direction);
| Improve this Doc View Source

FlipHor()

Flip horizontally.

Declaration
public Image FlipHor()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

FlipVer()

Flip vertically.

Declaration
public Image FlipVer()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Float2rad()

Transform float RGB to Radiance coding.

Declaration
public Image Float2rad()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Float2rad();
| Improve this Doc View Source

Floor()

Return the largest integral value not greater than the argument.

Declaration
public Image Floor()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Fractsurf(Int32, Int32, Double)

Make a fractal surface.

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

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Double fractalDimension

Fractal dimension.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Fractsurf(width, height, fractalDimension);
| Improve this Doc View Source

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
Image @out = in.Freqmult(mask);
| Improve this Doc View Source

Fwfft()

Forward FFT.

Declaration
public Image Fwfft()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Fwfft();
| Improve this Doc View Source

Gamma(Nullable<Double>)

Gamma an image.

Declaration
public Image Gamma(double? exponent = default(double? ))
Parameters
Type Name Description
System.Nullable<System.Double> exponent

Gamma factor.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Gamma(exponent: double);
| Improve this Doc View Source

Gaussblur(Double, Nullable<Double>, String)

Gaussian blur.

Declaration
public Image Gaussblur(double sigma, double? minAmpl = default(double? ), string precision = null)
Parameters
Type Name Description
System.Double sigma

Sigma of Gaussian.

System.Nullable<System.Double> minAmpl

Minimum amplitude of Gaussian.

System.String precision

Convolve with this precision.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Gaussblur(sigma, minAmpl: double, precision: string);
| Improve this Doc View Source

Gaussmat(Double, Double, Nullable<Boolean>, String)

Make a gaussian image.

Declaration
public static Image Gaussmat(double sigma, double minAmpl, bool? separable = default(bool? ), string precision = null)
Parameters
Type Name Description
System.Double sigma

Sigma of Gaussian.

System.Double minAmpl

Minimum amplitude of Gaussian.

System.Nullable<System.Boolean> separable

Generate separable Gaussian.

System.String precision

Generate with this precision.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Gaussmat(sigma, minAmpl, separable: bool, precision: string);
| Improve this Doc View Source

Gaussnoise(Int32, Int32, Nullable<Double>, Nullable<Double>)

Make a gaussnoise image.

Declaration
public static Image Gaussnoise(int width, int height, double? sigma = default(double? ), double? mean = default(double? ))
Parameters
Type Name Description
System.Int32 width

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Nullable<System.Double> sigma

Standard deviation of pixels in generated image.

System.Nullable<System.Double> mean

Mean of pixels in generated image.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Gaussnoise(width, height, sigma: double, mean: double);
| Improve this Doc View Source

Get(String)

Get an item of metadata.

Declaration
public override object Get(string name)
Parameters
Type Name Description
System.String name

The name of the piece of metadata to get.

Returns
Type Description
System.Object

The metadata item as a C# value.

Overrides
VipsObject.Get(String)
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.

| Improve this Doc View Source

GetFields()

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

Declaration
public string[] GetFields()
Returns
Type Description
System.String[]

An array of strings or null.

Remarks

At least libvips 8.5 is needed.

| Improve this Doc View Source

GetHashCode()

Serves as the default hash function.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code for the current image.

Overrides
System.Object.GetHashCode()
| Improve this Doc View Source

Getpoint(Int32, Int32)

Read a point from an image.

Declaration
public double[] Getpoint(int x, int y)
Parameters
Type Name Description
System.Int32 x

Point to read.

System.Int32 y

Point to read.

Returns
Type Description
System.Double[]

An array of doubles.

Examples
double[] outArray = in.Getpoint(x, y);
| Improve this Doc View Source

GetTypeOf(String)

Get the GType of an item of metadata.

Declaration
public override IntPtr GetTypeOf(string name)
Parameters
Type Name Description
System.String name

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

Returns
Type Description
System.IntPtr

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

Overrides
VipsObject.GetTypeOf(String)
Remarks

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

| Improve this Doc View Source

Gifload(String, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>)

Load GIF with giflib.

Declaration
public static Image Gifload(string filename, out int flags, int? page = default(int? ), int? n = default(int? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Gifload(filename, out var flags, page: int, n: int, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Gifload(String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>)

Load GIF with giflib.

Declaration
public static Image Gifload(string filename, int? page = default(int? ), int? n = default(int? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Gifload(filename, page: int, n: int, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

GifloadBuffer(Byte[], out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>)

Load GIF with giflib.

Declaration
public static Image GifloadBuffer(byte[] buffer, out int flags, int? page = default(int? ), int? n = default(int? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.GifloadBuffer(buffer, out var flags, page: int, n: int, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

GifloadBuffer(Byte[], Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>)

Load GIF with giflib.

Declaration
public static Image GifloadBuffer(byte[] buffer, int? page = default(int? ), int? n = default(int? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.GifloadBuffer(buffer, page: int, n: int, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

GifloadSource(Source, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>)

Load GIF with giflib.

Declaration
public static Image GifloadSource(Source source, out int flags, int? page = default(int? ), int? n = default(int? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.GifloadSource(source, out var flags, page: int, n: int, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

GifloadSource(Source, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>)

Load GIF with giflib.

Declaration
public static Image GifloadSource(Source source, int? page = default(int? ), int? n = default(int? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.GifloadSource(source, page: int, n: int, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

GifloadStream(Stream, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>)

Load GIF with giflib.

Declaration
public static Image GifloadStream(Stream stream, out int flags, int? page = default(int? ), int? n = default(int? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.GifloadStream(stream, out var flags, page: int, n: int, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

GifloadStream(Stream, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>)

Load GIF with giflib.

Declaration
public static Image GifloadStream(Stream stream, int? page = default(int? ), int? n = default(int? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.GifloadStream(stream, page: int, n: int, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Globalbalance(Nullable<Double>, Nullable<Boolean>)

Global balance an image mosaic.

Declaration
public Image Globalbalance(double? gamma = default(double? ), bool? intOutput = default(bool? ))
Parameters
Type Name Description
System.Nullable<System.Double> gamma

Image gamma.

System.Nullable<System.Boolean> intOutput

Integer output.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Globalbalance(gamma: double, intOutput: bool);
| Improve this Doc View Source

Gravity(String, Int32, Int32, String, Double[])

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

Declaration
public Image Gravity(string direction, int width, int height, string extend = null, double[] background = null)
Parameters
Type Name Description
System.String direction

direction to place image within width/height.

System.Int32 width

Image width in pixels.

System.Int32 height

Image height in pixels.

System.String extend

How to generate the extra pixels.

System.Double[] background

Color for background pixels.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Gravity(direction, width, height, extend: string, background: double[]);
| Improve this Doc View Source

Grey(Int32, Int32, Nullable<Boolean>)

Make a grey ramp image.

Declaration
public static Image Grey(int width, int height, bool? uchar = default(bool? ))
Parameters
Type Name Description
System.Int32 width

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Nullable<System.Boolean> uchar

Output an unsigned char image.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Grey(width, height, uchar: bool);
| Improve this Doc View Source

Grid(Int32, Int32, Int32)

Grid an image.

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

chop into tiles this high.

System.Int32 across

number of tiles across.

System.Int32 down

number of tiles down.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Grid(tileHeight, across, down);
| Improve this Doc View Source

HasAlpha()

Does this image have an alpha channel?

Declaration
public bool HasAlpha()
Returns
Type Description
System.Boolean

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

Remarks

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

| Improve this Doc View Source

Heifload(String, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load a HEIF image.

Declaration
public static Image Heifload(string filename, out int flags, int? page = default(int? ), int? n = default(int? ), bool? thumbnail = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> thumbnail

Fetch thumbnail image.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Heifload(filename, out var flags, page: int, n: int, thumbnail: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Heifload(String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load a HEIF image.

Declaration
public static Image Heifload(string filename, int? page = default(int? ), int? n = default(int? ), bool? thumbnail = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> thumbnail

Fetch thumbnail image.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Heifload(filename, page: int, n: int, thumbnail: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

HeifloadBuffer(Byte[], out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load a HEIF image.

Declaration
public static Image HeifloadBuffer(byte[] buffer, out int flags, int? page = default(int? ), int? n = default(int? ), bool? thumbnail = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> thumbnail

Fetch thumbnail image.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.HeifloadBuffer(buffer, out var flags, page: int, n: int, thumbnail: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

HeifloadBuffer(Byte[], Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load a HEIF image.

Declaration
public static Image HeifloadBuffer(byte[] buffer, int? page = default(int? ), int? n = default(int? ), bool? thumbnail = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> thumbnail

Fetch thumbnail image.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.HeifloadBuffer(buffer, page: int, n: int, thumbnail: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

HeifloadSource(Source, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load a HEIF image.

Declaration
public static Image HeifloadSource(Source source, out int flags, int? page = default(int? ), int? n = default(int? ), bool? thumbnail = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> thumbnail

Fetch thumbnail image.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.HeifloadSource(source, out var flags, page: int, n: int, thumbnail: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

HeifloadSource(Source, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load a HEIF image.

Declaration
public static Image HeifloadSource(Source source, int? page = default(int? ), int? n = default(int? ), bool? thumbnail = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> thumbnail

Fetch thumbnail image.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.HeifloadSource(source, page: int, n: int, thumbnail: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

HeifloadStream(Stream, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load a HEIF image.

Declaration
public static Image HeifloadStream(Stream stream, out int flags, int? page = default(int? ), int? n = default(int? ), bool? thumbnail = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> thumbnail

Fetch thumbnail image.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.HeifloadStream(stream, out var flags, page: int, n: int, thumbnail: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

HeifloadStream(Stream, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load a HEIF image.

Declaration
public static Image HeifloadStream(Stream stream, int? page = default(int? ), int? n = default(int? ), bool? thumbnail = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> thumbnail

Fetch thumbnail image.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.HeifloadStream(stream, page: int, n: int, thumbnail: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Heifsave(String, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image in HEIF format.

Declaration
public void Heifsave(string filename, int? q = default(int? ), bool? lossless = default(bool? ), string compression = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Int32> q

Q factor.

System.Nullable<System.Boolean> lossless

Enable lossless compression.

System.String compression

Compression format.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Heifsave(filename, q: int, lossless: bool, compression: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

HeifsaveBuffer(Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image in HEIF format.

Declaration
public byte[] HeifsaveBuffer(int? q = default(int? ), bool? lossless = default(bool? ), string compression = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> q

Q factor.

System.Nullable<System.Boolean> lossless

Enable lossless compression.

System.String compression

Compression format.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Returns
Type Description
System.Byte[]

An array of bytes.

Examples
byte[] buffer = in.HeifsaveBuffer(q: int, lossless: bool, compression: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

HeifsaveStream(Stream, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image in HEIF format.

Declaration
public void HeifsaveStream(Stream stream, int? q = default(int? ), bool? lossless = default(bool? ), string compression = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to save to.

System.Nullable<System.Int32> q

Q factor.

System.Nullable<System.Boolean> lossless

Enable lossless compression.

System.String compression

Compression format.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.HeifsaveStream(stream, q: int, lossless: bool, compression: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

HeifsaveTarget(Target, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image in HEIF format.

Declaration
public void HeifsaveTarget(Target target, int? q = default(int? ), bool? lossless = default(bool? ), string compression = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
Target target

Target to save to.

System.Nullable<System.Int32> q

Q factor.

System.Nullable<System.Boolean> lossless

Enable lossless compression.

System.String compression

Compression format.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.HeifsaveTarget(target, q: int, lossless: bool, compression: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

HistCum()

Form cumulative histogram.

Declaration
public Image HistCum()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.HistCum();
| Improve this Doc View Source

HistEntropy()

Estimate image entropy.

Declaration
public double HistEntropy()
Returns
Type Description
System.Double

A double.

Examples
double @out = in.HistEntropy();
| Improve this Doc View Source

HistEqual(Nullable<Int32>)

Histogram equalisation.

Declaration
public Image HistEqual(int? band = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> band

Equalise with this band.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.HistEqual(band: int);
| Improve this Doc View Source

HistFind(Nullable<Int32>)

Find image histogram.

Declaration
public Image HistFind(int? band = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> band

Find histogram of band.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.HistFind(band: int);
| Improve this Doc View Source

HistFindIndexed(Image, String)

Find indexed image histogram.

Declaration
public Image HistFindIndexed(Image index, string combine = null)
Parameters
Type Name Description
Image index

Index image.

System.String combine

Combine bins like this.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.HistFindIndexed(index, combine: string);
| Improve this Doc View Source

HistFindNdim(Nullable<Int32>)

Find n-dimensional image histogram.

Declaration
public Image HistFindNdim(int? bins = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> bins

Number of bins in each dimension.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.HistFindNdim(bins: int);
| Improve this Doc View Source

HistIsmonotonic()

Test for monotonicity.

Declaration
public bool HistIsmonotonic()
Returns
Type Description
System.Boolean

A bool.

Examples
bool monotonic = in.HistIsmonotonic();
| Improve this Doc View Source

HistLocal(Int32, Int32, Nullable<Int32>)

Local histogram equalisation.

Declaration
public Image HistLocal(int width, int height, int? maxSlope = default(int? ))
Parameters
Type Name Description
System.Int32 width

Window width in pixels.

System.Int32 height

Window height in pixels.

System.Nullable<System.Int32> maxSlope

Maximum slope (CLAHE).

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.HistLocal(width, height, maxSlope: int);
| Improve this Doc View Source

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
Image @out = in.HistMatch(@ref);
| Improve this Doc View Source

HistNorm()

Normalise histogram.

Declaration
public Image HistNorm()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.HistNorm();
| Improve this Doc View Source

HistPlot()

Plot histogram.

Declaration
public Image HistPlot()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.HistPlot();
| Improve this Doc View Source

HoughCircle(Nullable<Int32>, Nullable<Int32>, Nullable<Int32>)

Find hough circle transform.

Declaration
public Image HoughCircle(int? scale = default(int? ), int? minRadius = default(int? ), int? maxRadius = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> scale

Scale down dimensions by this factor.

System.Nullable<System.Int32> minRadius

Smallest radius to search for.

System.Nullable<System.Int32> maxRadius

Largest radius to search for.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.HoughCircle(scale: int, minRadius: int, maxRadius: int);
| Improve this Doc View Source

HoughLine(Nullable<Int32>, Nullable<Int32>)

Find hough line transform.

Declaration
public Image HoughLine(int? width = default(int? ), int? height = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> width

horizontal size of parameter space.

System.Nullable<System.Int32> height

Vertical size of parameter space.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.HoughLine(width: int, height: int);
| Improve this Doc View Source

HSV2sRGB()

Transform HSV to sRGB.

Declaration
public Image HSV2sRGB()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.HSV2sRGB();
| Improve this Doc View Source

IccExport(String, String, String, Nullable<Int32>)

Output to device with ICC profile.

Declaration
public Image IccExport(string pcs = null, string intent = null, string outputProfile = null, int? depth = default(int? ))
Parameters
Type Name Description
System.String pcs

Set Profile Connection Space.

System.String intent

Rendering intent.

System.String outputProfile

Filename to load output profile from.

System.Nullable<System.Int32> depth

Output device space depth in bits.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.IccExport(pcs: string, intent: string, outputProfile: string, depth: int);
| Improve this Doc View Source

IccImport(String, String, Nullable<Boolean>, String)

Import from device with ICC profile.

Declaration
public Image IccImport(string pcs = null, string intent = null, bool? embedded = default(bool? ), string inputProfile = null)
Parameters
Type Name Description
System.String pcs

Set Profile Connection Space.

System.String intent

Rendering intent.

System.Nullable<System.Boolean> embedded

Use embedded input profile, if available.

System.String inputProfile

Filename to load input profile from.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.IccImport(pcs: string, intent: string, embedded: bool, inputProfile: string);
| Improve this Doc View Source

IccTransform(String, String, String, Nullable<Boolean>, String, Nullable<Int32>)

Transform between devices with ICC profiles.

Declaration
public Image IccTransform(string outputProfile, string pcs = null, string intent = null, bool? embedded = default(bool? ), string inputProfile = null, int? depth = default(int? ))
Parameters
Type Name Description
System.String outputProfile

Filename to load output profile from.

System.String pcs

Set Profile Connection Space.

System.String intent

Rendering intent.

System.Nullable<System.Boolean> embedded

Use embedded input profile, if available.

System.String inputProfile

Filename to load input profile from.

System.Nullable<System.Int32> depth

Output device space depth in bits.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.IccTransform(outputProfile, pcs: string, intent: string, embedded: bool, inputProfile: string, depth: int);
| Improve this Doc View Source

Identity(Nullable<Int32>, Nullable<Boolean>, Nullable<Int32>)

Make a 1D image where pixel values are indexes.

Declaration
public static Image Identity(int? bands = default(int? ), bool? ushort = default(bool? ), int? size = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> bands

Number of bands in LUT.

System.Nullable<System.Boolean> ushort

Create a 16-bit LUT.

System.Nullable<System.Int32> size

Size of 16-bit LUT.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Identity(bands: int, @ushort: bool, size: int);
| Improve this Doc View Source

Ifthenelse(Object, Object, Nullable<Boolean>)

Ifthenelse an image.

Declaration
public Image Ifthenelse(object in1, object in2, bool? blend = default(bool? ))
Parameters
Type Name Description
System.Object in1

Source for TRUE pixels.

System.Object in2

Source for FALSE pixels.

System.Nullable<System.Boolean> blend

Blend smoothly between then and else parts.

Returns
Type Description
Image

A new Image.

Examples
Image @out = cond.Ifthenelse(in1, in2, blend: bool);
| Improve this Doc View Source

Imag()

Return the imaginary part of a complex image.

Declaration
public Image Imag()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

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.

System.Object value

A constant.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Insert(Image, Int32, Int32, Nullable<Boolean>, Double[])

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

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

Sub-image to insert into main image.

System.Int32 x

Left edge of sub in main.

System.Int32 y

Top edge of sub in main.

System.Nullable<System.Boolean> expand

Expand output to hold all of both inputs.

System.Double[] background

Color for new pixels.

Returns
Type Description
Image

A new Image.

Examples
Image @out = main.Insert(sub, x, y, expand: bool, background: double[]);
| Improve this Doc View Source

Invert()

Invert an image.

Declaration
public Image Invert()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Invert();
| Improve this Doc View Source

Invertlut(Nullable<Int32>)

Build an inverted look-up table.

Declaration
public Image Invertlut(int? size = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> size

LUT size to generate.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Invertlut(size: int);
| Improve this Doc View Source

Invfft(Nullable<Boolean>)

Inverse FFT.

Declaration
public Image Invfft(bool? real = default(bool? ))
Parameters
Type Name Description
System.Nullable<System.Boolean> real

Output only the real part of the transform.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Invfft(real: bool);
| Improve this Doc View Source

IsKilled()

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

Declaration
public bool IsKilled()
Returns
Type Description
System.Boolean

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.

| Improve this Doc View Source

Join(Image, String, Nullable<Boolean>, Nullable<Int32>, Double[], String)

Join a pair of images.

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

Second input image.

System.String direction

Join left-right or up-down.

System.Nullable<System.Boolean> expand

Expand output to hold all of both inputs.

System.Nullable<System.Int32> shim

Pixels between images.

System.Double[] background

Colour for new pixels.

System.String align

Align on the low, centre or high coordinate edge.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in1.Join(in2, direction, expand: bool, shim: int, background: double[], align: string);
| Improve this Doc View Source

Jpegload(String, out Int32, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load jpeg from file.

Declaration
public static Image Jpegload(string filename, out int flags, int? shrink = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> shrink

Shrink factor on load.

System.Nullable<System.Boolean> autorotate

Rotate image using exif orientation.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Jpegload(filename, out var flags, shrink: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Jpegload(String, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load jpeg from file.

Declaration
public static Image Jpegload(string filename, int? shrink = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Int32> shrink

Shrink factor on load.

System.Nullable<System.Boolean> autorotate

Rotate image using exif orientation.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Jpegload(filename, shrink: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

JpegloadBuffer(Byte[], out Int32, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load jpeg from buffer.

Declaration
public static Image JpegloadBuffer(byte[] buffer, out int flags, int? shrink = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> shrink

Shrink factor on load.

System.Nullable<System.Boolean> autorotate

Rotate image using exif orientation.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.JpegloadBuffer(buffer, out var flags, shrink: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

JpegloadBuffer(Byte[], Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load jpeg from buffer.

Declaration
public static Image JpegloadBuffer(byte[] buffer, int? shrink = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Nullable<System.Int32> shrink

Shrink factor on load.

System.Nullable<System.Boolean> autorotate

Rotate image using exif orientation.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.JpegloadBuffer(buffer, shrink: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

JpegloadSource(Source, out Int32, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load image from jpeg source.

Declaration
public static Image JpegloadSource(Source source, out int flags, int? shrink = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> shrink

Shrink factor on load.

System.Nullable<System.Boolean> autorotate

Rotate image using exif orientation.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.JpegloadSource(source, out var flags, shrink: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

JpegloadSource(Source, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load image from jpeg source.

Declaration
public static Image JpegloadSource(Source source, int? shrink = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Nullable<System.Int32> shrink

Shrink factor on load.

System.Nullable<System.Boolean> autorotate

Rotate image using exif orientation.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.JpegloadSource(source, shrink: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

JpegloadStream(Stream, out Int32, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load image from jpeg stream.

Declaration
public static Image JpegloadStream(Stream stream, out int flags, int? shrink = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> shrink

Shrink factor on load.

System.Nullable<System.Boolean> autorotate

Rotate image using exif orientation.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.JpegloadStream(stream, out var flags, shrink: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

JpegloadStream(Stream, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load image from jpeg stream.

Declaration
public static Image JpegloadStream(Stream stream, int? shrink = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Nullable<System.Int32> shrink

Shrink factor on load.

System.Nullable<System.Boolean> autorotate

Rotate image using exif orientation.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.JpegloadStream(stream, shrink: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Jpegsave(String, Nullable<Int32>, String, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to jpeg file.

Declaration
public void Jpegsave(string filename, int? q = default(int? ), string profile = null, bool? optimizeCoding = default(bool? ), bool? interlace = default(bool? ), bool? trellisQuant = default(bool? ), bool? overshootDeringing = default(bool? ), bool? optimizeScans = default(bool? ), int? quantTable = default(int? ), string subsampleMode = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String filename

Filename to save to.

System.Nullable<System.Int32> q

Q factor.

System.String profile

ICC profile to embed.

System.Nullable<System.Boolean> optimizeCoding

Compute optimal Huffman coding tables.

System.Nullable<System.Boolean> interlace

Generate an interlaced (progressive) jpeg.

System.Nullable<System.Boolean> trellisQuant

Apply trellis quantisation to each 8x8 block.

System.Nullable<System.Boolean> overshootDeringing

Apply overshooting to samples with extreme values.

System.Nullable<System.Boolean> optimizeScans

Split spectrum of DCT coefficients into separate scans.

System.Nullable<System.Int32> quantTable

Use predefined quantization table with given index.

System.String subsampleMode

Select chroma subsample operation mode.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Jpegsave(filename, q: int, profile: string, optimizeCoding: bool, interlace: bool, trellisQuant: bool, overshootDeringing: bool, optimizeScans: bool, quantTable: int, subsampleMode: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

JpegsaveBuffer(Nullable<Int32>, String, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to jpeg buffer.

Declaration
public byte[] JpegsaveBuffer(int? q = default(int? ), string profile = null, bool? optimizeCoding = default(bool? ), bool? interlace = default(bool? ), bool? trellisQuant = default(bool? ), bool? overshootDeringing = default(bool? ), bool? optimizeScans = default(bool? ), int? quantTable = default(int? ), string subsampleMode = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> q

Q factor.

System.String profile

ICC profile to embed.

System.Nullable<System.Boolean> optimizeCoding

Compute optimal Huffman coding tables.

System.Nullable<System.Boolean> interlace

Generate an interlaced (progressive) jpeg.

System.Nullable<System.Boolean> trellisQuant

Apply trellis quantisation to each 8x8 block.

System.Nullable<System.Boolean> overshootDeringing

Apply overshooting to samples with extreme values.

System.Nullable<System.Boolean> optimizeScans

Split spectrum of DCT coefficients into separate scans.

System.Nullable<System.Int32> quantTable

Use predefined quantization table with given index.

System.String subsampleMode

Select chroma subsample operation mode.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Returns
Type Description
System.Byte[]

An array of bytes.

Examples
byte[] buffer = in.JpegsaveBuffer(q: int, profile: string, optimizeCoding: bool, interlace: bool, trellisQuant: bool, overshootDeringing: bool, optimizeScans: bool, quantTable: int, subsampleMode: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

JpegsaveMime(Nullable<Int32>, String, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to jpeg mime.

Declaration
public void JpegsaveMime(int? q = default(int? ), string profile = null, bool? optimizeCoding = default(bool? ), bool? interlace = default(bool? ), bool? trellisQuant = default(bool? ), bool? overshootDeringing = default(bool? ), bool? optimizeScans = default(bool? ), int? quantTable = default(int? ), string subsampleMode = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> q

Q factor.

System.String profile

ICC profile to embed.

System.Nullable<System.Boolean> optimizeCoding

Compute optimal Huffman coding tables.

System.Nullable<System.Boolean> interlace

Generate an interlaced (progressive) jpeg.

System.Nullable<System.Boolean> trellisQuant

Apply trellis quantisation to each 8x8 block.

System.Nullable<System.Boolean> overshootDeringing

Apply overshooting to samples with extreme values.

System.Nullable<System.Boolean> optimizeScans

Split spectrum of DCT coefficients into separate scans.

System.Nullable<System.Int32> quantTable

Use predefined quantization table with given index.

System.String subsampleMode

Select chroma subsample operation mode.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.JpegsaveMime(q: int, profile: string, optimizeCoding: bool, interlace: bool, trellisQuant: bool, overshootDeringing: bool, optimizeScans: bool, quantTable: int, subsampleMode: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

JpegsaveStream(Stream, Nullable<Int32>, String, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to jpeg stream.

Declaration
public void JpegsaveStream(Stream stream, int? q = default(int? ), string profile = null, bool? optimizeCoding = default(bool? ), bool? interlace = default(bool? ), bool? trellisQuant = default(bool? ), bool? overshootDeringing = default(bool? ), bool? optimizeScans = default(bool? ), int? quantTable = default(int? ), string subsampleMode = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to save to.

System.Nullable<System.Int32> q

Q factor.

System.String profile

ICC profile to embed.

System.Nullable<System.Boolean> optimizeCoding

Compute optimal Huffman coding tables.

System.Nullable<System.Boolean> interlace

Generate an interlaced (progressive) jpeg.

System.Nullable<System.Boolean> trellisQuant

Apply trellis quantisation to each 8x8 block.

System.Nullable<System.Boolean> overshootDeringing

Apply overshooting to samples with extreme values.

System.Nullable<System.Boolean> optimizeScans

Split spectrum of DCT coefficients into separate scans.

System.Nullable<System.Int32> quantTable

Use predefined quantization table with given index.

System.String subsampleMode

Select chroma subsample operation mode.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.JpegsaveStream(stream, q: int, profile: string, optimizeCoding: bool, interlace: bool, trellisQuant: bool, overshootDeringing: bool, optimizeScans: bool, quantTable: int, subsampleMode: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

JpegsaveTarget(Target, Nullable<Int32>, String, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to jpeg target.

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

Target to save to.

System.Nullable<System.Int32> q

Q factor.

System.String profile

ICC profile to embed.

System.Nullable<System.Boolean> optimizeCoding

Compute optimal Huffman coding tables.

System.Nullable<System.Boolean> interlace

Generate an interlaced (progressive) jpeg.

System.Nullable<System.Boolean> trellisQuant

Apply trellis quantisation to each 8x8 block.

System.Nullable<System.Boolean> overshootDeringing

Apply overshooting to samples with extreme values.

System.Nullable<System.Boolean> optimizeScans

Split spectrum of DCT coefficients into separate scans.

System.Nullable<System.Int32> quantTable

Use predefined quantization table with given index.

System.String subsampleMode

Select chroma subsample operation mode.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.JpegsaveTarget(target, q: int, profile: string, optimizeCoding: bool, interlace: bool, trellisQuant: bool, overshootDeringing: bool, optimizeScans: bool, quantTable: int, subsampleMode: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

Lab2LabQ()

Transform float Lab to LabQ coding.

Declaration
public Image Lab2LabQ()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Lab2LabQ();
| Improve this Doc View Source

Lab2LabS()

Transform float Lab to signed short.

Declaration
public Image Lab2LabS()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Lab2LabS();
| Improve this Doc View Source

Lab2LCh()

Transform Lab to LCh.

Declaration
public Image Lab2LCh()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Lab2LCh();
| Improve this Doc View Source

Lab2XYZ(Double[])

Transform CIELAB to XYZ.

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

Color temperature.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Lab2XYZ(temp: double[]);
| Improve this Doc View Source

Labelregions()

Label regions in an image.

Declaration
public Image Labelregions()
Returns
Type Description
Image

A new Image.

Examples
Image mask = in.Labelregions();
| Improve this Doc View Source

Labelregions(out Int32)

Label regions in an image.

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

Number of discrete contigious regions.

Returns
Type Description
Image

A new Image.

Examples
Image mask = in.Labelregions(out var segments);
| Improve this Doc View Source

LabQ2Lab()

Unpack a LabQ image to float Lab.

Declaration
public Image LabQ2Lab()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.LabQ2Lab();
| Improve this Doc View Source

LabQ2LabS()

Unpack a LabQ image to short Lab.

Declaration
public Image LabQ2LabS()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.LabQ2LabS();
| Improve this Doc View Source

LabQ2sRGB()

Convert a LabQ image to sRGB.

Declaration
public Image LabQ2sRGB()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.LabQ2sRGB();
| Improve this Doc View Source

LabS2Lab()

Transform signed short Lab to float.

Declaration
public Image LabS2Lab()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.LabS2Lab();
| Improve this Doc View Source

LabS2LabQ()

Transform short Lab to LabQ coding.

Declaration
public Image LabS2LabQ()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.LabS2LabQ();
| Improve this Doc View Source

LCh2CMC()

Transform LCh to CMC.

Declaration
public Image LCh2CMC()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.LCh2CMC();
| Improve this Doc View Source

LCh2Lab()

Transform LCh to Lab.

Declaration
public Image LCh2Lab()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.LCh2Lab();
| Improve this Doc View Source

Linear(Double[], Double[], Nullable<Boolean>)

Calculate (a * in + b).

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

Multiply by this.

System.Double[] b

Add this.

System.Nullable<System.Boolean> uchar

Output should be uchar.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Linear(a, b, uchar: bool);
| Improve this Doc View Source

Linecache(Nullable<Int32>, String, Nullable<Boolean>, Nullable<Boolean>)

Cache an image as a set of lines.

Declaration
public Image Linecache(int? tileHeight = default(int? ), string access = null, bool? threaded = default(bool? ), bool? persistent = default(bool? ))
Parameters
Type Name Description
System.Nullable<System.Int32> tileHeight

Tile height in pixels.

System.String access

Expected access pattern.

System.Nullable<System.Boolean> threaded

Allow threaded access.

System.Nullable<System.Boolean> persistent

Keep cache between evaluations.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Linecache(tileHeight: int, access: string, threaded: bool, persistent: bool);
| Improve this Doc View Source

Log()

Return the natural log of an image.

Declaration
public Image Log()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Log10()

Return the log base 10 of an image.

Declaration
public Image Log10()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Logmat(Double, Double, Nullable<Boolean>, String)

Make a laplacian of gaussian image.

Declaration
public static Image Logmat(double sigma, double minAmpl, bool? separable = default(bool? ), string precision = null)
Parameters
Type Name Description
System.Double sigma

Radius of Logmatian.

System.Double minAmpl

Minimum amplitude of Logmatian.

System.Nullable<System.Boolean> separable

Generate separable Logmatian.

System.String precision

Generate with this precision.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Logmat(sigma, minAmpl, separable: bool, precision: string);
| Improve this Doc View Source

Magickload(String, out Int32, String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>)

Load file with ImageMagick.

Declaration
public static Image Magickload(string filename, out int flags, string density = null, int? page = default(int? ), int? n = default(int? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.String density

Canvas resolution for rendering vector formats like SVG.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Magickload(filename, out var flags, density: string, page: int, n: int, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Magickload(String, String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>)

Load file with ImageMagick.

Declaration
public static Image Magickload(string filename, string density = null, int? page = default(int? ), int? n = default(int? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.String density

Canvas resolution for rendering vector formats like SVG.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Magickload(filename, density: string, page: int, n: int, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

MagickloadBuffer(Byte[], out Int32, String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>)

Load buffer with ImageMagick.

Declaration
public static Image MagickloadBuffer(byte[] buffer, out int flags, string density = null, int? page = default(int? ), int? n = default(int? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Int32 flags

Flags for this file.

System.String density

Canvas resolution for rendering vector formats like SVG.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MagickloadBuffer(buffer, out var flags, density: string, page: int, n: int, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

MagickloadBuffer(Byte[], String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>)

Load buffer with ImageMagick.

Declaration
public static Image MagickloadBuffer(byte[] buffer, string density = null, int? page = default(int? ), int? n = default(int? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.String density

Canvas resolution for rendering vector formats like SVG.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MagickloadBuffer(buffer, density: string, page: int, n: int, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Magicksave(String, String, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Double[], Nullable<Int32>)

Save file with ImageMagick.

Declaration
public void Magicksave(string filename, string format = null, int? quality = default(int? ), bool? optimizeGifFrames = default(bool? ), bool? optimizeGifTransparency = default(bool? ), bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String filename

Filename to save to.

System.String format

Format to save in.

System.Nullable<System.Int32> quality

Quality to use.

System.Nullable<System.Boolean> optimizeGifFrames

Apply GIF frames optimization.

System.Nullable<System.Boolean> optimizeGifTransparency

Apply GIF transparency optimization.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Magicksave(filename, format: string, quality: int, optimizeGifFrames: bool, optimizeGifTransparency: bool, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

MagicksaveBuffer(String, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to magick buffer.

Declaration
public byte[] MagicksaveBuffer(string format = null, int? quality = default(int? ), bool? optimizeGifFrames = default(bool? ), bool? optimizeGifTransparency = default(bool? ), bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String format

Format to save in.

System.Nullable<System.Int32> quality

Quality to use.

System.Nullable<System.Boolean> optimizeGifFrames

Apply GIF frames optimization.

System.Nullable<System.Boolean> optimizeGifTransparency

Apply GIF transparency optimization.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Returns
Type Description
System.Byte[]

An array of bytes.

Examples
byte[] buffer = in.MagicksaveBuffer(format: string, quality: int, optimizeGifFrames: bool, optimizeGifTransparency: bool, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

Mapim(Image, GObject)

Resample with a map image.

Declaration
public Image Mapim(Image index, GObject interpolate = null)
Parameters
Type Name Description
Image index

Index pixels with this.

GObject interpolate

Interpolate pixels with this.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Mapim(index, interpolate: GObject);
| Improve this Doc View Source

Maplut(Image, Nullable<Int32>)

Map an image though a lut.

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

Look-up table image.

System.Nullable<System.Int32> band

apply one-band lut to this band of in.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Maplut(lut, band: int);
| Improve this Doc View Source

MaskButterworth(Int32, Int32, Double, Double, Double, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>)

Make a butterworth filter.

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

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Double order

Filter order.

System.Double frequencyCutoff

Frequency cutoff.

System.Double amplitudeCutoff

Amplitude cutoff.

System.Nullable<System.Boolean> uchar

Output an unsigned char image.

System.Nullable<System.Boolean> nodc

Remove DC component.

System.Nullable<System.Boolean> reject

Invert the sense of the filter.

System.Nullable<System.Boolean> optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MaskButterworth(width, height, order, frequencyCutoff, amplitudeCutoff, uchar: bool, nodc: bool, reject: bool, optical: bool);
| Improve this Doc View Source

MaskButterworthBand(Int32, Int32, Double, Double, Double, Double, Double, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>)

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 = default(bool? ), bool? nodc = default(bool? ), bool? reject = default(bool? ), bool? optical = default(bool? ))
Parameters
Type Name Description
System.Int32 width

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Double order

Filter order.

System.Double frequencyCutoffX

Frequency cutoff x.

System.Double frequencyCutoffY

Frequency cutoff y.

System.Double radius

radius of circle.

System.Double amplitudeCutoff

Amplitude cutoff.

System.Nullable<System.Boolean> uchar

Output an unsigned char image.

System.Nullable<System.Boolean> nodc

Remove DC component.

System.Nullable<System.Boolean> reject

Invert the sense of the filter.

System.Nullable<System.Boolean> optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MaskButterworthBand(width, height, order, frequencyCutoffX, frequencyCutoffY, radius, amplitudeCutoff, uchar: bool, nodc: bool, reject: bool, optical: bool);
| Improve this Doc View Source

MaskButterworthRing(Int32, Int32, Double, Double, Double, Double, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>)

Make a butterworth ring filter.

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

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Double order

Filter order.

System.Double frequencyCutoff

Frequency cutoff.

System.Double amplitudeCutoff

Amplitude cutoff.

System.Double ringwidth

Ringwidth.

System.Nullable<System.Boolean> uchar

Output an unsigned char image.

System.Nullable<System.Boolean> nodc

Remove DC component.

System.Nullable<System.Boolean> reject

Invert the sense of the filter.

System.Nullable<System.Boolean> optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MaskButterworthRing(width, height, order, frequencyCutoff, amplitudeCutoff, ringwidth, uchar: bool, nodc: bool, reject: bool, optical: bool);
| Improve this Doc View Source

MaskFractal(Int32, Int32, Double, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>)

Make fractal filter.

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

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Double fractalDimension

Fractal dimension.

System.Nullable<System.Boolean> uchar

Output an unsigned char image.

System.Nullable<System.Boolean> nodc

Remove DC component.

System.Nullable<System.Boolean> reject

Invert the sense of the filter.

System.Nullable<System.Boolean> optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MaskFractal(width, height, fractalDimension, uchar: bool, nodc: bool, reject: bool, optical: bool);
| Improve this Doc View Source

MaskGaussian(Int32, Int32, Double, Double, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>)

Make a gaussian filter.

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

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Double frequencyCutoff

Frequency cutoff.

System.Double amplitudeCutoff

Amplitude cutoff.

System.Nullable<System.Boolean> uchar

Output an unsigned char image.

System.Nullable<System.Boolean> nodc

Remove DC component.

System.Nullable<System.Boolean> reject

Invert the sense of the filter.

System.Nullable<System.Boolean> optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MaskGaussian(width, height, frequencyCutoff, amplitudeCutoff, uchar: bool, nodc: bool, reject: bool, optical: bool);
| Improve this Doc View Source

MaskGaussianBand(Int32, Int32, Double, Double, Double, Double, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>)

Make a gaussian filter.

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

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Double frequencyCutoffX

Frequency cutoff x.

System.Double frequencyCutoffY

Frequency cutoff y.

System.Double radius

radius of circle.

System.Double amplitudeCutoff

Amplitude cutoff.

System.Nullable<System.Boolean> uchar

Output an unsigned char image.

System.Nullable<System.Boolean> nodc

Remove DC component.

System.Nullable<System.Boolean> reject

Invert the sense of the filter.

System.Nullable<System.Boolean> optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MaskGaussianBand(width, height, frequencyCutoffX, frequencyCutoffY, radius, amplitudeCutoff, uchar: bool, nodc: bool, reject: bool, optical: bool);
| Improve this Doc View Source

MaskGaussianRing(Int32, Int32, Double, Double, Double, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>)

Make a gaussian ring filter.

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

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Double frequencyCutoff

Frequency cutoff.

System.Double amplitudeCutoff

Amplitude cutoff.

System.Double ringwidth

Ringwidth.

System.Nullable<System.Boolean> uchar

Output an unsigned char image.

System.Nullable<System.Boolean> nodc

Remove DC component.

System.Nullable<System.Boolean> reject

Invert the sense of the filter.

System.Nullable<System.Boolean> optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MaskGaussianRing(width, height, frequencyCutoff, amplitudeCutoff, ringwidth, uchar: bool, nodc: bool, reject: bool, optical: bool);
| Improve this Doc View Source

MaskIdeal(Int32, Int32, Double, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>)

Make an ideal filter.

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

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Double frequencyCutoff

Frequency cutoff.

System.Nullable<System.Boolean> uchar

Output an unsigned char image.

System.Nullable<System.Boolean> nodc

Remove DC component.

System.Nullable<System.Boolean> reject

Invert the sense of the filter.

System.Nullable<System.Boolean> optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MaskIdeal(width, height, frequencyCutoff, uchar: bool, nodc: bool, reject: bool, optical: bool);
| Improve this Doc View Source

MaskIdealBand(Int32, Int32, Double, Double, Double, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>)

Make an ideal band filter.

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

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Double frequencyCutoffX

Frequency cutoff x.

System.Double frequencyCutoffY

Frequency cutoff y.

System.Double radius

radius of circle.

System.Nullable<System.Boolean> uchar

Output an unsigned char image.

System.Nullable<System.Boolean> nodc

Remove DC component.

System.Nullable<System.Boolean> reject

Invert the sense of the filter.

System.Nullable<System.Boolean> optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MaskIdealBand(width, height, frequencyCutoffX, frequencyCutoffY, radius, uchar: bool, nodc: bool, reject: bool, optical: bool);
| Improve this Doc View Source

MaskIdealRing(Int32, Int32, Double, Double, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>)

Make an ideal ring filter.

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

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Double frequencyCutoff

Frequency cutoff.

System.Double ringwidth

Ringwidth.

System.Nullable<System.Boolean> uchar

Output an unsigned char image.

System.Nullable<System.Boolean> nodc

Remove DC component.

System.Nullable<System.Boolean> reject

Invert the sense of the filter.

System.Nullable<System.Boolean> optical

Rotate quadrants to optical space.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MaskIdealRing(width, height, frequencyCutoff, ringwidth, uchar: bool, nodc: bool, reject: bool, optical: bool);
| Improve this Doc View Source

Match(Image, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, 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 = default(int? ), int? harea = default(int? ), bool? search = default(bool? ), GObject interpolate = null)
Parameters
Type Name Description
Image sec

Secondary image.

System.Int32 xr1

Position of first reference tie-point.

System.Int32 yr1

Position of first reference tie-point.

System.Int32 xs1

Position of first secondary tie-point.

System.Int32 ys1

Position of first secondary tie-point.

System.Int32 xr2

Position of second reference tie-point.

System.Int32 yr2

Position of second reference tie-point.

System.Int32 xs2

Position of second secondary tie-point.

System.Int32 ys2

Position of second secondary tie-point.

System.Nullable<System.Int32> hwindow

Half window size.

System.Nullable<System.Int32> harea

Half area size.

System.Nullable<System.Boolean> search

Search to improve tie-points.

GObject interpolate

Interpolate pixels with this.

Returns
Type Description
Image

A new Image.

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

Math(String)

Apply a math operation to an image.

Declaration
public Image Math(string math)
Parameters
Type Name Description
System.String math

math to perform.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Math(math);
| Improve this Doc View Source

Math2(Image, String)

Binary math operations.

Declaration
public Image Math2(Image right, string math2)
Parameters
Type Name Description
Image right

Right-hand image argument.

System.String math2

math to perform.

Returns
Type Description
Image

A new Image.

Examples
Image @out = left.Math2(right, math2);
| Improve this Doc View Source

Math2Const(String, Double[])

Binary math operations with a constant.

Declaration
public Image Math2Const(string math2, double[] c)
Parameters
Type Name Description
System.String math2

math to perform.

System.Double[] c

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Math2Const(math2, c);
| Improve this Doc View Source

Matload(String, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load mat from file.

Declaration
public static Image Matload(string filename, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Matload(filename, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Matload(String, Nullable<Boolean>, String, Nullable<Boolean>)

Load mat from file.

Declaration
public static Image Matload(string filename, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Matload(filename, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Matrixinvert()

Invert an matrix.

Declaration
public Image Matrixinvert()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Matrixinvert();
| Improve this Doc View Source

Matrixload(String, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load matrix.

Declaration
public static Image Matrixload(string filename, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Matrixload(filename, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Matrixload(String, Nullable<Boolean>, String, Nullable<Boolean>)

Load matrix.

Declaration
public static Image Matrixload(string filename, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Matrixload(filename, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

MatrixloadSource(Source, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load matrix.

Declaration
public static Image MatrixloadSource(Source source, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MatrixloadSource(source, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

MatrixloadSource(Source, Nullable<Boolean>, String, Nullable<Boolean>)

Load matrix.

Declaration
public static Image MatrixloadSource(Source source, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MatrixloadSource(source, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

MatrixloadStream(Stream, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load matrix.

Declaration
public static Image MatrixloadStream(Stream stream, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MatrixloadStream(stream, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

MatrixloadStream(Stream, Nullable<Boolean>, String, Nullable<Boolean>)

Load matrix.

Declaration
public static Image MatrixloadStream(Stream stream, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.MatrixloadStream(stream, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Matrixprint(Nullable<Boolean>, Double[], Nullable<Int32>)

Print matrix.

Declaration
public void Matrixprint(bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Matrixprint(strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

Matrixsave(String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to matrix.

Declaration
public void Matrixsave(string filename, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String filename

Filename to save to.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Matrixsave(filename, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

MatrixsaveStream(Stream, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to matrix.

Declaration
public void MatrixsaveStream(Stream stream, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to save to.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.MatrixsaveStream(stream, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

MatrixsaveTarget(Target, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to matrix.

Declaration
public void MatrixsaveTarget(Target target, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
Target target

Target to save to.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.MatrixsaveTarget(target, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

Max(out Int32, out Int32, out Double[], out Int32[], out Int32[], Nullable<Int32>)

Find image maximum.

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

Horizontal position of maximum.

System.Int32 y

Vertical position of maximum.

System.Double[] outArray

Array of output values.

System.Int32[] xArray

Array of horizontal positions.

System.Int32[] yArray

Array of vertical positions.

System.Nullable<System.Int32> size

Number of maximum values to find.

Returns
Type Description
System.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);
| Improve this Doc View Source

Max(out Int32, out Int32, out Double[], out Int32[], Nullable<Int32>)

Find image maximum.

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

Horizontal position of maximum.

System.Int32 y

Vertical position of maximum.

System.Double[] outArray

Array of output values.

System.Int32[] xArray

Array of horizontal positions.

System.Nullable<System.Int32> size

Number of maximum values to find.

Returns
Type Description
System.Double

A double.

Examples
double @out = in.Max(out var x, out var y, out var outArray, out var xArray, size: int);
| Improve this Doc View Source

Max(out Int32, out Int32, out Double[], Nullable<Int32>)

Find image maximum.

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

Horizontal position of maximum.

System.Int32 y

Vertical position of maximum.

System.Double[] outArray

Array of output values.

System.Nullable<System.Int32> size

Number of maximum values to find.

Returns
Type Description
System.Double

A double.

Examples
double @out = in.Max(out var x, out var y, out var outArray, size: int);
| Improve this Doc View Source

Max(out Int32, out Int32, Nullable<Int32>)

Find image maximum.

Declaration
public double Max(out int x, out int y, int? size = default(int? ))
Parameters
Type Name Description
System.Int32 x

Horizontal position of maximum.

System.Int32 y

Vertical position of maximum.

System.Nullable<System.Int32> size

Number of maximum values to find.

Returns
Type Description
System.Double

A double.

Examples
double @out = in.Max(out var x, out var y, size: int);
| Improve this Doc View Source

Max(out Int32, Nullable<Int32>)

Find image maximum.

Declaration
public double Max(out int x, int? size = default(int? ))
Parameters
Type Name Description
System.Int32 x

Horizontal position of maximum.

System.Nullable<System.Int32> size

Number of maximum values to find.

Returns
Type Description
System.Double

A double.

Examples
double @out = in.Max(out var x, size: int);
| Improve this Doc View Source

Max(Nullable<Int32>)

Find image maximum.

Declaration
public double Max(int? size = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> size

Number of maximum values to find.

Returns
Type Description
System.Double

A double.

Examples
double @out = in.Max(size: int);
| Improve this Doc View Source

MaxPos()

Return the coordinates of the image maximum.

Declaration
public double[] MaxPos()
Returns
Type Description
System.Double[]

An array of doubles.

| Improve this Doc View Source

Measure(Int32, Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>)

Measure a set of patches on a color chart.

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

Number of patches across chart.

System.Int32 v

Number of patches down chart.

System.Nullable<System.Int32> left

Left edge of extract area.

System.Nullable<System.Int32> top

Top edge of extract area.

System.Nullable<System.Int32> width

Width of extract area.

System.Nullable<System.Int32> height

Height of extract area.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Measure(h, v, left: int, top: int, width: int, height: int);
| Improve this Doc View Source

Median(Int32)

size x size median filter.

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

The median filter.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Merge(Image, String, Int32, Int32, Nullable<Int32>)

Merge two images.

Declaration
public Image Merge(Image sec, string direction, int dx, int dy, int? mblend = default(int? ))
Parameters
Type Name Description
Image sec

Secondary image.

System.String direction

Horizontal or vertical merge.

System.Int32 dx

Horizontal displacement from sec to ref.

System.Int32 dy

Vertical displacement from sec to ref.

System.Nullable<System.Int32> mblend

Maximum blend size.

Returns
Type Description
Image

A new Image.

Examples
Image @out = ref.Merge(sec, direction, dx, dy, mblend: int);
| Improve this Doc View Source

Min(out Int32, out Int32, out Double[], out Int32[], out Int32[], Nullable<Int32>)

Find image minimum.

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

Horizontal position of minimum.

System.Int32 y

Vertical position of minimum.

System.Double[] outArray

Array of output values.

System.Int32[] xArray

Array of horizontal positions.

System.Int32[] yArray

Array of vertical positions.

System.Nullable<System.Int32> size

Number of minimum values to find.

Returns
Type Description
System.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);
| Improve this Doc View Source

Min(out Int32, out Int32, out Double[], out Int32[], Nullable<Int32>)

Find image minimum.

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

Horizontal position of minimum.

System.Int32 y

Vertical position of minimum.

System.Double[] outArray

Array of output values.

System.Int32[] xArray

Array of horizontal positions.

System.Nullable<System.Int32> size

Number of minimum values to find.

Returns
Type Description
System.Double

A double.

Examples
double @out = in.Min(out var x, out var y, out var outArray, out var xArray, size: int);
| Improve this Doc View Source

Min(out Int32, out Int32, out Double[], Nullable<Int32>)

Find image minimum.

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

Horizontal position of minimum.

System.Int32 y

Vertical position of minimum.

System.Double[] outArray

Array of output values.

System.Nullable<System.Int32> size

Number of minimum values to find.

Returns
Type Description
System.Double

A double.

Examples
double @out = in.Min(out var x, out var y, out var outArray, size: int);
| Improve this Doc View Source

Min(out Int32, out Int32, Nullable<Int32>)

Find image minimum.

Declaration
public double Min(out int x, out int y, int? size = default(int? ))
Parameters
Type Name Description
System.Int32 x

Horizontal position of minimum.

System.Int32 y

Vertical position of minimum.

System.Nullable<System.Int32> size

Number of minimum values to find.

Returns
Type Description
System.Double

A double.

Examples
double @out = in.Min(out var x, out var y, size: int);
| Improve this Doc View Source

Min(out Int32, Nullable<Int32>)

Find image minimum.

Declaration
public double Min(out int x, int? size = default(int? ))
Parameters
Type Name Description
System.Int32 x

Horizontal position of minimum.

System.Nullable<System.Int32> size

Number of minimum values to find.

Returns
Type Description
System.Double

A double.

Examples
double @out = in.Min(out var x, size: int);
| Improve this Doc View Source

Min(Nullable<Int32>)

Find image minimum.

Declaration
public double Min(int? size = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> size

Number of minimum values to find.

Returns
Type Description
System.Double

A double.

Examples
double @out = in.Min(size: int);
| Improve this Doc View Source

MinPos()

Return the coordinates of the image minimum.

Declaration
public double[] MinPos()
Returns
Type Description
System.Double[]

An array of doubles.

| Improve this Doc View Source

Morph(Image, String)

Morphology operation.

Declaration
public Image Morph(Image mask, string morph)
Parameters
Type Name Description
Image mask

Input matrix image.

System.String morph

Morphological operation to perform.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Morph(mask, morph);
| Improve this Doc View Source

Mosaic(Image, String, Int32, Int32, Int32, Int32, out Int32, out Int32, out Double, out Double, out Double, out Double, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>)

Mosaic two images.

Declaration
public Image Mosaic(Image sec, string 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 = default(int? ), int? harea = default(int? ), int? mblend = default(int? ), int? bandno = default(int? ))
Parameters
Type Name Description
Image sec

Secondary image.

System.String direction

Horizontal or vertical mosaic.

System.Int32 xref

Position of reference tie-point.

System.Int32 yref

Position of reference tie-point.

System.Int32 xsec

Position of secondary tie-point.

System.Int32 ysec

Position of secondary tie-point.

System.Int32 dx0

Detected integer offset.

System.Int32 dy0

Detected integer offset.

System.Double scale1

Detected scale.

System.Double angle1

Detected rotation.

System.Double dy1

Detected first-order displacement.

System.Double dx1

Detected first-order displacement.

System.Nullable<System.Int32> hwindow

Half window size.

System.Nullable<System.Int32> harea

Half area size.

System.Nullable<System.Int32> mblend

Maximum blend size.

System.Nullable<System.Int32> bandno

Band to search for features on.

Returns
Type Description
Image

A new Image.

Examples
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);
| Improve this Doc View Source

Mosaic(Image, String, Int32, Int32, Int32, Int32, out Int32, out Int32, out Double, out Double, out Double, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>)

Mosaic two images.

Declaration
public Image Mosaic(Image sec, string 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 = default(int? ), int? harea = default(int? ), int? mblend = default(int? ), int? bandno = default(int? ))
Parameters
Type Name Description
Image sec

Secondary image.

System.String direction

Horizontal or vertical mosaic.

System.Int32 xref

Position of reference tie-point.

System.Int32 yref

Position of reference tie-point.

System.Int32 xsec

Position of secondary tie-point.

System.Int32 ysec

Position of secondary tie-point.

System.Int32 dx0

Detected integer offset.

System.Int32 dy0

Detected integer offset.

System.Double scale1

Detected scale.

System.Double angle1

Detected rotation.

System.Double dy1

Detected first-order displacement.

System.Nullable<System.Int32> hwindow

Half window size.

System.Nullable<System.Int32> harea

Half area size.

System.Nullable<System.Int32> mblend

Maximum blend size.

System.Nullable<System.Int32> bandno

Band to search for features on.

Returns
Type Description
Image

A new Image.

Examples
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);
| Improve this Doc View Source

Mosaic(Image, String, Int32, Int32, Int32, Int32, out Int32, out Int32, out Double, out Double, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>)

Mosaic two images.

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

Secondary image.

System.String direction

Horizontal or vertical mosaic.

System.Int32 xref

Position of reference tie-point.

System.Int32 yref

Position of reference tie-point.

System.Int32 xsec

Position of secondary tie-point.

System.Int32 ysec

Position of secondary tie-point.

System.Int32 dx0

Detected integer offset.

System.Int32 dy0

Detected integer offset.

System.Double scale1

Detected scale.

System.Double angle1

Detected rotation.

System.Nullable<System.Int32> hwindow

Half window size.

System.Nullable<System.Int32> harea

Half area size.

System.Nullable<System.Int32> mblend

Maximum blend size.

System.Nullable<System.Int32> bandno

Band to search for features on.

Returns
Type Description
Image

A new Image.

Examples
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);
| Improve this Doc View Source

Mosaic(Image, String, Int32, Int32, Int32, Int32, out Int32, out Int32, out Double, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>)

Mosaic two images.

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

Secondary image.

System.String direction

Horizontal or vertical mosaic.

System.Int32 xref

Position of reference tie-point.

System.Int32 yref

Position of reference tie-point.

System.Int32 xsec

Position of secondary tie-point.

System.Int32 ysec

Position of secondary tie-point.

System.Int32 dx0

Detected integer offset.

System.Int32 dy0

Detected integer offset.

System.Double scale1

Detected scale.

System.Nullable<System.Int32> hwindow

Half window size.

System.Nullable<System.Int32> harea

Half area size.

System.Nullable<System.Int32> mblend

Maximum blend size.

System.Nullable<System.Int32> bandno

Band to search for features on.

Returns
Type Description
Image

A new Image.

Examples
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);
| Improve this Doc View Source

Mosaic(Image, String, Int32, Int32, Int32, Int32, out Int32, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>)

Mosaic two images.

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

Secondary image.

System.String direction

Horizontal or vertical mosaic.

System.Int32 xref

Position of reference tie-point.

System.Int32 yref

Position of reference tie-point.

System.Int32 xsec

Position of secondary tie-point.

System.Int32 ysec

Position of secondary tie-point.

System.Int32 dx0

Detected integer offset.

System.Int32 dy0

Detected integer offset.

System.Nullable<System.Int32> hwindow

Half window size.

System.Nullable<System.Int32> harea

Half area size.

System.Nullable<System.Int32> mblend

Maximum blend size.

System.Nullable<System.Int32> bandno

Band to search for features on.

Returns
Type Description
Image

A new Image.

Examples
Image @out = ref.Mosaic(sec, direction, xref, yref, xsec, ysec, out var dx0, out var dy0, hwindow: int, harea: int, mblend: int, bandno: int);
| Improve this Doc View Source

Mosaic(Image, String, Int32, Int32, Int32, Int32, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>)

Mosaic two images.

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

Secondary image.

System.String direction

Horizontal or vertical mosaic.

System.Int32 xref

Position of reference tie-point.

System.Int32 yref

Position of reference tie-point.

System.Int32 xsec

Position of secondary tie-point.

System.Int32 ysec

Position of secondary tie-point.

System.Int32 dx0

Detected integer offset.

System.Nullable<System.Int32> hwindow

Half window size.

System.Nullable<System.Int32> harea

Half area size.

System.Nullable<System.Int32> mblend

Maximum blend size.

System.Nullable<System.Int32> bandno

Band to search for features on.

Returns
Type Description
Image

A new Image.

Examples
Image @out = ref.Mosaic(sec, direction, xref, yref, xsec, ysec, out var dx0, hwindow: int, harea: int, mblend: int, bandno: int);
| Improve this Doc View Source

Mosaic(Image, String, Int32, Int32, Int32, Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>)

Mosaic two images.

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

Secondary image.

System.String direction

Horizontal or vertical mosaic.

System.Int32 xref

Position of reference tie-point.

System.Int32 yref

Position of reference tie-point.

System.Int32 xsec

Position of secondary tie-point.

System.Int32 ysec

Position of secondary tie-point.

System.Nullable<System.Int32> hwindow

Half window size.

System.Nullable<System.Int32> harea

Half area size.

System.Nullable<System.Int32> mblend

Maximum blend size.

System.Nullable<System.Int32> bandno

Band to search for features on.

Returns
Type Description
Image

A new Image.

Examples
Image @out = ref.Mosaic(sec, direction, xref, yref, xsec, ysec, hwindow: int, harea: int, mblend: int, bandno: int);
| Improve this Doc View Source

Mosaic1(Image, String, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, GObject, Nullable<Int32>, Nullable<Int32>)

First-order mosaic of two images.

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

Secondary image.

System.String direction

Horizontal or vertical mosaic.

System.Int32 xr1

Position of first reference tie-point.

System.Int32 yr1

Position of first reference tie-point.

System.Int32 xs1

Position of first secondary tie-point.

System.Int32 ys1

Position of first secondary tie-point.

System.Int32 xr2

Position of second reference tie-point.

System.Int32 yr2

Position of second reference tie-point.

System.Int32 xs2

Position of second secondary tie-point.

System.Int32 ys2

Position of second secondary tie-point.

System.Nullable<System.Int32> hwindow

Half window size.

System.Nullable<System.Int32> harea

Half area size.

System.Nullable<System.Boolean> search

Search to improve tie-points.

GObject interpolate

Interpolate pixels with this.

System.Nullable<System.Int32> mblend

Maximum blend size.

System.Nullable<System.Int32> bandno

Band to search for features on.

Returns
Type Description
Image

A new Image.

Examples
Image @out = ref.Mosaic1(sec, direction, xr1, yr1, xs1, ys1, xr2, yr2, xs2, ys2, hwindow: int, harea: int, search: bool, interpolate: GObject, mblend: int, bandno: int);
| Improve this Doc View Source

Msb(Nullable<Int32>)

Pick most-significant byte from an image.

Declaration
public Image Msb(int? band = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> band

Band to msb.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Msb(band: int);
| Improve this Doc View Source

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
Image @out = left.Multiply(right);
| Improve this Doc View Source

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.

System.Double scale

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

System.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 image are useful with the libvips convolution operator Conv(Image, String, Nullable<Int32>, Nullable<Int32>).

Exceptions
Type Condition
VipsException

If unable to make image from array.

| Improve this Doc View Source

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.

System.Double scale

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

System.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 image are useful with the libvips convolution operator Conv(Image, String, Nullable<Int32>, Nullable<Int32>).

Exceptions
Type Condition
VipsException

If unable to make image from array.

| Improve this Doc View Source

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.

System.Double scale

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

System.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 image are useful with the libvips convolution operator Conv(Image, String, Nullable<Int32>, Nullable<Int32>).

Exceptions
Type Condition
VipsException

If unable to make image from array.

| Improve this Doc View Source

NewFromBuffer(Byte[], String, String, Nullable<Boolean>, VOption)

Load a formatted image from memory.

Declaration
public static Image NewFromBuffer(byte[] data, string strOptions = "", string access = null, bool? fail = default(bool? ), VOption kwargs = null)
Parameters
Type Name Description
System.Byte[] data

The memory object to load the image from.

System.String strOptions

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

System.String access

Hint the expected access pattern for the image. See Enums.Access.

System.Nullable<System.Boolean> fail

If set True, the loader will fail with an error on the first serious error in the file. By default, libvips will attempt to read everything it can from a damaged image.

VOption kwargs

Optional options that depend on the load operation.

Returns
Type Description
Image

A new Image.

Remarks

This behaves exactly as NewFromFile(String, Nullable<Boolean>, String, Nullable<Boolean>, 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.

| Improve this Doc View Source

NewFromBuffer(Char[], String, String, Nullable<Boolean>, VOption)

Load a formatted image from memory.

Declaration
public static Image NewFromBuffer(char[] data, string strOptions = "", string access = null, bool? fail = default(bool? ), VOption kwargs = null)
Parameters
Type Name Description
System.Char[] data

The memory object to load the image from.

System.String strOptions

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

System.String access

Hint the expected access pattern for the image.

System.Nullable<System.Boolean> fail

If set True, the loader will fail with an error on the first serious error in the file. By default, libvips will attempt to read everything it can from a damaged image.

VOption kwargs

Optional options that depend on the load operation.

Returns
Type Description
Image

A new Image.

Remarks

This behaves exactly as NewFromFile(String, Nullable<Boolean>, String, Nullable<Boolean>, 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.

| Improve this Doc View Source

NewFromBuffer(String, String, String, Nullable<Boolean>, VOption)

Load a formatted image from memory.

Declaration
public static Image NewFromBuffer(string data, string strOptions = "", string access = null, bool? fail = default(bool? ), VOption kwargs = null)
Parameters
Type Name Description
System.String data

The memory object to load the image from.

System.String strOptions

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

System.String access

Hint the expected access pattern for the image.

System.Nullable<System.Boolean> fail

If set True, the loader will fail with an error on the first serious error in the file. By default, libvips will attempt to read everything it can from a damaged image.

VOption kwargs

Optional options that depend on the load operation.

Returns
Type Description
Image

A new Image.

Remarks

This behaves exactly as NewFromFile(String, Nullable<Boolean>, String, Nullable<Boolean>, 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.

| Improve this Doc View Source

NewFromFile(String, Nullable<Boolean>, String, Nullable<Boolean>, VOption)

Load an image from a file.

Declaration
public static Image NewFromFile(string vipsFilename, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ), VOption kwargs = null)
Parameters
Type Name Description
System.String vipsFilename

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

System.Nullable<System.Boolean> 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.

System.String access

Hint the expected access pattern for the image.

System.Nullable<System.Boolean> fail

If set to true, the loader will fail with an error on the first serious error in the file. By default, libvips will attempt to read everything it can from a damaged image.

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:

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

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

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

NewFromImage(Double[])

Make a new image from an existing one.

Declaration
public Image NewFromImage(params double[] doubles)
Parameters
Type Name Description
System.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.

| Improve this Doc View Source

NewFromImage(Int32[])

Make a new image from an existing one.

Declaration
public Image NewFromImage(params int[] ints)
Parameters
Type Name Description
System.Int32[] 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.

| Improve this Doc View Source

NewFromMemory(Array, Int32, Int32, Int32, String)

Wrap an image around a memory array.

Declaration
public static Image NewFromMemory(Array data, int width, int height, int bands, string format)
Parameters
Type Name Description
System.Array data

A memory object.

System.Int32 width

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Int32 bands

Number of bands.

System.String format

Band format.

Returns
Type Description
Image

A new Image.

Remarks

Wraps an Image around an area of memory containing a C-style 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:

var image = Image.NewFromMemory(data, 2, 2, 1, "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(Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, String, String, String, Nullable<Double>, Nullable<Double>, Nullable<Int32>, Nullable<Int32>) to set other image attributes.

Exceptions
Type Condition
VipsException

If unable to make image from data.

| Improve this Doc View Source

NewFromMemoryCopy(IntPtr, UInt64, Int32, Int32, Int32, String)

Like NewFromMemory(Array, Int32, Int32, Int32, String), but VIPS 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(IntPtr data, ulong size, int width, int height, int bands, string format)
Parameters
Type Name Description
System.IntPtr data

A unmanaged block of memory.

System.UInt64 size

Length of memory.

System.Int32 width

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Int32 bands

Number of bands.

System.String format

Band format.

Returns
Type Description
Image

A new Image.

Exceptions
Type Condition
VipsException

If unable to make image from data.

| Improve this Doc View Source

NewFromSource(Source, String, String, Nullable<Boolean>, VOption)

Load a formatted image from a source.

Declaration
public static Image NewFromSource(Source source, string strOptions = "", string access = null, bool? fail = default(bool? ), VOption kwargs = null)
Parameters
Type Name Description
Source source

The source to load the image from.

System.String strOptions

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

System.String access

Hint the expected access pattern for the image.

System.Nullable<System.Boolean> fail

If set True, the loader will fail with an error on the first serious error in the file. By default, libvips will attempt to read everything it can from a damaged image.

VOption kwargs

Optional options that depend on the load operation.

Returns
Type Description
Image

A new Image.

Remarks

This behaves exactly as NewFromFile(String, Nullable<Boolean>, String, Nullable<Boolean>, 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.

| Improve this Doc View Source

NewFromStream(Stream, String, String, Nullable<Boolean>, VOption)

Load a formatted image from a stream.

Declaration
public static Image NewFromStream(Stream stream, string strOptions = "", string access = null, bool? fail = default(bool? ), VOption kwargs = null)
Parameters
Type Name Description
System.IO.Stream stream

The stream to load the image from.

System.String strOptions

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

System.String access

Hint the expected access pattern for the image.

System.Nullable<System.Boolean> fail

If set True, the loader will fail with an error on the first serious error in the file. By default, libvips will attempt to read everything it can from a damaged image.

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, String, Nullable<Boolean>, 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.

| Improve this Doc View Source

NewTempFile(String)

Make a new temporary image.

Declaration
public static Image NewTempFile(string format)
Parameters
Type Name Description
System.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.

| Improve this Doc View Source

Niftiload(String, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load a NIFTI image.

Declaration
public static Image Niftiload(string filename, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Niftiload(filename, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Niftiload(String, Nullable<Boolean>, String, Nullable<Boolean>)

Load a NIFTI image.

Declaration
public static Image Niftiload(string filename, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Niftiload(filename, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Niftisave(String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to nifti file.

Declaration
public void Niftisave(string filename, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String filename

Filename to save to.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Niftisave(filename, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

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.

| Improve this Doc View Source

NotEqual(Double)

This operation compares two images on inequality.

Declaration
public Image NotEqual(double right)
Parameters
Type Name Description
System.Double right

A double constant to compare.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

NotEqual(Double[])

This operation compares two images on inequality.

Declaration
public Image NotEqual(double[] right)
Parameters
Type Name Description
System.Double[] right

A double array to compare.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

NotEqual(Int32[])

This operation compares two images on inequality.

Declaration
public Image NotEqual(int[] right)
Parameters
Type Name Description
System.Int32[] right

A integer array to compare.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Openexrload(String, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load an OpenEXR image.

Declaration
public static Image Openexrload(string filename, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Openexrload(filename, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Openexrload(String, Nullable<Boolean>, String, Nullable<Boolean>)

Load an OpenEXR image.

Declaration
public static Image Openexrload(string filename, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Openexrload(filename, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Openslideload(String, out Int32, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>, String, Nullable<Boolean>)

Load file with OpenSlide.

Declaration
public static Image Openslideload(string filename, out int flags, bool? attachAssociated = default(bool? ), int? level = default(int? ), bool? autocrop = default(bool? ), string associated = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> attachAssociated

Attach all asssociated images.

System.Nullable<System.Int32> level

Load this level from the file.

System.Nullable<System.Boolean> autocrop

Crop to image bounds.

System.String associated

Load this associated image.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Openslideload(filename, out var flags, attachAssociated: bool, level: int, autocrop: bool, associated: string, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Openslideload(String, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>, String, Nullable<Boolean>)

Load file with OpenSlide.

Declaration
public static Image Openslideload(string filename, bool? attachAssociated = default(bool? ), int? level = default(int? ), bool? autocrop = default(bool? ), string associated = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Boolean> attachAssociated

Attach all asssociated images.

System.Nullable<System.Int32> level

Load this level from the file.

System.Nullable<System.Boolean> autocrop

Crop to image bounds.

System.String associated

Load this associated image.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Openslideload(filename, attachAssociated: bool, level: int, autocrop: bool, associated: string, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Pdfload(String, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Double>, Double[], Nullable<Boolean>, String, Nullable<Boolean>)

Load PDF from file.

Declaration
public static Image Pdfload(string filename, out int flags, int? page = default(int? ), int? n = default(int? ), double? dpi = default(double? ), double? scale = default(double? ), double[] background = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Double[] background

Background value.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Pdfload(filename, out var flags, page: int, n: int, dpi: double, scale: double, background: double[], memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Pdfload(String, Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Double>, Double[], Nullable<Boolean>, String, Nullable<Boolean>)

Load PDF from file.

Declaration
public static Image Pdfload(string filename, int? page = default(int? ), int? n = default(int? ), double? dpi = default(double? ), double? scale = default(double? ), double[] background = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Double[] background

Background value.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Pdfload(filename, page: int, n: int, dpi: double, scale: double, background: double[], memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PdfloadBuffer(Byte[], out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Double>, Double[], Nullable<Boolean>, String, Nullable<Boolean>)

Load PDF from buffer.

Declaration
public static Image PdfloadBuffer(byte[] buffer, out int flags, int? page = default(int? ), int? n = default(int? ), double? dpi = default(double? ), double? scale = default(double? ), double[] background = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Double[] background

Background value.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PdfloadBuffer(buffer, out var flags, page: int, n: int, dpi: double, scale: double, background: double[], memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PdfloadBuffer(Byte[], Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Double>, Double[], Nullable<Boolean>, String, Nullable<Boolean>)

Load PDF from buffer.

Declaration
public static Image PdfloadBuffer(byte[] buffer, int? page = default(int? ), int? n = default(int? ), double? dpi = default(double? ), double? scale = default(double? ), double[] background = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Double[] background

Background value.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PdfloadBuffer(buffer, page: int, n: int, dpi: double, scale: double, background: double[], memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PdfloadSource(Source, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Double>, Double[], Nullable<Boolean>, String, Nullable<Boolean>)

Load PDF from source.

Declaration
public static Image PdfloadSource(Source source, out int flags, int? page = default(int? ), int? n = default(int? ), double? dpi = default(double? ), double? scale = default(double? ), double[] background = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Double[] background

Background value.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PdfloadSource(source, out var flags, page: int, n: int, dpi: double, scale: double, background: double[], memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PdfloadSource(Source, Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Double>, Double[], Nullable<Boolean>, String, Nullable<Boolean>)

Load PDF from source.

Declaration
public static Image PdfloadSource(Source source, int? page = default(int? ), int? n = default(int? ), double? dpi = default(double? ), double? scale = default(double? ), double[] background = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Double[] background

Background value.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PdfloadSource(source, page: int, n: int, dpi: double, scale: double, background: double[], memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PdfloadStream(Stream, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Double>, Double[], Nullable<Boolean>, String, Nullable<Boolean>)

Load PDF from stream.

Declaration
public static Image PdfloadStream(Stream stream, out int flags, int? page = default(int? ), int? n = default(int? ), double? dpi = default(double? ), double? scale = default(double? ), double[] background = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Double[] background

Background value.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PdfloadStream(stream, out var flags, page: int, n: int, dpi: double, scale: double, background: double[], memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PdfloadStream(Stream, Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Double>, Double[], Nullable<Boolean>, String, Nullable<Boolean>)

Load PDF from stream.

Declaration
public static Image PdfloadStream(Stream stream, int? page = default(int? ), int? n = default(int? ), double? dpi = default(double? ), double? scale = default(double? ), double[] background = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Double[] background

Background value.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PdfloadStream(stream, page: int, n: int, dpi: double, scale: double, background: double[], memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Percent(Double)

Find threshold for percent of pixels.

Declaration
public int Percent(double percent)
Parameters
Type Name Description
System.Double percent

Percent of pixels.

Returns
Type Description
System.Int32

A int.

Examples
int threshold = in.Percent(percent);
| Improve this Doc View Source

Perlin(Int32, Int32, Nullable<Int32>, Nullable<Boolean>)

Make a perlin noise image.

Declaration
public static Image Perlin(int width, int height, int? cellSize = default(int? ), bool? uchar = default(bool? ))
Parameters
Type Name Description
System.Int32 width

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Nullable<System.Int32> cellSize

Size of Perlin cells.

System.Nullable<System.Boolean> uchar

Output an unsigned char image.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Perlin(width, height, cellSize: int, uchar: bool);
| Improve this Doc View Source

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
Image @out = in.Phasecor(in2);
| Improve this Doc View Source

Pngload(String, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load png from file.

Declaration
public static Image Pngload(string filename, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Pngload(filename, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Pngload(String, Nullable<Boolean>, String, Nullable<Boolean>)

Load png from file.

Declaration
public static Image Pngload(string filename, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Pngload(filename, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PngloadBuffer(Byte[], out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load png from buffer.

Declaration
public static Image PngloadBuffer(byte[] buffer, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PngloadBuffer(buffer, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PngloadBuffer(Byte[], Nullable<Boolean>, String, Nullable<Boolean>)

Load png from buffer.

Declaration
public static Image PngloadBuffer(byte[] buffer, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PngloadBuffer(buffer, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PngloadSource(Source, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load png from source.

Declaration
public static Image PngloadSource(Source source, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PngloadSource(source, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PngloadSource(Source, Nullable<Boolean>, String, Nullable<Boolean>)

Load png from source.

Declaration
public static Image PngloadSource(Source source, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PngloadSource(source, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PngloadStream(Stream, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load png from stream.

Declaration
public static Image PngloadStream(Stream stream, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PngloadStream(stream, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PngloadStream(Stream, Nullable<Boolean>, String, Nullable<Boolean>)

Load png from stream.

Declaration
public static Image PngloadStream(Stream stream, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PngloadStream(stream, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Pngsave(String, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Int32>, Nullable<Boolean>, Nullable<Int32>, Nullable<Double>, Nullable<Int32>, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to png file.

Declaration
public void Pngsave(string filename, int? compression = default(int? ), bool? interlace = default(bool? ), string profile = null, int? filter = default(int? ), bool? palette = default(bool? ), int? q = default(int? ), double? dither = default(double? ), int? bitdepth = default(int? ), bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String filename

Filename to save to.

System.Nullable<System.Int32> compression

Compression factor.

System.Nullable<System.Boolean> interlace

Interlace image.

System.String profile

ICC profile to embed.

System.Nullable<System.Int32> filter

libpng row filter flag(s).

System.Nullable<System.Boolean> palette

Quantise to 8bpp palette.

System.Nullable<System.Int32> q

Quantisation quality.

System.Nullable<System.Double> dither

Amount of dithering.

System.Nullable<System.Int32> bitdepth

Write as a 1, 2, 4 or 8 bit image.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Pngsave(filename, compression: int, interlace: bool, profile: string, filter: int, palette: bool, q: int, dither: double, bitdepth: int, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

PngsaveBuffer(Nullable<Int32>, Nullable<Boolean>, String, Nullable<Int32>, Nullable<Boolean>, Nullable<Int32>, Nullable<Double>, Nullable<Int32>, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to png buffer.

Declaration
public byte[] PngsaveBuffer(int? compression = default(int? ), bool? interlace = default(bool? ), string profile = null, int? filter = default(int? ), bool? palette = default(bool? ), int? q = default(int? ), double? dither = default(double? ), int? bitdepth = default(int? ), bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> compression

Compression factor.

System.Nullable<System.Boolean> interlace

Interlace image.

System.String profile

ICC profile to embed.

System.Nullable<System.Int32> filter

libpng row filter flag(s).

System.Nullable<System.Boolean> palette

Quantise to 8bpp palette.

System.Nullable<System.Int32> q

Quantisation quality.

System.Nullable<System.Double> dither

Amount of dithering.

System.Nullable<System.Int32> bitdepth

Write as a 1, 2, 4 or 8 bit image.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Returns
Type Description
System.Byte[]

An array of bytes.

Examples
byte[] buffer = in.PngsaveBuffer(compression: int, interlace: bool, profile: string, filter: int, palette: bool, q: int, dither: double, bitdepth: int, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

PngsaveStream(Stream, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Int32>, Nullable<Boolean>, Nullable<Int32>, Nullable<Double>, Nullable<Int32>, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to stream as PNG.

Declaration
public void PngsaveStream(Stream stream, int? compression = default(int? ), bool? interlace = default(bool? ), string profile = null, int? filter = default(int? ), bool? palette = default(bool? ), int? q = default(int? ), double? dither = default(double? ), int? bitdepth = default(int? ), bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to save to.

System.Nullable<System.Int32> compression

Compression factor.

System.Nullable<System.Boolean> interlace

Interlace image.

System.String profile

ICC profile to embed.

System.Nullable<System.Int32> filter

libpng row filter flag(s).

System.Nullable<System.Boolean> palette

Quantise to 8bpp palette.

System.Nullable<System.Int32> q

Quantisation quality.

System.Nullable<System.Double> dither

Amount of dithering.

System.Nullable<System.Int32> bitdepth

Write as a 1, 2, 4 or 8 bit image.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.PngsaveStream(stream, compression: int, interlace: bool, profile: string, filter: int, palette: bool, q: int, dither: double, bitdepth: int, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

PngsaveTarget(Target, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Int32>, Nullable<Boolean>, Nullable<Int32>, Nullable<Double>, Nullable<Int32>, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to target as PNG.

Declaration
public void PngsaveTarget(Target target, int? compression = default(int? ), bool? interlace = default(bool? ), string profile = null, int? filter = default(int? ), bool? palette = default(bool? ), int? q = default(int? ), double? dither = default(double? ), int? bitdepth = default(int? ), bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
Target target

Target to save to.

System.Nullable<System.Int32> compression

Compression factor.

System.Nullable<System.Boolean> interlace

Interlace image.

System.String profile

ICC profile to embed.

System.Nullable<System.Int32> filter

libpng row filter flag(s).

System.Nullable<System.Boolean> palette

Quantise to 8bpp palette.

System.Nullable<System.Int32> q

Quantisation quality.

System.Nullable<System.Double> dither

Amount of dithering.

System.Nullable<System.Int32> bitdepth

Write as a 1, 2, 4 or 8 bit image.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.PngsaveTarget(target, compression: int, interlace: bool, profile: string, filter: int, palette: bool, q: int, dither: double, bitdepth: int, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

Polar()

Return an image converted to polar coordinates.

Declaration
public Image Polar()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Pow(Image)

Raise to power of an image.

Declaration
public Image Pow(Image other)
Parameters
Type Name Description
Image other

To the power of this.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Pow(Double)

Raise to power of an constant.

Declaration
public Image Pow(double other)
Parameters
Type Name Description
System.Double other

To the power of this.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Pow(Double[])

Raise to power of an array.

Declaration
public Image Pow(double[] other)
Parameters
Type Name Description
System.Double[] other

To the power of this.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Pow(Int32[])

Raise to power of an array.

Declaration
public Image Pow(int[] other)
Parameters
Type Name Description
System.Int32[] other

To the power of this.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Ppmload(String, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load ppm from file.

Declaration
public static Image Ppmload(string filename, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Ppmload(filename, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Ppmload(String, Nullable<Boolean>, String, Nullable<Boolean>)

Load ppm from file.

Declaration
public static Image Ppmload(string filename, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Ppmload(filename, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PpmloadSource(Source, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load ppm base class.

Declaration
public static Image PpmloadSource(Source source, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PpmloadSource(source, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PpmloadSource(Source, Nullable<Boolean>, String, Nullable<Boolean>)

Load ppm base class.

Declaration
public static Image PpmloadSource(Source source, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PpmloadSource(source, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PpmloadStream(Stream, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load ppm base class.

Declaration
public static Image PpmloadStream(Stream stream, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PpmloadStream(stream, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

PpmloadStream(Stream, Nullable<Boolean>, String, Nullable<Boolean>)

Load ppm base class.

Declaration
public static Image PpmloadStream(Stream stream, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.PpmloadStream(stream, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Ppmsave(String, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to ppm file.

Declaration
public void Ppmsave(string filename, bool? ascii = default(bool? ), int? bitdepth = default(int? ), bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String filename

Filename to save to.

System.Nullable<System.Boolean> ascii

save as ascii.

System.Nullable<System.Int32> bitdepth

Write as a 1 bit image.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Ppmsave(filename, ascii: bool, bitdepth: int, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

PpmsaveStream(Stream, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Double[], Nullable<Int32>)

Save to ppm.

Declaration
public void PpmsaveStream(Stream stream, bool? ascii = default(bool? ), int? bitdepth = default(int? ), bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to save to.

System.Nullable<System.Boolean> ascii

save as ascii.

System.Nullable<System.Int32> bitdepth

Write as a 1 bit image.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.PpmsaveStream(stream, ascii: bool, bitdepth: int, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

PpmsaveTarget(Target, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Double[], Nullable<Int32>)

Save to ppm.

Declaration
public void PpmsaveTarget(Target target, bool? ascii = default(bool? ), int? bitdepth = default(int? ), bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
Target target

Target to save to.

System.Nullable<System.Boolean> ascii

save as ascii.

System.Nullable<System.Int32> bitdepth

Write as a 1 bit image.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.PpmsaveTarget(target, ascii: bool, bitdepth: int, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

Premultiply(Nullable<Double>)

Premultiply image alpha.

Declaration
public Image Premultiply(double? maxAlpha = default(double? ))
Parameters
Type Name Description
System.Nullable<System.Double> maxAlpha

Maximum value of alpha channel.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Premultiply(maxAlpha: double);
| Improve this Doc View Source

Profile()

Find image profiles.

Declaration
public object[] Profile()
Returns
Type Description
System.Object[]

An array of objects.

Examples
var output = in.Profile();
| Improve this Doc View Source

ProfileLoad(String)

Load named ICC profile.

Declaration
public static byte[] ProfileLoad(string name)
Parameters
Type Name Description
System.String name

Profile name.

Returns
Type Description
System.Byte[]

An array of bytes.

Examples
byte[] profile = NetVips.Image.ProfileLoad(name);
| Improve this Doc View Source

Project()

Find image projections.

Declaration
public object[] Project()
Returns
Type Description
System.Object[]

An array of objects.

Examples
var output = in.Project();
| Improve this Doc View Source

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
Image @out = in.Quadratic(coeff, interpolate: GObject);
| Improve this Doc View Source

Rad2float()

Unpack Radiance coding to float RGB.

Declaration
public Image Rad2float()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Rad2float();
| Improve this Doc View Source

Radload(String, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load a Radiance image from a file.

Declaration
public static Image Radload(string filename, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Radload(filename, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Radload(String, Nullable<Boolean>, String, Nullable<Boolean>)

Load a Radiance image from a file.

Declaration
public static Image Radload(string filename, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Radload(filename, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

RadloadBuffer(Byte[], out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load rad from buffer.

Declaration
public static Image RadloadBuffer(byte[] buffer, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.RadloadBuffer(buffer, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

RadloadBuffer(Byte[], Nullable<Boolean>, String, Nullable<Boolean>)

Load rad from buffer.

Declaration
public static Image RadloadBuffer(byte[] buffer, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.RadloadBuffer(buffer, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

RadloadSource(Source, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load rad from source.

Declaration
public static Image RadloadSource(Source source, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.RadloadSource(source, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

RadloadSource(Source, Nullable<Boolean>, String, Nullable<Boolean>)

Load rad from source.

Declaration
public static Image RadloadSource(Source source, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.RadloadSource(source, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

RadloadStream(Stream, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load rad from stream.

Declaration
public static Image RadloadStream(Stream stream, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.RadloadStream(stream, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

RadloadStream(Stream, Nullable<Boolean>, String, Nullable<Boolean>)

Load rad from stream.

Declaration
public static Image RadloadStream(Stream stream, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.RadloadStream(stream, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Radsave(String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to Radiance file.

Declaration
public void Radsave(string filename, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String filename

Filename to save to.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Radsave(filename, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

RadsaveBuffer(Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to Radiance buffer.

Declaration
public byte[] RadsaveBuffer(bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Returns
Type Description
System.Byte[]

An array of bytes.

Examples
byte[] buffer = in.RadsaveBuffer(strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

RadsaveStream(Stream, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to Radiance stream.

Declaration
public void RadsaveStream(Stream stream, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to save to.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.RadsaveStream(stream, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

RadsaveTarget(Target, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to Radiance target.

Declaration
public void RadsaveTarget(Target target, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
Target target

Target to save to.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.RadsaveTarget(target, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

Rank(Int32, Int32, Int32)

Rank filter.

Declaration
public Image Rank(int width, int height, int index)
Parameters
Type Name Description
System.Int32 width

Window width in pixels.

System.Int32 height

Window height in pixels.

System.Int32 index

Select pixel at index.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Rank(width, height, index);
| Improve this Doc View Source

Rawload(String, Int32, Int32, Int32, out Int32, Nullable<UInt64>, String, String, Nullable<Boolean>, String, Nullable<Boolean>)

Load raw data from a file.

Declaration
public static Image Rawload(string filename, int width, int height, int bands, out int flags, ulong? offset = default(ulong? ), string format = null, string interpretation = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 width

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Int32 bands

Number of bands in image.

System.Int32 flags

Flags for this file.

System.Nullable<System.UInt64> offset

Offset in bytes from start of file.

System.String format

Pixel format in image.

System.String interpretation

Pixel interpretation.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Rawload(filename, width, height, bands, out var flags, offset: ulong, format: string, interpretation: string, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Rawload(String, Int32, Int32, Int32, Nullable<UInt64>, String, String, Nullable<Boolean>, String, Nullable<Boolean>)

Load raw data from a file.

Declaration
public static Image Rawload(string filename, int width, int height, int bands, ulong? offset = default(ulong? ), string format = null, string interpretation = null, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 width

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Int32 bands

Number of bands in image.

System.Nullable<System.UInt64> offset

Offset in bytes from start of file.

System.String format

Pixel format in image.

System.String interpretation

Pixel interpretation.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Rawload(filename, width, height, bands, offset: ulong, format: string, interpretation: string, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Rawsave(String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to raw file.

Declaration
public void Rawsave(string filename, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String filename

Filename to save to.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Rawsave(filename, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

RawsaveFd(Int32, Nullable<Boolean>, Double[], Nullable<Int32>)

Write raw image to file descriptor.

Declaration
public void RawsaveFd(int fd, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.Int32 fd

File descriptor to write to.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.RawsaveFd(fd, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

Real()

Return the real part of a complex image.

Declaration
public Image Real()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

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
Image @out = in.Recomb(m);
| Improve this Doc View Source

Rect()

Return an image converted to rectangular coordinates.

Declaration
public Image Rect()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Reduce(Double, Double, String)

Reduce an image.

Declaration
public Image Reduce(double hshrink, double vshrink, string kernel = null)
Parameters
Type Name Description
System.Double hshrink

Horizontal shrink factor.

System.Double vshrink

Vertical shrink factor.

System.String kernel

Resampling kernel.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Reduce(hshrink, vshrink, kernel: string);
| Improve this Doc View Source

Reduceh(Double, String)

Shrink an image horizontally.

Declaration
public Image Reduceh(double hshrink, string kernel = null)
Parameters
Type Name Description
System.Double hshrink

Horizontal shrink factor.

System.String kernel

Resampling kernel.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Reduceh(hshrink, kernel: string);
| Improve this Doc View Source

Reducev(Double, String)

Shrink an image vertically.

Declaration
public Image Reducev(double vshrink, string kernel = null)
Parameters
Type Name Description
System.Double vshrink

Vertical shrink factor.

System.String kernel

Resampling kernel.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Reducev(vshrink, kernel: string);
| Improve this Doc View Source

Relational(Image, String)

Relational operation on two images.

Declaration
public Image Relational(Image right, string relational)
Parameters
Type Name Description
Image right

Right-hand image argument.

System.String relational

relational to perform.

Returns
Type Description
Image

A new Image.

Examples
Image @out = left.Relational(right, relational);
| Improve this Doc View Source

RelationalConst(String, Double[])

Relational operations against a constant.

Declaration
public Image RelationalConst(string relational, double[] c)
Parameters
Type Name Description
System.String relational

relational to perform.

System.Double[] c

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.RelationalConst(relational, c);
| Improve this Doc View Source

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
Image @out = left.Remainder(right);
| Improve this Doc View Source

RemainderConst(Double[])

Remainder after integer division of an image and a constant.

Declaration
public Image RemainderConst(double[] c)
Parameters
Type Name Description
System.Double[] c

Array of constants.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.RemainderConst(c);
| Improve this Doc View Source

Remove(String)

Remove an item of metadata.

Declaration
public bool Remove(string name)
Parameters
Type Name Description
System.String name

The name of the piece of metadata to remove.

Returns
Type Description
System.Boolean

true if the metadata is successfully removed; otherwise, false.

Remarks

The named metadata item is removed.

| Improve this Doc View Source

Replicate(Int32, Int32)

Replicate an image.

Declaration
public Image Replicate(int across, int down)
Parameters
Type Name Description
System.Int32 across

Repeat this many times horizontally.

System.Int32 down

Repeat this many times vertically.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Replicate(across, down);
| Improve this Doc View Source

Resize(Double, String, Nullable<Double>)

Resize an image.

Declaration
public Image Resize(double scale, string kernel = null, double? vscale = default(double? ))
Parameters
Type Name Description
System.Double scale

Scale image by this factor.

System.String kernel

Resampling kernel.

System.Nullable<System.Double> vscale

Vertical scale image by this factor.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Resize(scale, kernel: string, vscale: double);
| Improve this Doc View Source

Rint()

Return the nearest integral value.

Declaration
public Image Rint()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Rot(String)

Rotate an image.

Declaration
public Image Rot(string angle)
Parameters
Type Name Description
System.String angle

Angle to rotate image.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Rot(angle);
| Improve this Doc View Source

Rot180()

Rotate 180 degrees.

Declaration
public Image Rot180()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Rot270()

Rotate 270 degrees clockwise.

Declaration
public Image Rot270()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Rot45(String)

Rotate an image.

Declaration
public Image Rot45(string angle = null)
Parameters
Type Name Description
System.String angle

Angle to rotate image.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Rot45(angle: string);
| Improve this Doc View Source

Rot90()

Rotate 90 degrees clockwise.

Declaration
public Image Rot90()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Rotate(Double, GObject, Double[], Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>)

Rotate an image by a number of degrees.

Declaration
public Image Rotate(double angle, GObject interpolate = null, double[] background = null, double? odx = default(double? ), double? ody = default(double? ), double? idx = default(double? ), double? idy = default(double? ))
Parameters
Type Name Description
System.Double angle

Rotate anticlockwise by this many degrees.

GObject interpolate

Interpolate pixels with this.

System.Double[] background

Background value.

System.Nullable<System.Double> odx

Horizontal output displacement.

System.Nullable<System.Double> ody

Vertical output displacement.

System.Nullable<System.Double> idx

Horizontal input displacement.

System.Nullable<System.Double> idy

Vertical input displacement.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Rotate(angle, interpolate: GObject, background: double[], odx: double, ody: double, idx: double, idy: double);
| Improve this Doc View Source

Round(String)

Perform a round function on an image.

Declaration
public Image Round(string round)
Parameters
Type Name Description
System.String round

rounding operation to perform.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Round(round);
| Improve this Doc View Source

ScaleImage(Nullable<Double>, Nullable<Boolean>)

Scale an image to 0 - 255.

Declaration
public Image ScaleImage(double? exp = default(double? ), bool? log = default(bool? ))
Parameters
Type Name Description
System.Nullable<System.Double> exp

Exponent for log scale.

System.Nullable<System.Boolean> 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
Image @out = in.Scale(exp: double, log: bool);
| Improve this Doc View Source

ScRGB2BW(Nullable<Int32>)

Convert scRGB to BW.

Declaration
public Image ScRGB2BW(int? depth = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> depth

Output device space depth in bits.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.ScRGB2BW(depth: int);
| Improve this Doc View Source

ScRGB2sRGB(Nullable<Int32>)

Convert an scRGB image to sRGB.

Declaration
public Image ScRGB2sRGB(int? depth = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> depth

Output device space depth in bits.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.ScRGB2sRGB(depth: int);
| Improve this Doc View Source

ScRGB2XYZ()

Transform scRGB to XYZ.

Declaration
public Image ScRGB2XYZ()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.ScRGB2XYZ();
| Improve this Doc View Source

Sequential(Nullable<Int32>)

Check sequential access.

Declaration
public Image Sequential(int? tileHeight = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> tileHeight

Tile height in pixels.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Sequential(tileHeight: int);
| Improve this Doc View Source

Set(IntPtr, String, Object)

Set the type and value of an item of metadata.

Declaration
public override void Set(IntPtr gtype, string name, object value)
Parameters
Type Name Description
System.IntPtr gtype

The GType of the metadata item to create.

System.String name

The name of the piece of metadata to create.

System.Object value

The value to set as a C# value. It is converted to the GType, if possible.

Overrides
VipsObject.Set(IntPtr, String, Object)
Remarks

Sets the type and value of an item of metadata. Any old item of the same name is removed. See GValue for types.

| Improve this Doc View Source

Set(String, Object)

Set the value of an item of metadata.

Declaration
public void Set(string name, object value)
Parameters
Type Name Description
System.String name

The name of the piece of metadata to set the value of.

System.Object value

The value to set as a C# value. It is converted to the type of the metadata item, if possible.

Remarks

Sets the value of an item of metadata. The metadata item must already exist.

Exceptions
Type Condition
System.Exception

If metadata item name does not exist.

| Improve this Doc View Source

SetKill(Boolean)

Set the kill flag on an image. Handy for stopping sets of threads.

Declaration
public void SetKill(bool kill)
Parameters
Type Name Description
System.Boolean kill

The kill state.

Remarks

At least libvips 8.8 is needed.

| Improve this Doc View Source

SetProgress(Boolean)

Enable progress reporting on an image.

Declaration
public void SetProgress(bool progress)
Parameters
Type Name Description
System.Boolean 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.

| Improve this Doc View Source

SetProgress(IProgress<Int32>, CancellationToken)

Attach progress feedback, if required.

Declaration
public void SetProgress(IProgress<int> progress, CancellationToken token = default(CancellationToken))
Parameters
Type Name Description
System.IProgress<System.Int32> progress

A provider for progress updates.

System.Threading.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:

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(Boolean)). If this version requirement is not met, it will only stop updating the progress.

| Improve this Doc View Source

Sharpen(Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>)

Unsharp masking for print.

Declaration
public Image Sharpen(double? sigma = default(double? ), double? x1 = default(double? ), double? y2 = default(double? ), double? y3 = default(double? ), double? m1 = default(double? ), double? m2 = default(double? ))
Parameters
Type Name Description
System.Nullable<System.Double> sigma

Sigma of Gaussian.

System.Nullable<System.Double> x1

Flat/jaggy threshold.

System.Nullable<System.Double> y2

Maximum brightening.

System.Nullable<System.Double> y3

Maximum darkening.

System.Nullable<System.Double> m1

Slope for flat areas.

System.Nullable<System.Double> m2

Slope for jaggy areas.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Sharpen(sigma: double, x1: double, y2: double, y3: double, m1: double, m2: double);
| Improve this Doc View Source

Shrink(Double, Double)

Shrink an image.

Declaration
public Image Shrink(double hshrink, double vshrink)
Parameters
Type Name Description
System.Double hshrink

Horizontal shrink factor.

System.Double vshrink

Vertical shrink factor.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Shrink(hshrink, vshrink);
| Improve this Doc View Source

Shrinkh(Int32)

Shrink an image horizontally.

Declaration
public Image Shrinkh(int hshrink)
Parameters
Type Name Description
System.Int32 hshrink

Horizontal shrink factor.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Shrinkh(hshrink);
| Improve this Doc View Source

Shrinkv(Int32)

Shrink an image vertically.

Declaration
public Image Shrinkv(int vshrink)
Parameters
Type Name Description
System.Int32 vshrink

Vertical shrink factor.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Shrinkv(vshrink);
| Improve this Doc View Source

Sign()

Unit vector of pixel.

Declaration
public Image Sign()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Sign();
| Improve this Doc View Source

Similarity(Nullable<Double>, Nullable<Double>, GObject, Double[], Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>)

Similarity transform of an image.

Declaration
public Image Similarity(double? scale = default(double? ), double? angle = default(double? ), GObject interpolate = null, double[] background = null, double? odx = default(double? ), double? ody = default(double? ), double? idx = default(double? ), double? idy = default(double? ))
Parameters
Type Name Description
System.Nullable<System.Double> scale

Scale by this factor.

System.Nullable<System.Double> angle

Rotate anticlockwise by this many degrees.

GObject interpolate

Interpolate pixels with this.

System.Double[] background

Background value.

System.Nullable<System.Double> odx

Horizontal output displacement.

System.Nullable<System.Double> ody

Vertical output displacement.

System.Nullable<System.Double> idx

Horizontal input displacement.

System.Nullable<System.Double> idy

Vertical input displacement.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Similarity(scale: double, angle: double, interpolate: GObject, background: double[], odx: double, ody: double, idx: double, idy: double);
| Improve this Doc View Source

Sin()

Return the sine of an image in degrees.

Declaration
public Image Sin()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Sines(Int32, Int32, Nullable<Boolean>, Nullable<Double>, Nullable<Double>)

Make a 2D sine wave.

Declaration
public static Image Sines(int width, int height, bool? uchar = default(bool? ), double? hfreq = default(double? ), double? vfreq = default(double? ))
Parameters
Type Name Description
System.Int32 width

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Nullable<System.Boolean> uchar

Output an unsigned char image.

System.Nullable<System.Double> hfreq

Horizontal spatial frequency.

System.Nullable<System.Double> vfreq

Vertical spatial frequency.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Sines(width, height, uchar: bool, hfreq: double, vfreq: double);
| Improve this Doc View Source

Smartcrop(Int32, Int32, String)

Extract an area from an image.

Declaration
public Image Smartcrop(int width, int height, string interesting = null)
Parameters
Type Name Description
System.Int32 width

Width of extract area.

System.Int32 height

Height of extract area.

System.String interesting

How to measure interestingness.

Returns
Type Description
Image

A new Image.

Examples
Image @out = input.Smartcrop(width, height, interesting: string);
| Improve this Doc View Source

Sobel()

Sobel edge detector.

Declaration
public Image Sobel()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Sobel();
| Improve this Doc View Source

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
Image @out = in.Spcor(@ref);
| Improve this Doc View Source

Spectrum()

Make displayable power spectrum.

Declaration
public Image Spectrum()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Spectrum();
| Improve this Doc View Source

SRGB2HSV()

Transform sRGB to HSV.

Declaration
public Image SRGB2HSV()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.SRGB2HSV();
| Improve this Doc View Source

SRGB2scRGB()

Convert an sRGB image to scRGB.

Declaration
public Image SRGB2scRGB()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.SRGB2scRGB();
| Improve this Doc View Source

Stats()

Find many image stats.

Declaration
public Image Stats()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Stats();
| Improve this Doc View Source

Stdif(Int32, Int32, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>)

Statistical difference.

Declaration
public Image Stdif(int width, int height, double? s0 = default(double? ), double? b = default(double? ), double? m0 = default(double? ), double? a = default(double? ))
Parameters
Type Name Description
System.Int32 width

Window width in pixels.

System.Int32 height

Window height in pixels.

System.Nullable<System.Double> s0

New deviation.

System.Nullable<System.Double> b

Weight of new deviation.

System.Nullable<System.Double> m0

New mean.

System.Nullable<System.Double> a

Weight of new mean.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Stdif(width, height, s0: double, b: double, m0: double, a: double);
| Improve this Doc View Source

Subsample(Int32, Int32, Nullable<Boolean>)

Subsample an image.

Declaration
public Image Subsample(int xfac, int yfac, bool? point = default(bool? ))
Parameters
Type Name Description
System.Int32 xfac

Horizontal subsample factor.

System.Int32 yfac

Vertical subsample factor.

System.Nullable<System.Boolean> point

Point sample.

Returns
Type Description
Image

A new Image.

Examples
Image @out = input.Subsample(xfac, yfac, point: bool);
| Improve this Doc View Source

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
Image @out = left.Subtract(right);
| Improve this Doc View Source

Sum(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
Image @out = NetVips.Image.Sum(@in);
| Improve this Doc View Source

Svgload(String, out Int32, Nullable<Double>, Nullable<Double>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load SVG with rsvg.

Declaration
public static Image Svgload(string filename, out int flags, double? dpi = default(double? ), double? scale = default(double? ), bool? unlimited = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Nullable<System.Boolean> unlimited

Allow SVG of any size.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Svgload(filename, out var flags, dpi: double, scale: double, unlimited: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Svgload(String, Nullable<Double>, Nullable<Double>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load SVG with rsvg.

Declaration
public static Image Svgload(string filename, double? dpi = default(double? ), double? scale = default(double? ), bool? unlimited = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Nullable<System.Boolean> unlimited

Allow SVG of any size.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Svgload(filename, dpi: double, scale: double, unlimited: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

SvgloadBuffer(Byte[], out Int32, Nullable<Double>, Nullable<Double>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load SVG with rsvg.

Declaration
public static Image SvgloadBuffer(byte[] buffer, out int flags, double? dpi = default(double? ), double? scale = default(double? ), bool? unlimited = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Nullable<System.Boolean> unlimited

Allow SVG of any size.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.SvgloadBuffer(buffer, out var flags, dpi: double, scale: double, unlimited: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

SvgloadBuffer(Byte[], Nullable<Double>, Nullable<Double>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load SVG with rsvg.

Declaration
public static Image SvgloadBuffer(byte[] buffer, double? dpi = default(double? ), double? scale = default(double? ), bool? unlimited = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Nullable<System.Boolean> unlimited

Allow SVG of any size.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.SvgloadBuffer(buffer, dpi: double, scale: double, unlimited: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

SvgloadSource(Source, out Int32, Nullable<Double>, Nullable<Double>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load svg from source.

Declaration
public static Image SvgloadSource(Source source, out int flags, double? dpi = default(double? ), double? scale = default(double? ), bool? unlimited = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Nullable<System.Boolean> unlimited

Allow SVG of any size.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.SvgloadSource(source, out var flags, dpi: double, scale: double, unlimited: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

SvgloadSource(Source, Nullable<Double>, Nullable<Double>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load svg from source.

Declaration
public static Image SvgloadSource(Source source, double? dpi = default(double? ), double? scale = default(double? ), bool? unlimited = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Nullable<System.Boolean> unlimited

Allow SVG of any size.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.SvgloadSource(source, dpi: double, scale: double, unlimited: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

SvgloadStream(Stream, out Int32, Nullable<Double>, Nullable<Double>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load svg from stream.

Declaration
public static Image SvgloadStream(Stream stream, out int flags, double? dpi = default(double? ), double? scale = default(double? ), bool? unlimited = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Nullable<System.Boolean> unlimited

Allow SVG of any size.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.SvgloadStream(stream, out var flags, dpi: double, scale: double, unlimited: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

SvgloadStream(Stream, Nullable<Double>, Nullable<Double>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load svg from stream.

Declaration
public static Image SvgloadStream(Stream stream, double? dpi = default(double? ), double? scale = default(double? ), bool? unlimited = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Nullable<System.Double> dpi

Render at this DPI.

System.Nullable<System.Double> scale

Scale output by this factor.

System.Nullable<System.Boolean> unlimited

Allow SVG of any size.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.SvgloadStream(stream, dpi: double, scale: double, unlimited: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Switch(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
Image @out = NetVips.Image.Switch(tests);
| Improve this Doc View Source

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
System.String cmdFormat

Command to run.

Image out

Output image.

Image[] in

Array of input images.

System.String outFormat

Format for output filename.

System.String inFormat

Format for input filename.

Examples
NetVips.Image.System(cmdFormat, out var @out, @in: Image[], outFormat: string, inFormat: string);
| Improve this Doc View Source

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
System.String cmdFormat

Command to run.

Image out

Output image.

System.String log

Command log.

Image[] in

Array of input images.

System.String outFormat

Format for output filename.

System.String inFormat

Format for input filename.

Examples
NetVips.Image.System(cmdFormat, out var @out, out var log, @in: Image[], outFormat: string, inFormat: string);
| Improve this Doc View Source

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
System.String cmdFormat

Command to run.

Image[] in

Array of input images.

System.String outFormat

Format for output filename.

System.String inFormat

Format for input filename.

Examples
NetVips.Image.System(cmdFormat, @in: Image[], outFormat: string, inFormat: string);
| Improve this Doc View Source

Tan()

Return the tangent of an image in degrees.

Declaration
public Image Tan()
Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Text(String, out Int32, String, Nullable<Int32>, Nullable<Int32>, String, Nullable<Int32>, Nullable<Boolean>, Nullable<Int32>, String)

Make a text image.

Declaration
public static Image Text(string text, out int autofitDpi, string font = null, int? width = default(int? ), int? height = default(int? ), string align = null, int? dpi = default(int? ), bool? justify = default(bool? ), int? spacing = default(int? ), string fontfile = null)
Parameters
Type Name Description
System.String text

Text to render.

System.Int32 autofitDpi

DPI selected by autofit.

System.String font

Font to render with.

System.Nullable<System.Int32> width

Maximum image width in pixels.

System.Nullable<System.Int32> height

Maximum image height in pixels.

System.String align

Align on the low, centre or high edge.

System.Nullable<System.Int32> dpi

DPI to render at.

System.Nullable<System.Boolean> justify

Justify lines.

System.Nullable<System.Int32> spacing

Line spacing.

System.String fontfile

Load this font file.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Text(text, out var autofitDpi, font: string, width: int, height: int, align: string, dpi: int, justify: bool, spacing: int, fontfile: string);
| Improve this Doc View Source

Text(String, String, Nullable<Int32>, Nullable<Int32>, String, Nullable<Int32>, Nullable<Boolean>, Nullable<Int32>, String)

Make a text image.

Declaration
public static Image Text(string text, string font = null, int? width = default(int? ), int? height = default(int? ), string align = null, int? dpi = default(int? ), bool? justify = default(bool? ), int? spacing = default(int? ), string fontfile = null)
Parameters
Type Name Description
System.String text

Text to render.

System.String font

Font to render with.

System.Nullable<System.Int32> width

Maximum image width in pixels.

System.Nullable<System.Int32> height

Maximum image height in pixels.

System.String align

Align on the low, centre or high edge.

System.Nullable<System.Int32> dpi

DPI to render at.

System.Nullable<System.Boolean> justify

Justify lines.

System.Nullable<System.Int32> spacing

Line spacing.

System.String fontfile

Load this font file.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Text(text, font: string, width: int, height: int, align: string, dpi: int, justify: bool, spacing: int, fontfile: string);
| Improve this Doc View Source

Thumbnail(String, Int32, Nullable<Int32>, String, Nullable<Boolean>, String, Nullable<Boolean>, String, String, String)

Generate thumbnail from file.

Declaration
public static Image Thumbnail(string filename, int width, int? height = default(int? ), string size = null, bool? noRotate = default(bool? ), string crop = null, bool? linear = default(bool? ), string importProfile = null, string exportProfile = null, string intent = null)
Parameters
Type Name Description
System.String filename

Filename to read from.

System.Int32 width

Size to this width.

System.Nullable<System.Int32> height

Size to this height.

System.String size

Only upsize, only downsize, or both.

System.Nullable<System.Boolean> noRotate

Don't use orientation tags to rotate image upright.

System.String crop

Reduce to fill target rectangle, then crop.

System.Nullable<System.Boolean> linear

Reduce in linear light.

System.String importProfile

Fallback import profile.

System.String exportProfile

Fallback export profile.

System.String intent

Rendering intent.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Thumbnail(filename, width, height: int, size: string, noRotate: bool, crop: string, linear: bool, importProfile: string, exportProfile: string, intent: string);
| Improve this Doc View Source

ThumbnailBuffer(Byte[], Int32, String, Nullable<Int32>, String, Nullable<Boolean>, String, Nullable<Boolean>, String, String, String)

Generate thumbnail from buffer.

Declaration
public static Image ThumbnailBuffer(byte[] buffer, int width, string optionString = null, int? height = default(int? ), string size = null, bool? noRotate = default(bool? ), string crop = null, bool? linear = default(bool? ), string importProfile = null, string exportProfile = null, string intent = null)
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Int32 width

Size to this width.

System.String optionString

Options that are passed on to the underlying loader.

System.Nullable<System.Int32> height

Size to this height.

System.String size

Only upsize, only downsize, or both.

System.Nullable<System.Boolean> noRotate

Don't use orientation tags to rotate image upright.

System.String crop

Reduce to fill target rectangle, then crop.

System.Nullable<System.Boolean> linear

Reduce in linear light.

System.String importProfile

Fallback import profile.

System.String exportProfile

Fallback export profile.

System.String intent

Rendering intent.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.ThumbnailBuffer(buffer, width, optionString: string, height: int, size: string, noRotate: bool, crop: string, linear: bool, importProfile: string, exportProfile: string, intent: string);
| Improve this Doc View Source

ThumbnailImage(Int32, Nullable<Int32>, String, Nullable<Boolean>, String, Nullable<Boolean>, String, String, String)

Generate thumbnail from image.

Declaration
public Image ThumbnailImage(int width, int? height = default(int? ), string size = null, bool? noRotate = default(bool? ), string crop = null, bool? linear = default(bool? ), string importProfile = null, string exportProfile = null, string intent = null)
Parameters
Type Name Description
System.Int32 width

Size to this width.

System.Nullable<System.Int32> height

Size to this height.

System.String size

Only upsize, only downsize, or both.

System.Nullable<System.Boolean> noRotate

Don't use orientation tags to rotate image upright.

System.String crop

Reduce to fill target rectangle, then crop.

System.Nullable<System.Boolean> linear

Reduce in linear light.

System.String importProfile

Fallback import profile.

System.String exportProfile

Fallback export profile.

System.String intent

Rendering intent.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.ThumbnailImage(width, height: int, size: string, noRotate: bool, crop: string, linear: bool, importProfile: string, exportProfile: string, intent: string);
| Improve this Doc View Source

ThumbnailSource(Source, Int32, String, Nullable<Int32>, String, Nullable<Boolean>, String, Nullable<Boolean>, String, String, String)

Generate thumbnail from source.

Declaration
public static Image ThumbnailSource(Source source, int width, string optionString = null, int? height = default(int? ), string size = null, bool? noRotate = default(bool? ), string crop = null, bool? linear = default(bool? ), string importProfile = null, string exportProfile = null, string intent = null)
Parameters
Type Name Description
Source source

Source to load from.

System.Int32 width

Size to this width.

System.String optionString

Options that are passed on to the underlying loader.

System.Nullable<System.Int32> height

Size to this height.

System.String size

Only upsize, only downsize, or both.

System.Nullable<System.Boolean> noRotate

Don't use orientation tags to rotate image upright.

System.String crop

Reduce to fill target rectangle, then crop.

System.Nullable<System.Boolean> linear

Reduce in linear light.

System.String importProfile

Fallback import profile.

System.String exportProfile

Fallback export profile.

System.String intent

Rendering intent.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.ThumbnailSource(source, width, optionString: string, height: int, size: string, noRotate: bool, crop: string, linear: bool, importProfile: string, exportProfile: string, intent: string);
| Improve this Doc View Source

ThumbnailStream(Stream, Int32, String, Nullable<Int32>, String, Nullable<Boolean>, String, Nullable<Boolean>, String, String, String)

Generate thumbnail from stream.

Declaration
public static Image ThumbnailStream(Stream stream, int width, string optionString = null, int? height = default(int? ), string size = null, bool? noRotate = default(bool? ), string crop = null, bool? linear = default(bool? ), string importProfile = null, string exportProfile = null, string intent = null)
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Int32 width

Size to this width.

System.String optionString

Options that are passed on to the underlying loader.

System.Nullable<System.Int32> height

Size to this height.

System.String size

Only upsize, only downsize, or both.

System.Nullable<System.Boolean> noRotate

Don't use orientation tags to rotate image upright.

System.String crop

Reduce to fill target rectangle, then crop.

System.Nullable<System.Boolean> linear

Reduce in linear light.

System.String importProfile

Fallback import profile.

System.String exportProfile

Fallback export profile.

System.String intent

Rendering intent.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.ThumbnailStream(stream, width, optionString: string, height: int, size: string, noRotate: bool, crop: string, linear: bool, importProfile: string, exportProfile: string, intent: string);
| Improve this Doc View Source

Tiffload(String, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load tiff from file.

Declaration
public static Image Tiffload(string filename, out int flags, int? page = default(int? ), int? subifd = default(int? ), int? n = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the image.

System.Nullable<System.Int32> subifd

Select subifd index.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> autorotate

Rotate image using orientation tag.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Tiffload(filename, out var flags, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Tiffload(String, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load tiff from file.

Declaration
public static Image Tiffload(string filename, int? page = default(int? ), int? subifd = default(int? ), int? n = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Int32> page

Load this page from the image.

System.Nullable<System.Int32> subifd

Select subifd index.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> autorotate

Rotate image using orientation tag.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Tiffload(filename, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

TiffloadBuffer(Byte[], out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load tiff from buffer.

Declaration
public static Image TiffloadBuffer(byte[] buffer, out int flags, int? page = default(int? ), int? subifd = default(int? ), int? n = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the image.

System.Nullable<System.Int32> subifd

Select subifd index.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> autorotate

Rotate image using orientation tag.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.TiffloadBuffer(buffer, out var flags, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

TiffloadBuffer(Byte[], Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load tiff from buffer.

Declaration
public static Image TiffloadBuffer(byte[] buffer, int? page = default(int? ), int? subifd = default(int? ), int? n = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Nullable<System.Int32> page

Load this page from the image.

System.Nullable<System.Int32> subifd

Select subifd index.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> autorotate

Rotate image using orientation tag.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.TiffloadBuffer(buffer, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

TiffloadSource(Source, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load tiff from source.

Declaration
public static Image TiffloadSource(Source source, out int flags, int? page = default(int? ), int? subifd = default(int? ), int? n = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the image.

System.Nullable<System.Int32> subifd

Select subifd index.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> autorotate

Rotate image using orientation tag.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.TiffloadSource(source, out var flags, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

TiffloadSource(Source, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load tiff from source.

Declaration
public static Image TiffloadSource(Source source, int? page = default(int? ), int? subifd = default(int? ), int? n = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Nullable<System.Int32> page

Load this page from the image.

System.Nullable<System.Int32> subifd

Select subifd index.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> autorotate

Rotate image using orientation tag.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.TiffloadSource(source, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

TiffloadStream(Stream, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load tiff from stream.

Declaration
public static Image TiffloadStream(Stream stream, out int flags, int? page = default(int? ), int? subifd = default(int? ), int? n = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the image.

System.Nullable<System.Int32> subifd

Select subifd index.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> autorotate

Rotate image using orientation tag.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.TiffloadStream(stream, out var flags, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

TiffloadStream(Stream, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>)

Load tiff from stream.

Declaration
public static Image TiffloadStream(Stream stream, int? page = default(int? ), int? subifd = default(int? ), int? n = default(int? ), bool? autorotate = default(bool? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Nullable<System.Int32> page

Load this page from the image.

System.Nullable<System.Int32> subifd

Select subifd index.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Boolean> autorotate

Rotate image using orientation tag.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.TiffloadStream(stream, page: int, subifd: int, n: int, autorotate: bool, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Tiffsave(String, String, Nullable<Int32>, String, String, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, String, Nullable<Double>, Nullable<Double>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to tiff file.

Declaration
public void Tiffsave(string filename, string compression = null, int? q = default(int? ), string predictor = null, string profile = null, bool? tile = default(bool? ), int? tileWidth = default(int? ), int? tileHeight = default(int? ), bool? pyramid = default(bool? ), bool? miniswhite = default(bool? ), int? bitdepth = default(int? ), string resunit = null, double? xres = default(double? ), double? yres = default(double? ), bool? bigtiff = default(bool? ), bool? properties = default(bool? ), string regionShrink = null, int? level = default(int? ), bool? subifd = default(bool? ), bool? lossless = default(bool? ), string depth = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String filename

Filename to save to.

System.String compression

Compression for this file.

System.Nullable<System.Int32> q

Q factor.

System.String predictor

Compression prediction.

System.String profile

ICC profile to embed.

System.Nullable<System.Boolean> tile

Write a tiled tiff.

System.Nullable<System.Int32> tileWidth

Tile width in pixels.

System.Nullable<System.Int32> tileHeight

Tile height in pixels.

System.Nullable<System.Boolean> pyramid

Write a pyramidal tiff.

System.Nullable<System.Boolean> miniswhite

Use 0 for white in 1-bit images.

System.Nullable<System.Int32> bitdepth

Write as a 1, 2, 4 or 8 bit image.

System.String resunit

Resolution unit.

System.Nullable<System.Double> xres

Horizontal resolution in pixels/mm.

System.Nullable<System.Double> yres

Vertical resolution in pixels/mm.

System.Nullable<System.Boolean> bigtiff

Write a bigtiff image.

System.Nullable<System.Boolean> properties

Write a properties document to IMAGEDESCRIPTION.

System.String regionShrink

Method to shrink regions.

System.Nullable<System.Int32> level

ZSTD compression level.

System.Nullable<System.Boolean> subifd

Save pyr layers as sub-IFDs.

System.Nullable<System.Boolean> lossless

Enable WEBP lossless mode.

System.String depth

Pyramid depth.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Tiffsave(filename, compression: string, q: int, predictor: string, profile: string, tile: bool, tileWidth: int, tileHeight: int, pyramid: bool, miniswhite: bool, bitdepth: int, resunit: string, xres: double, yres: double, bigtiff: bool, properties: bool, regionShrink: string, level: int, subifd: bool, lossless: bool, depth: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

TiffsaveBuffer(String, Nullable<Int32>, String, String, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, String, Nullable<Double>, Nullable<Double>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to tiff buffer.

Declaration
public byte[] TiffsaveBuffer(string compression = null, int? q = default(int? ), string predictor = null, string profile = null, bool? tile = default(bool? ), int? tileWidth = default(int? ), int? tileHeight = default(int? ), bool? pyramid = default(bool? ), bool? miniswhite = default(bool? ), int? bitdepth = default(int? ), string resunit = null, double? xres = default(double? ), double? yres = default(double? ), bool? bigtiff = default(bool? ), bool? properties = default(bool? ), string regionShrink = null, int? level = default(int? ), bool? subifd = default(bool? ), bool? lossless = default(bool? ), string depth = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String compression

Compression for this file.

System.Nullable<System.Int32> q

Q factor.

System.String predictor

Compression prediction.

System.String profile

ICC profile to embed.

System.Nullable<System.Boolean> tile

Write a tiled tiff.

System.Nullable<System.Int32> tileWidth

Tile width in pixels.

System.Nullable<System.Int32> tileHeight

Tile height in pixels.

System.Nullable<System.Boolean> pyramid

Write a pyramidal tiff.

System.Nullable<System.Boolean> miniswhite

Use 0 for white in 1-bit images.

System.Nullable<System.Int32> bitdepth

Write as a 1, 2, 4 or 8 bit image.

System.String resunit

Resolution unit.

System.Nullable<System.Double> xres

Horizontal resolution in pixels/mm.

System.Nullable<System.Double> yres

Vertical resolution in pixels/mm.

System.Nullable<System.Boolean> bigtiff

Write a bigtiff image.

System.Nullable<System.Boolean> properties

Write a properties document to IMAGEDESCRIPTION.

System.String regionShrink

Method to shrink regions.

System.Nullable<System.Int32> level

ZSTD compression level.

System.Nullable<System.Boolean> subifd

Save pyr layers as sub-IFDs.

System.Nullable<System.Boolean> lossless

Enable WEBP lossless mode.

System.String depth

Pyramid depth.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Returns
Type Description
System.Byte[]

An array of bytes.

Examples
byte[] buffer = in.TiffsaveBuffer(compression: string, q: int, predictor: string, profile: string, tile: bool, tileWidth: int, tileHeight: int, pyramid: bool, miniswhite: bool, bitdepth: int, resunit: string, xres: double, yres: double, bigtiff: bool, properties: bool, regionShrink: string, level: int, subifd: bool, lossless: bool, depth: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

Tilecache(Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, String, Nullable<Boolean>, Nullable<Boolean>)

Cache an image as a set of tiles.

Declaration
public Image Tilecache(int? tileWidth = default(int? ), int? tileHeight = default(int? ), int? maxTiles = default(int? ), string access = null, bool? threaded = default(bool? ), bool? persistent = default(bool? ))
Parameters
Type Name Description
System.Nullable<System.Int32> tileWidth

Tile width in pixels.

System.Nullable<System.Int32> tileHeight

Tile height in pixels.

System.Nullable<System.Int32> maxTiles

Maximum number of tiles to cache.

System.String access

Expected access pattern.

System.Nullable<System.Boolean> threaded

Allow threaded access.

System.Nullable<System.Boolean> persistent

Keep cache between evaluations.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Tilecache(tileWidth: int, tileHeight: int, maxTiles: int, access: string, threaded: bool, persistent: bool);
| Improve this Doc View Source

Tonelut(Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>, Nullable<Double>)

Build a look-up table.

Declaration
public static Image Tonelut(int? inMax = default(int? ), int? outMax = default(int? ), double? lb = default(double? ), double? lw = default(double? ), double? ps = default(double? ), double? pm = default(double? ), double? ph = default(double? ), double? s = default(double? ), double? m = default(double? ), double? h = default(double? ))
Parameters
Type Name Description
System.Nullable<System.Int32> inMax

Size of LUT to build.

System.Nullable<System.Int32> outMax

Maximum value in output LUT.

System.Nullable<System.Double> lb

Lowest value in output.

System.Nullable<System.Double> lw

Highest value in output.

System.Nullable<System.Double> ps

Position of shadow.

System.Nullable<System.Double> pm

Position of mid-tones.

System.Nullable<System.Double> ph

Position of highlights.

System.Nullable<System.Double> s

Adjust shadows by this much.

System.Nullable<System.Double> m

Adjust mid-tones by this much.

System.Nullable<System.Double> h

Adjust highlights by this much.

Returns
Type Description
Image

A new Image.

Examples
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);
| Improve this Doc View Source

ToString()

Returns a string that represents the current image.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string that represents the current image.

Overrides
System.Object.ToString()
| Improve this Doc View Source

Transpose3d(Nullable<Int32>)

Transpose3d an image.

Declaration
public Image Transpose3d(int? pageHeight = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> pageHeight

Height of each input page.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Transpose3d(pageHeight: int);
| Improve this Doc View Source

Unpremultiply(Nullable<Double>, Nullable<Int32>)

Unpremultiply image alpha.

Declaration
public Image Unpremultiply(double? maxAlpha = default(double? ), int? alphaBand = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Double> maxAlpha

Maximum value of alpha channel.

System.Nullable<System.Int32> alphaBand

Unpremultiply with this alpha.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Unpremultiply(maxAlpha: double, alphaBand: int);
| Improve this Doc View Source

Vipsload(String, out Int32, Nullable<Boolean>, String, Nullable<Boolean>)

Load vips from file.

Declaration
public static Image Vipsload(string filename, out int flags, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Vipsload(filename, out var flags, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Vipsload(String, Nullable<Boolean>, String, Nullable<Boolean>)

Load vips from file.

Declaration
public static Image Vipsload(string filename, bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Vipsload(filename, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Vipssave(String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to vips file.

Declaration
public void Vipssave(string filename, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String filename

Filename to save to.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Vipssave(filename, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

Webpload(String, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Boolean>, String, Nullable<Boolean>)

Load webp from file.

Declaration
public static Image Webpload(string filename, out int flags, int? page = default(int? ), int? n = default(int? ), double? scale = default(double? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> scale

Scale factor on load.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Webpload(filename, out var flags, page: int, n: int, scale: double, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Webpload(String, Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Boolean>, String, Nullable<Boolean>)

Load webp from file.

Declaration
public static Image Webpload(string filename, int? page = default(int? ), int? n = default(int? ), double? scale = default(double? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.String filename

Filename to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> scale

Scale factor on load.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Webpload(filename, page: int, n: int, scale: double, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

WebploadBuffer(Byte[], out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Boolean>, String, Nullable<Boolean>)

Load webp from buffer.

Declaration
public static Image WebploadBuffer(byte[] buffer, out int flags, int? page = default(int? ), int? n = default(int? ), double? scale = default(double? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> scale

Scale factor on load.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.WebploadBuffer(buffer, out var flags, page: int, n: int, scale: double, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

WebploadBuffer(Byte[], Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Boolean>, String, Nullable<Boolean>)

Load webp from buffer.

Declaration
public static Image WebploadBuffer(byte[] buffer, int? page = default(int? ), int? n = default(int? ), double? scale = default(double? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.Byte[] buffer

Buffer to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> scale

Scale factor on load.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.WebploadBuffer(buffer, page: int, n: int, scale: double, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

WebploadSource(Source, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Boolean>, String, Nullable<Boolean>)

Load webp from source.

Declaration
public static Image WebploadSource(Source source, out int flags, int? page = default(int? ), int? n = default(int? ), double? scale = default(double? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> scale

Scale factor on load.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.WebploadSource(source, out var flags, page: int, n: int, scale: double, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

WebploadSource(Source, Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Boolean>, String, Nullable<Boolean>)

Load webp from source.

Declaration
public static Image WebploadSource(Source source, int? page = default(int? ), int? n = default(int? ), double? scale = default(double? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
Source source

Source to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> scale

Scale factor on load.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.WebploadSource(source, page: int, n: int, scale: double, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

WebploadStream(Stream, out Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Boolean>, String, Nullable<Boolean>)

Load webp from stream.

Declaration
public static Image WebploadStream(Stream stream, out int flags, int? page = default(int? ), int? n = default(int? ), double? scale = default(double? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Int32 flags

Flags for this file.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> scale

Scale factor on load.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.WebploadStream(stream, out var flags, page: int, n: int, scale: double, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

WebploadStream(Stream, Nullable<Int32>, Nullable<Int32>, Nullable<Double>, Nullable<Boolean>, String, Nullable<Boolean>)

Load webp from stream.

Declaration
public static Image WebploadStream(Stream stream, int? page = default(int? ), int? n = default(int? ), double? scale = default(double? ), bool? memory = default(bool? ), string access = null, bool? fail = default(bool? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to load from.

System.Nullable<System.Int32> page

Load this page from the file.

System.Nullable<System.Int32> n

Load this many pages.

System.Nullable<System.Double> scale

Scale factor on load.

System.Nullable<System.Boolean> memory

Force open via memory.

System.String access

Required access pattern for this file.

System.Nullable<System.Boolean> fail

Fail on first error.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.WebploadStream(stream, page: int, n: int, scale: double, memory: bool, access: string, fail: bool);
| Improve this Doc View Source

Webpsave(String, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to webp file.

Declaration
public void Webpsave(string filename, int? q = default(int? ), bool? lossless = default(bool? ), string preset = null, bool? smartSubsample = default(bool? ), bool? nearLossless = default(bool? ), int? alphaQ = default(int? ), bool? minSize = default(bool? ), int? kmin = default(int? ), int? kmax = default(int? ), int? reductionEffort = default(int? ), string profile = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.String filename

Filename to save to.

System.Nullable<System.Int32> q

Q factor.

System.Nullable<System.Boolean> lossless

enable lossless compression.

System.String preset

Preset for lossy compression.

System.Nullable<System.Boolean> smartSubsample

Enable high quality chroma subsampling.

System.Nullable<System.Boolean> nearLossless

Enable preprocessing in lossless mode (uses Q).

System.Nullable<System.Int32> alphaQ

Change alpha plane fidelity for lossy compression.

System.Nullable<System.Boolean> minSize

Optimise for minium size.

System.Nullable<System.Int32> kmin

Minimum number of frames between key frames.

System.Nullable<System.Int32> kmax

Maximum number of frames between key frames.

System.Nullable<System.Int32> reductionEffort

Level of CPU effort to reduce file size.

System.String profile

ICC profile to embed.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.Webpsave(filename, q: int, lossless: bool, preset: string, smartSubsample: bool, nearLossless: bool, alphaQ: int, minSize: bool, kmin: int, kmax: int, reductionEffort: int, profile: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

WebpsaveBuffer(Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to webp buffer.

Declaration
public byte[] WebpsaveBuffer(int? q = default(int? ), bool? lossless = default(bool? ), string preset = null, bool? smartSubsample = default(bool? ), bool? nearLossless = default(bool? ), int? alphaQ = default(int? ), bool? minSize = default(bool? ), int? kmin = default(int? ), int? kmax = default(int? ), int? reductionEffort = default(int? ), string profile = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> q

Q factor.

System.Nullable<System.Boolean> lossless

enable lossless compression.

System.String preset

Preset for lossy compression.

System.Nullable<System.Boolean> smartSubsample

Enable high quality chroma subsampling.

System.Nullable<System.Boolean> nearLossless

Enable preprocessing in lossless mode (uses Q).

System.Nullable<System.Int32> alphaQ

Change alpha plane fidelity for lossy compression.

System.Nullable<System.Boolean> minSize

Optimise for minium size.

System.Nullable<System.Int32> kmin

Minimum number of frames between key frames.

System.Nullable<System.Int32> kmax

Maximum number of frames between key frames.

System.Nullable<System.Int32> reductionEffort

Level of CPU effort to reduce file size.

System.String profile

ICC profile to embed.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Returns
Type Description
System.Byte[]

An array of bytes.

Examples
byte[] buffer = in.WebpsaveBuffer(q: int, lossless: bool, preset: string, smartSubsample: bool, nearLossless: bool, alphaQ: int, minSize: bool, kmin: int, kmax: int, reductionEffort: int, profile: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

WebpsaveStream(Stream, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to webp stream.

Declaration
public void WebpsaveStream(Stream stream, int? q = default(int? ), bool? lossless = default(bool? ), string preset = null, bool? smartSubsample = default(bool? ), bool? nearLossless = default(bool? ), int? alphaQ = default(int? ), bool? minSize = default(bool? ), int? kmin = default(int? ), int? kmax = default(int? ), int? reductionEffort = default(int? ), string profile = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
System.IO.Stream stream

Stream to save to.

System.Nullable<System.Int32> q

Q factor.

System.Nullable<System.Boolean> lossless

enable lossless compression.

System.String preset

Preset for lossy compression.

System.Nullable<System.Boolean> smartSubsample

Enable high quality chroma subsampling.

System.Nullable<System.Boolean> nearLossless

Enable preprocessing in lossless mode (uses Q).

System.Nullable<System.Int32> alphaQ

Change alpha plane fidelity for lossy compression.

System.Nullable<System.Boolean> minSize

Optimise for minium size.

System.Nullable<System.Int32> kmin

Minimum number of frames between key frames.

System.Nullable<System.Int32> kmax

Maximum number of frames between key frames.

System.Nullable<System.Int32> reductionEffort

Level of CPU effort to reduce file size.

System.String profile

ICC profile to embed.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.WebpsaveStream(stream, q: int, lossless: bool, preset: string, smartSubsample: bool, nearLossless: bool, alphaQ: int, minSize: bool, kmin: int, kmax: int, reductionEffort: int, profile: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

WebpsaveTarget(Target, Nullable<Int32>, Nullable<Boolean>, String, Nullable<Boolean>, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, String, Nullable<Boolean>, Double[], Nullable<Int32>)

Save image to webp target.

Declaration
public void WebpsaveTarget(Target target, int? q = default(int? ), bool? lossless = default(bool? ), string preset = null, bool? smartSubsample = default(bool? ), bool? nearLossless = default(bool? ), int? alphaQ = default(int? ), bool? minSize = default(bool? ), int? kmin = default(int? ), int? kmax = default(int? ), int? reductionEffort = default(int? ), string profile = null, bool? strip = default(bool? ), double[] background = null, int? pageHeight = default(int? ))
Parameters
Type Name Description
Target target

Target to save to.

System.Nullable<System.Int32> q

Q factor.

System.Nullable<System.Boolean> lossless

enable lossless compression.

System.String preset

Preset for lossy compression.

System.Nullable<System.Boolean> smartSubsample

Enable high quality chroma subsampling.

System.Nullable<System.Boolean> nearLossless

Enable preprocessing in lossless mode (uses Q).

System.Nullable<System.Int32> alphaQ

Change alpha plane fidelity for lossy compression.

System.Nullable<System.Boolean> minSize

Optimise for minium size.

System.Nullable<System.Int32> kmin

Minimum number of frames between key frames.

System.Nullable<System.Int32> kmax

Maximum number of frames between key frames.

System.Nullable<System.Int32> reductionEffort

Level of CPU effort to reduce file size.

System.String profile

ICC profile to embed.

System.Nullable<System.Boolean> strip

Strip all metadata from image.

System.Double[] background

Background value.

System.Nullable<System.Int32> pageHeight

Set page height for multipage save.

Examples
in.WebpsaveTarget(target, q: int, lossless: bool, preset: string, smartSubsample: bool, nearLossless: bool, alphaQ: int, minSize: bool, kmin: int, kmax: int, reductionEffort: int, profile: string, strip: bool, background: double[], pageHeight: int);
| Improve this Doc View Source

Wop(Image)

Raise to power of an image, but with the arguments reversed.

Declaration
public Image Wop(Image other)
Parameters
Type Name Description
Image other

To the power of this.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Wop(Double)

Raise to power of an constant, but with the arguments reversed.

Declaration
public Image Wop(double other)
Parameters
Type Name Description
System.Double other

To the power of this.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Wop(Double[])

Raise to power of an array, but with the arguments reversed.

Declaration
public Image Wop(double[] other)
Parameters
Type Name Description
System.Double[] other

To the power of this.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Wop(Int32[])

Raise to power of an array, but with the arguments reversed.

Declaration
public Image Wop(int[] other)
Parameters
Type Name Description
System.Int32[] other

To the power of this.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Worley(Int32, Int32, Nullable<Int32>)

Make a worley noise image.

Declaration
public static Image Worley(int width, int height, int? cellSize = default(int? ))
Parameters
Type Name Description
System.Int32 width

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Nullable<System.Int32> cellSize

Size of Worley cells.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Worley(width, height, cellSize: int);
| Improve this Doc View Source

Wrap(Nullable<Int32>, Nullable<Int32>)

Wrap image origin.

Declaration
public Image Wrap(int? x = default(int? ), int? y = default(int? ))
Parameters
Type Name Description
System.Nullable<System.Int32> x

Left edge of input in output.

System.Nullable<System.Int32> y

Top edge of input in output.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Wrap(x: int, y: int);
| Improve this Doc View Source

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.

| Improve this Doc View Source

WriteToBuffer(String, VOption)

Write an image to a formatted string.

Declaration
public byte[] WriteToBuffer(string formatString, VOption kwargs = null)
Parameters
Type Name Description
System.String formatString

The suffix, plus any string-form arguments.

VOption kwargs

Optional options that depend on the save operation.

Returns
Type Description
System.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, Nullable<Boolean>, String, Nullable<Boolean>, 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.

| Improve this Doc View Source

WriteToFile(String, VOption)

Write an image to a file on disc.

Declaration
public void WriteToFile(string vipsFilename, VOption kwargs = null)
Parameters
Type Name Description
System.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, Nullable<Boolean>, String, Nullable<Boolean>, 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.

| Improve this Doc View Source

WriteToMemory()

Write the image to a large memory array.

Declaration
public byte[] WriteToMemory()
Returns
Type Description
System.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.

| Improve this Doc View Source

WriteToMemory(out UInt64)

Write the image to memory as a simple, unformatted C-style array.

Declaration
public IntPtr WriteToMemory(out ulong size)
Parameters
Type Name Description
System.UInt64 size

Output buffer length.

Returns
Type Description
System.IntPtr

A System.IntPtr pointing to an unformatted C-style array.

Remarks

The caller is responsible for freeing this memory with Free(IntPtr).

Exceptions
Type Condition
VipsException

If unable to write to memory.

| Improve this Doc View Source

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
System.IO.Stream stream

Write to this stream.

System.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.

| Improve this Doc View Source

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.

System.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.

| Improve this Doc View Source

Xyz(Int32, Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>)

Make an image where pixel values are coordinates.

Declaration
public static Image Xyz(int width, int height, int? csize = default(int? ), int? dsize = default(int? ), int? esize = default(int? ))
Parameters
Type Name Description
System.Int32 width

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Nullable<System.Int32> csize

Size of third dimension.

System.Nullable<System.Int32> dsize

Size of fourth dimension.

System.Nullable<System.Int32> esize

Size of fifth dimension.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Xyz(width, height, csize: int, dsize: int, esize: int);
| Improve this Doc View Source

XYZ2CMYK()

Transform XYZ to CMYK.

Declaration
public Image XYZ2CMYK()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.XYZ2CMYK();
| Improve this Doc View Source

XYZ2Lab(Double[])

Transform XYZ to Lab.

Declaration
public Image XYZ2Lab(double[] temp = null)
Parameters
Type Name Description
System.Double[] temp

Colour temperature.

Returns
Type Description
Image

A new Image.

Examples
Image @out = in.XYZ2Lab(temp: double[]);
| Improve this Doc View Source

XYZ2scRGB()

Transform XYZ to scRGB.

Declaration
public Image XYZ2scRGB()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.XYZ2scRGB();
| Improve this Doc View Source

XYZ2Yxy()

Transform XYZ to Yxy.

Declaration
public Image XYZ2Yxy()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.XYZ2Yxy();
| Improve this Doc View Source

Yxy2XYZ()

Transform Yxy to XYZ.

Declaration
public Image Yxy2XYZ()
Returns
Type Description
Image

A new Image.

Examples
Image @out = in.Yxy2XYZ();
| Improve this Doc View Source

Zone(Int32, Int32, Nullable<Boolean>)

Make a zone plate.

Declaration
public static Image Zone(int width, int height, bool? uchar = default(bool? ))
Parameters
Type Name Description
System.Int32 width

Image width in pixels.

System.Int32 height

Image height in pixels.

System.Nullable<System.Boolean> uchar

Output an unsigned char image.

Returns
Type Description
Image

A new Image.

Examples
Image @out = NetVips.Image.Zone(width, height, uchar: bool);
| Improve this Doc View Source

Zoom(Int32, Int32)

Zoom an image.

Declaration
public Image Zoom(int xfac, int yfac)
Parameters
Type Name Description
System.Int32 xfac

Horizontal zoom factor.

System.Int32 yfac

Vertical zoom factor.

Returns
Type Description
Image

A new Image.

Examples
Image @out = input.Zoom(xfac, yfac);

Operators

| Improve this Doc View Source

Addition(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.

| Improve this Doc View Source

Addition(Image, Double)

This operation calculates left + right.

Declaration
public static Image operator +(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

System.Double right

Right double constant.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Addition(Image, Double[])

This operation calculates left + right.

Declaration
public static Image operator +(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

System.Double[] right

Right double array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Addition(Image, Int32[])

This operation calculates left + right.

Declaration
public static Image operator +(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

System.Int32[] right

Right integer array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Addition(Double, Image)

This operation calculates left + right.

Declaration
public static Image operator +(double left, Image right)
Parameters
Type Name Description
System.Double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Addition(Double[], Image)

This operation calculates left + right.

Declaration
public static Image operator +(double[] left, Image right)
Parameters
Type Name Description
System.Double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Addition(Int32[], Image)

This operation calculates left + right.

Declaration
public static Image operator +(int[] left, Image right)
Parameters
Type Name Description
System.Int32[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

BitwiseAnd(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.

| Improve this Doc View Source

BitwiseAnd(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.

System.Double right

Right double constant.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

BitwiseAnd(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.

System.Double[] right

Right double array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

BitwiseAnd(Image, Int32[])

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.

System.Int32[] right

Right integer array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

BitwiseAnd(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
System.Double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

BitwiseAnd(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
System.Double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

BitwiseAnd(Int32[], Image)

This operation computes the logical bitwise AND of its operands.

Declaration
public static Image operator &(int[] left, Image right)
Parameters
Type Name Description
System.Int32[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

BitwiseOr(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.

| Improve this Doc View Source

BitwiseOr(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.

System.Double right

Right double constant.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

BitwiseOr(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.

System.Double[] right

Right double array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

BitwiseOr(Image, Int32[])

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.

System.Int32[] right

Right integer array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

BitwiseOr(Double, Image)

This operation computes the bitwise OR of its operands.

Declaration
public static Image operator |(double left, Image right)
Parameters
Type Name Description
System.Double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

BitwiseOr(Double[], Image)

This operation computes the bitwise OR of its operands.

Declaration
public static Image operator |(double[] left, Image right)
Parameters
Type Name Description
System.Double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

BitwiseOr(Int32[], Image)

This operation computes the bitwise OR of its operands.

Declaration
public static Image operator |(int[] left, Image right)
Parameters
Type Name Description
System.Int32[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Division(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.

| Improve this Doc View Source

Division(Image, Double)

This operation calculates left / right.

Declaration
public static Image operator /(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

System.Double right

Right double constant.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Division(Image, Double[])

This operation calculates left / right.

Declaration
public static Image operator /(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

System.Double[] right

Right double array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Division(Image, Int32[])

This operation calculates left / right.

Declaration
public static Image operator /(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

System.Int32[] right

Right integer array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Division(Double, Image)

This operation calculates left / right.

Declaration
public static Image operator /(double left, Image right)
Parameters
Type Name Description
System.Double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Division(Double[], Image)

This operation calculates left / right.

Declaration
public static Image operator /(double[] left, Image right)
Parameters
Type Name Description
System.Double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Division(Int32[], Image)

This operation calculates left / right.

Declaration
public static Image operator /(int[] left, Image right)
Parameters
Type Name Description
System.Int32[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Equality(Double, Image)

This operation compares two images on equality.

Declaration
public static Image operator ==(double left, Image right)
Parameters
Type Name Description
System.Double left

Left double constant to compare.

Image right

Right Image to compare.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Equality(Double[], Image)

This operation compares two images on equality.

Declaration
public static Image operator ==(double[] left, Image right)
Parameters
Type Name Description
System.Double[] left

Left double array to compare.

Image right

Right Image to compare.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Equality(Int32[], Image)

This operation compares two images on equality.

Declaration
public static Image operator ==(int[] left, Image right)
Parameters
Type Name Description
System.Int32[] left

Left integer array to compare.

Image right

Right Image to compare.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

ExclusiveOr(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.

| Improve this Doc View Source

ExclusiveOr(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.

System.Double right

Right double constant.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

ExclusiveOr(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.

System.Double[] right

Right double array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

ExclusiveOr(Image, Int32[])

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.

System.Int32[] right

Right integer array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

ExclusiveOr(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
System.Double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

ExclusiveOr(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
System.Double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

ExclusiveOr(Int32[], Image)

This operation computes the bitwise exclusive-OR of its operands.

Declaration
public static Image operator ^(int[] left, Image right)
Parameters
Type Name Description
System.Int32[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

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
System.Boolean

true if image is definitely false; otherwise, false.

| Improve this Doc View Source

GreaterThan(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.

| Improve this Doc View Source

GreaterThan(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.

System.Double right

Right double constant.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

GreaterThan(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.

System.Double[] right

Right double array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

GreaterThan(Image, Int32[])

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.

System.Int32[] right

Right integer array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

GreaterThan(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
System.Double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

GreaterThan(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
System.Double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

GreaterThan(Int32[], 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
System.Int32[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

GreaterThanOrEqual(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.

| Improve this Doc View Source

GreaterThanOrEqual(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.

System.Double right

Right double constant.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

GreaterThanOrEqual(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.

System.Double[] right

Right double array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

GreaterThanOrEqual(Image, Int32[])

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.

System.Int32[] right

Right integer array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

GreaterThanOrEqual(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
System.Double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

GreaterThanOrEqual(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
System.Double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

GreaterThanOrEqual(Int32[], 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
System.Int32[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Inequality(Double, Image)

This operation compares two images on inequality.

Declaration
public static Image operator !=(double left, Image right)
Parameters
Type Name Description
System.Double left

Left double constant to compare.

Image right

Right Image to compare.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Inequality(Double[], Image)

This operation compares two images on inequality.

Declaration
public static Image operator !=(double[] left, Image right)
Parameters
Type Name Description
System.Double[] left

Left double array to compare.

Image right

Right Image to compare.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Inequality(Int32[], Image)

This operation compares two images on inequality.

Declaration
public static Image operator !=(int[] left, Image right)
Parameters
Type Name Description
System.Int32[] left

Left integer array to compare.

Image right

Right Image to compare.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

LeftShift(Image, Int32)

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.

System.Int32 right

The number of bits.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

LessThan(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.

| Improve this Doc View Source

LessThan(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.

System.Double right

Right double constant.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

LessThan(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.

System.Double[] right

Right double array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

LessThan(Image, Int32[])

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.

System.Int32[] right

Right integer array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

LessThan(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
System.Double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

LessThan(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
System.Double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

LessThan(Int32[], 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
System.Int32[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

LessThanOrEqual(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.

| Improve this Doc View Source

LessThanOrEqual(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.

System.Double right

Right double constant.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

LessThanOrEqual(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.

System.Double[] right

Right double array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

LessThanOrEqual(Image, Int32[])

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.

System.Int32[] right

Right integer array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

LessThanOrEqual(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
System.Double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

LessThanOrEqual(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
System.Double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

LessThanOrEqual(Int32[], 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
System.Int32[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Modulus(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.

| Improve this Doc View Source

Modulus(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.

System.Double right

Right double constant.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Modulus(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.

System.Double[] right

Right double array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Modulus(Image, Int32[])

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.

System.Int32[] right

Right integer array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Modulus(Double, Image)

This operation calculates left % right (remainder after integer division).

Declaration
public static Image operator %(double left, Image right)
Parameters
Type Name Description
System.Double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Modulus(Double[], Image)

This operation calculates left % right (remainder after integer division).

Declaration
public static Image operator %(double[] left, Image right)
Parameters
Type Name Description
System.Double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Modulus(Int32[], Image)

This operation calculates left % right (remainder after integer division).

Declaration
public static Image operator %(int[] left, Image right)
Parameters
Type Name Description
System.Int32[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Multiply(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.

| Improve this Doc View Source

Multiply(Image, Double)

This operation calculates left * right.

Declaration
public static Image operator *(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

System.Double right

Right double constant.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Multiply(Image, Double[])

This operation calculates left * right.

Declaration
public static Image operator *(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

System.Double[] right

Right double array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Multiply(Image, Int32[])

This operation calculates left * right.

Declaration
public static Image operator *(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

System.Int32[] right

Right integer array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Multiply(Double, Image)

This operation calculates left * right.

Declaration
public static Image operator *(double left, Image right)
Parameters
Type Name Description
System.Double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Multiply(Double[], Image)

This operation calculates left * right.

Declaration
public static Image operator *(double[] left, Image right)
Parameters
Type Name Description
System.Double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Multiply(Int32[], Image)

This operation calculates left * right.

Declaration
public static Image operator *(int[] left, Image right)
Parameters
Type Name Description
System.Int32[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

RightShift(Image, Int32)

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.

System.Int32 right

The number of bits.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Subtraction(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.

| Improve this Doc View Source

Subtraction(Image, Double)

This operation calculates left - right.

Declaration
public static Image operator -(Image left, double right)
Parameters
Type Name Description
Image left

Left Image.

System.Double right

Right double constant.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Subtraction(Image, Double[])

This operation calculates left - right.

Declaration
public static Image operator -(Image left, double[] right)
Parameters
Type Name Description
Image left

Left Image.

System.Double[] right

Right double array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Subtraction(Image, Int32[])

This operation calculates left - right.

Declaration
public static Image operator -(Image left, int[] right)
Parameters
Type Name Description
Image left

Left Image.

System.Int32[] right

Right integer array.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Subtraction(Double, Image)

This operation calculates left - right.

Declaration
public static Image operator -(double left, Image right)
Parameters
Type Name Description
System.Double left

Left double constant.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Subtraction(Double[], Image)

This operation calculates left - right.

Declaration
public static Image operator -(double[] left, Image right)
Parameters
Type Name Description
System.Double[] left

Left double array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

Subtraction(Int32[], Image)

This operation calculates left - right.

Declaration
public static Image operator -(int[] left, Image right)
Parameters
Type Name Description
System.Int32[] left

Left integer array.

Image right

Right Image.

Returns
Type Description
Image

A new Image.

| Improve this Doc View Source

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
System.Boolean

true if image is definitely true; otherwise, false.

Implements

System.IDisposable

Extension Methods

BitmapConverter.ToBitmap(Image)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX