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.SetString(String)
VipsObject.GetDescription()
GObject.ReleaseHandle()
GObject.IsInvalid
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.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
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

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[], 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, 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.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[], 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

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(Object)

Append a set of images or constants bandwise.

Declaration
public Image Bandjoin(object other)
Parameters
Type Name Description
System.Object other

Array of input images

Returns
Type Description
Image

A new Image

Examples
Image @out = image.Bandjoin(other);
| 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(Object, Nullable<Int32>)

Band-wise rank of a set of images

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

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

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

CallEnum(Object, Object, String, String)

Handy for the overloadable operators. A vips operator like 'more', but if the arg is not an image (ie. it's a constant), call 'more_const' instead.

Declaration
public static object CallEnum(object image, object other, string operationName, string operation)
Parameters
Type Name Description
System.Object image

The left-hand argument.

System.Object other

The right-hand argument.

System.String operationName

The base part of the operation name.

System.String operation

The operation to call.

Returns
Type Description
System.Object
| 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

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

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(Object, Object, String, Nullable<Boolean>)

Blend an array of images with an array of blend modes

Declaration
public Image Composite(object other, object mode, string compositingSpace = null, bool? premultiplied = default(bool? ))
Parameters
Type Name Description
System.Object other

Array of input images

System.Object mode

Array of VipsBlendMode to join with

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(other, mode, 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<Boolean>, String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, String)

Load csv from file

Declaration
public static Image Csvload(string filename, out int flags, bool? memory = default(bool? ), string access = null, int? skip = default(int? ), int? lines = default(int? ), bool? fail = default(bool? ), string whitespace = null, string separator = null)
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.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.Nullable<System.Boolean> fail

Fail on first error

System.String whitespace

Set of whitespace characters

System.String separator

Set of separator characters

Returns
Type Description
Image

A new Image

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

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

Load csv from file

Declaration
public static Image Csvload(string filename, bool? memory = default(bool? ), string access = null, int? skip = default(int? ), int? lines = default(int? ), bool? fail = default(bool? ), string whitespace = null, string separator = null)
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.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.Nullable<System.Boolean> fail

Fail on first error

System.String whitespace

Set of whitespace characters

System.String separator

Set of separator characters

Returns
Type Description
Image

A new Image

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

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

Save image to csv file

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

Filename to save to

System.Nullable<System.Int32> pageHeight

Set page height for multipage save

System.String separator

Separator characters

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

Examples
in.Csvsave(filename, pageHeight: int, separator: string, strip: bool, background: double[]);
| 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
Returns
Type Description
Image

A new Image

| Improve this Doc View Source

Dispose(Boolean)

Declaration
protected override void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing
Overrides
System.Runtime.InteropServices.SafeHandle.Dispose(System.Boolean)
| 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, Nullable<Int32>, String, Nullable<Int32>, Nullable<Int32>, Nullable<Boolean>, String, String, String, Nullable<Boolean>, Nullable<Int32>, String, Nullable<Boolean>, Double[])

Save image to deepzoom file

Declaration
public void Dzsave(string filename, string basename = null, string layout = null, int? pageHeight = default(int? ), 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, bool? strip = default(bool? ), double[] background = null)
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.Nullable<System.Int32> pageHeight

Set page height for multipage save

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

Strip all metadata from image

System.Double[] background

Background value

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

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

Save image to dz buffer

Declaration
public byte[] DzsaveBuffer(string basename = null, string layout = null, int? pageHeight = default(int? ), 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, bool? strip = default(bool? ), double[] background = null)
Parameters
Type Name Description
System.String basename

Base name to save to

System.String layout

Directory layout

System.Nullable<System.Int32> pageHeight

Set page height for multipage save

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

Strip all metadata from image

System.Double[] background

Background value

Returns
Type Description
System.Byte[]

An array of bytes

Examples
byte[] buffer = in.DzsaveBuffer(basename: string, layout: string, pageHeight: int, suffix: string, overlap: int, tileSize: int, centre: bool, depth: string, angle: string, container: string, properties: bool, compression: int, regionShrink: string, strip: bool, background: double[]);
| 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

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
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

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<Int32>, Nullable<Boolean>, Double[])

Save image to fits file

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

Filename to save to

System.Nullable<System.Int32> pageHeight

Set page height for multipage save

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

Examples
in.Fitssave(filename, pageHeight: int, strip: bool, background: double[]);
| 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)
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 immage.

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

Load GIF with giflib

Declaration
public static Image Gifload(string filename, out int flags, int? n = default(int? ), bool? memory = default(bool? ), string access = null, int? page = default(int? ), 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> 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.Int32> page

Load this page from the 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, n: int, memory: bool, access: string, page: int, fail: bool);
| Improve this Doc View Source

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

Load GIF with giflib

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

Filename to load from

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.Int32> page

Load this page from the file

System.Nullable<System.Boolean> fail

Fail on first error

Returns
Type Description
Image

A new Image

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

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

Load GIF with giflib

Declaration
public static Image GifloadBuffer(byte[] buffer, out int flags, int? n = default(int? ), bool? memory = default(bool? ), string access = null, int? page = default(int? ), 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> 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.Int32> page

Load this page from the 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, n: int, memory: bool, access: string, page: int, fail: bool);
| Improve this Doc View Source

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

Load GIF with giflib

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

Buffer to load from

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.Int32> page

Load this page from the file

System.Nullable<System.Boolean> fail

Fail on first error

Returns
Type Description
Image

A new Image

Examples
Image @out = NetVips.Image.GifloadBuffer(buffer, n: int, memory: bool, access: string, page: int, 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

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
System.Object value
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

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

Load jpeg from file

Declaration
public static Image Jpegload(string filename, out int flags, bool? memory = default(bool? ), string access = null, int? shrink = default(int? ), bool? fail = default(bool? ), bool? autorotate = 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.Int32> shrink

Shrink factor on load

System.Nullable<System.Boolean> fail

Fail on first error

System.Nullable<System.Boolean> autorotate

Rotate image using exif orientation

Returns
Type Description
Image

A new Image

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

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

Load jpeg from file

Declaration
public static Image Jpegload(string filename, bool? memory = default(bool? ), string access = null, int? shrink = default(int? ), bool? fail = default(bool? ), bool? autorotate = 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.Int32> shrink

Shrink factor on load

System.Nullable<System.Boolean> fail

Fail on first error

System.Nullable<System.Boolean> autorotate

Rotate image using exif orientation

Returns
Type Description
Image

A new Image

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

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

Load jpeg from buffer

Declaration
public static Image JpegloadBuffer(byte[] buffer, out int flags, bool? memory = default(bool? ), string access = null, int? shrink = default(int? ), bool? fail = default(bool? ), bool? autorotate = 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.Int32> shrink

Shrink factor on load

System.Nullable<System.Boolean> fail

Fail on first error

System.Nullable<System.Boolean> autorotate

Rotate image using exif orientation

Returns
Type Description
Image

A new Image

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

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

Load jpeg from buffer

Declaration
public static Image JpegloadBuffer(byte[] buffer, bool? memory = default(bool? ), string access = null, int? shrink = default(int? ), bool? fail = default(bool? ), bool? autorotate = 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.Int32> shrink

Shrink factor on load

System.Nullable<System.Boolean> fail

Fail on first error

System.Nullable<System.Boolean> autorotate

Rotate image using exif orientation

Returns
Type Description
Image

A new Image

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

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

Save image to jpeg file

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

Filename to save to

System.Nullable<System.Int32> pageHeight

Set page height for multipage save

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> noSubsample

Disable chroma subsample

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 the spectrum of DCT coefficients into separate scans

System.Nullable<System.Int32> quantTable

Use predefined quantization table with given index

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

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

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

Save image to jpeg buffer

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

Set page height for multipage save

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> noSubsample

Disable chroma subsample

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 the spectrum of DCT coefficients into separate scans

System.Nullable<System.Int32> quantTable

Use predefined quantization table with given index

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

Returns
Type Description
System.Byte[]

An array of bytes

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

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

Save image to jpeg mime

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

Set page height for multipage save

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> noSubsample

Disable chroma subsample

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 the spectrum of DCT coefficients into separate scans

System.Nullable<System.Int32> quantTable

Use predefined quantization table with given index

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

Examples
in.JpegsaveMime(pageHeight: int, q: int, profile: string, optimizeCoding: bool, interlace: bool, noSubsample: bool, trellisQuant: bool, overshootDeringing: bool, optimizeScans: bool, quantTable: int, strip: bool, background: double[]);
| 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<Int32>, Nullable<Boolean>, Double[])

Save file with ImageMagick

Declaration
public void Magicksave(string filename, string format = null, int? quality = default(int? ), int? pageHeight = default(int? ), bool? strip = default(bool? ), double[] background = null)
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.Int32> pageHeight

Set page height for multipage save

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

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

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

Save image to magick buffer

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

Format to save in

System.Nullable<System.Int32> quality

Quality to use

System.Nullable<System.Int32> pageHeight

Set page height for multipage save

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

Returns
Type Description
System.Byte[]

An array of bytes

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

Mapim(Image, GObject)

Resample with an mapim 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

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

Load matrix from file

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 from file

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

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

Print matrix

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

Set page height for multipage save

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

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

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

Save image to matrix file

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

Filename to save to

System.Nullable<System.Int32> pageHeight

Set page height for multipage save

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

Examples
in.Matrixsave(filename, pageHeight: int, strip: bool, background: double[]);
| 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
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 vertcial 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 vertcial 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 vertcial 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 vertcial 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 vertcial 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 vertcial 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 vertcial 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 vertcial 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 vertcial 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(Object, Double, Double)

Create an image from a 1D or 2D array.

Declaration
public static Image NewFromArray(object array, double scale = 1, double offset = 0)
Parameters
Type Name Description
System.Object 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

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(Object, String, String, Nullable<Boolean>, VOption)

Load a formatted image from memory.

Declaration
public static Image NewFromBuffer(object data, string strOptions = "", string access = null, bool? fail = default(bool? ), VOption kwargs = null)
Parameters
Type Name Description
System.Object 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 damanged 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 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 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 damanged 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(Object)

Make a new image from an existing one.

Declaration
public Image NewFromImage(object value)
Parameters
Type Name Description
System.Object 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

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 memoryview or buffer 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

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<Int32>, Nullable<Boolean>, Double[])

Save image to nifti file

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

Filename to save to

System.Nullable<System.Int32> pageHeight

Set page height for multipage save

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

Examples
in.Niftisave(filename, pageHeight: int, strip: bool, background: double[]);
| 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>, String, Nullable<Int32>, Nullable<Boolean>, Nullable<Boolean>, String)

Load file with OpenSlide

Declaration
public static Image Openslideload(string filename, out int flags, bool? memory = default(bool? ), string access = null, int? level = default(int? ), bool? autocrop = default(bool? ), bool? fail = default(bool? ), string associated = null)
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.Int32> level

Load this level from the file

System.Nullable<System.Boolean> autocrop

Crop to image bounds

System.Nullable<System.Boolean> fail

Fail on first error

System.String associated

Load this associated image

Returns
Type Description
Image

A new Image

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

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

Load file with OpenSlide

Declaration
public static Image Openslideload(string filename, bool? memory = default(bool? ), string access = null, int? level = default(int? ), bool? autocrop = default(bool? ), bool? fail = default(bool? ), string associated = null)
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.Int32> level

Load this level from the file

System.Nullable<System.Boolean> autocrop

Crop to image bounds

System.Nullable<System.Boolean> fail

Fail on first error

System.String associated

Load this associated image

Returns
Type Description
Image

A new Image

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

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

Load PDF with libpoppler

Declaration
public static Image Pdfload(string filename, out int flags, bool? memory = default(bool? ), string access = null, int? page = default(int? ), int? n = default(int? ), bool? fail = default(bool? ), double? dpi = default(double? ), double? scale = default(double? ), double[] background = null)
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.Int32> page

Load this page from the file

System.Nullable<System.Int32> n

Load this many pages

System.Nullable<System.Boolean> fail

Fail on first error

System.Nullable<System.Double> dpi

Render at this DPI

System.Nullable<System.Double> scale

Scale output by this factor

System.Double[] background

Background value

Returns
Type Description
Image

A new Image

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

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

Load PDF with libpoppler

Declaration
public static Image Pdfload(string filename, bool? memory = default(bool? ), string access = null, int? page = default(int? ), int? n = default(int? ), bool? fail = default(bool? ), double? dpi = default(double? ), double? scale = default(double? ), double[] background = null)
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.Int32> page

Load this page from the file

System.Nullable<System.Int32> n

Load this many pages

System.Nullable<System.Boolean> fail

Fail on first error

System.Nullable<System.Double> dpi

Render at this DPI

System.Nullable<System.Double> scale

Scale output by this factor

System.Double[] background

Background value

Returns
Type Description
Image

A new Image

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

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

Load PDF with libpoppler

Declaration
public static Image PdfloadBuffer(byte[] buffer, out int flags, bool? memory = default(bool? ), string access = null, int? page = default(int? ), int? n = default(int? ), bool? fail = default(bool? ), double? dpi = default(double? ), double? scale = default(double? ), double[] background = null)
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.Int32> page

Load this page from the file

System.Nullable<System.Int32> n

Load this many pages

System.Nullable<System.Boolean> fail

Fail on first error

System.Nullable<System.Double> dpi

Render at this DPI

System.Nullable<System.Double> scale

Scale output by this factor

System.Double[] background

Background value

Returns
Type Description
Image

A new Image

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

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

Load PDF with libpoppler

Declaration
public static Image PdfloadBuffer(byte[] buffer, bool? memory = default(bool? ), string access = null, int? page = default(int? ), int? n = default(int? ), bool? fail = default(bool? ), double? dpi = default(double? ), double? scale = default(double? ), double[] background = null)
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.Int32> page

Load this page from the file

System.Nullable<System.Int32> n

Load this many pages

System.Nullable<System.Boolean> fail

Fail on first error

System.Nullable<System.Double> dpi

Render at this DPI

System.Nullable<System.Double> scale

Scale output by this factor

System.Double[] background

Background value

Returns
Type Description
Image

A new Image

Examples
Image @out = NetVips.Image.PdfloadBuffer(buffer, memory: bool, access: string, page: int, n: int, fail: bool, dpi: double, scale: double, background: double[]);
| 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

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

Save image to png file

Declaration
public void Pngsave(string filename, int? compression = default(int? ), bool? interlace = default(bool? ), int? pageHeight = default(int? ), string profile = null, int? filter = default(int? ), bool? palette = default(bool? ), int? colours = default(int? ), int? q = default(int? ), double? dither = default(double? ), bool? strip = default(bool? ), double[] background = null)
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.Nullable<System.Int32> pageHeight

Set page height for multipage save

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> colours

Max number of palette colours

System.Nullable<System.Int32> q

Quantisation quality

System.Nullable<System.Double> dither

Amount of dithering

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

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

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

Save image to png buffer

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

Compression factor

System.Nullable<System.Boolean> interlace

Interlace image

System.Nullable<System.Int32> pageHeight

Set page height for multipage save

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> colours

Max number of palette colours

System.Nullable<System.Int32> q

Quantisation quality

System.Nullable<System.Double> dither

Amount of dithering

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

Returns
Type Description
System.Byte[]

An array of bytes

Examples
byte[] buffer = in.PngsaveBuffer(compression: int, interlace: bool, pageHeight: int, profile: string, filter: int, palette: bool, colours: int, q: int, dither: double, strip: bool, background: double[]);
| 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

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

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

Save image to ppm file

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

Filename to save to

System.Nullable<System.Int32> pageHeight

Set page height for multipage save

System.Nullable<System.Boolean> ascii

save as ascii

System.Nullable<System.Boolean> squash

save as one bit

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

Examples
in.Ppmsave(filename, pageHeight: int, ascii: bool, squash: bool, strip: bool, background: double[]);
| 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

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

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

Save image to Radiance file

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

Filename to save to

System.Nullable<System.Int32> pageHeight

Set page height for multipage save

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

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

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

Save image to Radiance buffer

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

Set page height for multipage save

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

Returns
Type Description
System.Byte[]

An array of bytes

Examples
byte[] buffer = in.RadsaveBuffer(pageHeight: int, strip: bool, background: double[]);
| 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

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

Save image to raw file

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

Filename to save to

System.Nullable<System.Int32> pageHeight

Set page height for multipage save

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

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

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

Write raw image to file descriptor

Declaration
public void RawsaveFd(int fd, int? pageHeight = default(int? ), bool? strip = default(bool? ), double[] background = null)
Parameters
Type Name Description
System.Int32 fd

File descriptor to write to

System.Nullable<System.Int32> pageHeight

Set page height for multipage save

System.Nullable<System.Boolean> strip

Strip all metadata from image

System.Double[] background

Background value

Examples
in.RawsaveFd(fd, pageHeight: int, strip: bool, background: double[]);
| 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, Nullable<Boolean>)

Reduce an image

Declaration
public Image Reduce(double hshrink, double vshrink, string kernel = null, bool? centre = default(bool? ))
Parameters
Type Name Description
System.Double hshrink

Horizontal shrink factor

System.Double vshrink

Vertical shrink factor

System.String kernel

Resampling kernel

System.Nullable<System.Boolean> centre

Use centre sampling convention

Returns
Type Description
Image

A new Image

Examples
Image @out = in.Reduce(hshrink, vshrink, kernel: string, centre: bool);
| Improve this Doc View Source

Reduceh(Double, String, Nullable<Boolean>)

Shrink an image horizontally

Declaration
public Image Reduceh(double hshrink, string kernel = null, bool? centre = default(bool? ))
Parameters
Type Name Description
System.Double hshrink

Horizontal shrink factor

System.String kernel

Resampling kernel

System.Nullable<System.Boolean> centre

Use centre sampling convention

Returns
Type Description
Image

A new Image

Examples
Image @out = in.Reduceh(hshrink, kernel: string, centre: bool);
| Improve this Doc View Source

Reducev(Double, String, Nullable<Boolean>)

Shrink an image vertically

Declaration
public Image Reducev(double vshrink, string kernel = null, bool? centre = default(bool? ))
Parameters
Type Name Description
System.Double vshrink

Vertical shrink factor

System.String kernel

Resampling kernel

System.Nullable<System.Boolean> centre

Use centre sampling convention

Returns
Type Description
Image

A new Image

Examples
Image @out = in.Reducev(vshrink, kernel: string, centre: bool);
| 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
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(String, Object)

Set the value of an item of metadata.

Declaration
public override 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.

Overrides
VipsObject.Set(String, Object)
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

SetType(IntPtr, String, Object)

Set the type and value of an item of metadata.

Declaration
public void SetType(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.

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

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(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<Boolean>, String, Nullable<Double>, Nullable<Boolean>, Nullable<Double>)

Load SVG with rsvg

Declaration
public static Image Svgload(string filename, out int flags, bool? memory = default(bool? ), string access = null, double? dpi = default(double? ), bool? fail = default(bool? ), double? scale = default(double? ))
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.Double> dpi

Render at this DPI

System.Nullable<System.Boolean> fail

Fail on first error

System.Nullable<System.Double> scale

Scale output by this factor

Returns
Type Description
Image

A new Image

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

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

Load SVG with rsvg

Declaration
public static Image Svgload(string filename, bool? memory = default(bool? ), string access = null, double? dpi = default(double? ), bool? fail = default(bool? ), double? scale = default(double? ))
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.Double> dpi

Render at this DPI

System.Nullable<System.Boolean> fail

Fail on first error

System.Nullable<System.Double> scale

Scale output by this factor

Returns
Type Description
Image

A new Image

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

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

Load SVG with rsvg

Declaration
public static Image SvgloadBuffer(byte[] buffer, out int flags, bool? memory = default(bool? ), string access = null, double? dpi = default(double? ), bool? fail = default(bool? ), double? scale = default(double? ))
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.Double> dpi

Render at this DPI

System.Nullable<System.Boolean> fail

Fail on first error

System.Nullable<System.Double> scale

Scale output by this factor

Returns
Type Description
Image

A new Image

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

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

Load SVG with rsvg

Declaration
public static Image SvgloadBuffer(byte[] buffer, bool? memory = default(bool? ), string access = null, double? dpi = default(double? ), bool? fail = default(bool? ), double? scale = default(double? ))
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.Double> dpi

Render at this DPI

System.Nullable<System.Boolean> fail

Fail on first error

System.Nullable<System.Double> scale

Scale output by this factor

Returns
Type Description
Image

A new Image

Examples
Image @out = NetVips.Image.SvgloadBuffer(buffer, memory: bool, access: string, dpi: double, fail: bool, scale: double);
| 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<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? ), 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.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, spacing: int, fontfile: string);
| Improve this Doc View Source

Text(String, String, Nullable<Int32>, Nullable<Int32>, String, Nullable<Int32>, 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? ), 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.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, 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? autoRotate = 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> autoRotate

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, autoRotate: bool, crop: string, linear: bool, importProfile: string, exportProfile: string, intent: string);
| Improve this Doc View Source

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

Generate thumbnail from buffer

Declaration
public static Image ThumbnailBuffer(byte[] buffer, int width, int? height = default(int? ), string size = null, bool? autoRotate = 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.Nullable<System.Int32> height

Size to this height

System.String size

Only upsize, only downsize, or both

System.Nullable<System.Boolean> autoRotate

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, height: int, size: string, autoRotate: bool, crop: string, linear: bool, importProfile: string, exportProfile: string, intent: string);
|