Table of Contents

Class MagickImage

Namespace
ImageMagick
Assembly
Magick.NET-Q16-AnyCPU.dll

Class that represents an ImageMagick image.

public sealed class MagickImage : IMagickImage<ushort>, IMagickImage, IComparable<IMagickImage<ushort>?>, IDisposable
Inheritance
MagickImage
Implements
IMagickImage<ushort>
IMagickImage
IComparable<IMagickImage<ushort>>
Inherited Members

Constructors

MagickImage()

Initializes a new instance of the MagickImage class.

public MagickImage()

MagickImage(IMagickColor<ushort>, int, int)

Initializes a new instance of the MagickImage class.

public MagickImage(IMagickColor<ushort> color, int width, int height)

Parameters

color IMagickColor<ushort>

The color to fill the image with.

width int

The width.

height int

The height.

MagickImage(IMagickImage<ushort>)

Initializes a new instance of the MagickImage class.

public MagickImage(IMagickImage<ushort> image)

Parameters

image IMagickImage<ushort>

The image to create a copy of.

MagickImage(byte[])

Initializes a new instance of the MagickImage class.

public MagickImage(byte[] data)

Parameters

data byte[]

The byte array to read the image data from.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MagickImage(byte[], IMagickReadSettings<ushort>)

Initializes a new instance of the MagickImage class.

public MagickImage(byte[] data, IMagickReadSettings<ushort> readSettings)

Parameters

data byte[]

The byte array to read the image data from.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MagickImage(byte[], MagickFormat)

Initializes a new instance of the MagickImage class.

public MagickImage(byte[] data, MagickFormat format)

Parameters

data byte[]

The byte array to read the image data from.

format MagickFormat

The format to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MagickImage(byte[], int, int)

Initializes a new instance of the MagickImage class.

public MagickImage(byte[] data, int offset, int count)

Parameters

data byte[]

The byte array to read the image data from.

offset int

The offset at which to begin reading data.

count int

The maximum number of bytes to read.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MagickImage(byte[], int, int, IMagickReadSettings<ushort>)

Initializes a new instance of the MagickImage class.

public MagickImage(byte[] data, int offset, int count, IMagickReadSettings<ushort> readSettings)

Parameters

data byte[]

The byte array to read the image data from.

offset int

The offset at which to begin reading data.

count int

The maximum number of bytes to read.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MagickImage(byte[], int, int, MagickFormat)

Initializes a new instance of the MagickImage class.

public MagickImage(byte[] data, int offset, int count, MagickFormat format)

Parameters

data byte[]

The byte array to read the image data from.

offset int

The offset at which to begin reading data.

count int

The maximum number of bytes to read.

format MagickFormat

The format to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MagickImage(FileInfo)

Initializes a new instance of the MagickImage class.

public MagickImage(FileInfo file)

Parameters

file FileInfo

The file to read the image from.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MagickImage(FileInfo, IMagickReadSettings<ushort>)

Initializes a new instance of the MagickImage class.

public MagickImage(FileInfo file, IMagickReadSettings<ushort> readSettings)

Parameters

file FileInfo

The file to read the image from.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MagickImage(FileInfo, MagickFormat)

Initializes a new instance of the MagickImage class.

public MagickImage(FileInfo file, MagickFormat format)

Parameters

file FileInfo

The file to read the image from.

format MagickFormat

The format to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MagickImage(Stream)

Initializes a new instance of the MagickImage class.

public MagickImage(Stream stream)

Parameters

stream Stream

The stream to read the image data from.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MagickImage(Stream, IMagickReadSettings<ushort>)

Initializes a new instance of the MagickImage class.

public MagickImage(Stream stream, IMagickReadSettings<ushort> readSettings)

Parameters

stream Stream

The stream to read the image data from.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MagickImage(Stream, MagickFormat)

Initializes a new instance of the MagickImage class.

public MagickImage(Stream stream, MagickFormat format)

Parameters

stream Stream

The stream to read the image data from.

format MagickFormat

The format to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MagickImage(string)

Initializes a new instance of the MagickImage class.

public MagickImage(string fileName)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MagickImage(string, IMagickReadSettings<ushort>)

Initializes a new instance of the MagickImage class.

public MagickImage(string fileName, IMagickReadSettings<ushort> readSettings)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MagickImage(string, MagickFormat)

Initializes a new instance of the MagickImage class.

public MagickImage(string fileName, MagickFormat format)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

format MagickFormat

The format to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MagickImage(string, int, int)

Initializes a new instance of the MagickImage class.

public MagickImage(string fileName, int width, int height)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

width int

The width.

height int

The height.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Properties

AnimationDelay

Gets or sets the time in 1/100ths of a second which must expire before splaying the next image in an animated sequence.

public int AnimationDelay { get; set; }

Property Value

int

AnimationIterations

Gets or sets the number of iterations to loop an animation (e.g. Netscape loop extension) for.

public int AnimationIterations { get; set; }

Property Value

int

AnimationTicksPerSecond

Gets or sets the ticks per seconds for the animation delay.

public int AnimationTicksPerSecond { get; set; }

Property Value

int

ArtifactNames

Gets the names of the artifacts.

public IEnumerable<string> ArtifactNames { get; }

Property Value

IEnumerable<string>

AttributeNames

Gets the names of the attributes.

public IEnumerable<string> AttributeNames { get; }

Property Value

IEnumerable<string>

BackgroundColor

Gets or sets the background color of the image.

public IMagickColor<ushort>? BackgroundColor { get; set; }

Property Value

IMagickColor<ushort>

BaseHeight

Gets the height of the image before transformations.

public int BaseHeight { get; }

Property Value

int

BaseWidth

Gets the width of the image before transformations.

public int BaseWidth { get; }

Property Value

int

BlackPointCompensation

Gets or sets a value indicating whether black point compensation should be used.

public bool BlackPointCompensation { get; set; }

Property Value

bool

BorderColor

Gets or sets the border color of the image.

public IMagickColor<ushort>? BorderColor { get; set; }

Property Value

IMagickColor<ushort>

BoundingBox

Gets the smallest bounding box enclosing non-border pixels. The current fuzz value is used when discriminating between pixels.

public IMagickGeometry? BoundingBox { get; }

Property Value

IMagickGeometry

ChannelCount

Gets the number of channels that the image contains.

public int ChannelCount { get; }

Property Value

int

Channels

Gets the color and metadata channels of the image.

public IEnumerable<PixelChannel> Channels { get; }

Property Value

IEnumerable<PixelChannel>

ChromaBluePrimary

Gets or sets the chromaticity blue primary point.

[Obsolete("This property will be removed in the next major release, use Chromaticity instead.")]
public IPrimaryInfo ChromaBluePrimary { get; set; }

Property Value

IPrimaryInfo

ChromaGreenPrimary

Gets or sets the chromaticity green primary point.

[Obsolete("This property will be removed in the next major release, use Chromaticity instead.")]
public IPrimaryInfo ChromaGreenPrimary { get; set; }

Property Value

IPrimaryInfo

ChromaRedPrimary

Gets or sets the chromaticity red primary point.

[Obsolete("This property will be removed in the next major release, use Chromaticity instead.")]
public IPrimaryInfo ChromaRedPrimary { get; set; }

Property Value

IPrimaryInfo

ChromaWhitePoint

Gets or sets the chromaticity white primary point.

[Obsolete("This property will be removed in the next major release, use Chromaticity instead.")]
public IPrimaryInfo ChromaWhitePoint { get; set; }

Property Value

IPrimaryInfo

Chromaticity

Gets or sets the chromaticity of the image.

public IChromaticityInfo Chromaticity { get; set; }

Property Value

IChromaticityInfo

ClassType

Gets or sets the image class (DirectClass or PseudoClass) NOTE: Setting a DirectClass image to PseudoClass will result in the loss of color information if the number of colors in the image is greater than the maximum palette size (either 256 (Q8) or 65536 (Q16).

public ClassType ClassType { get; set; }

Property Value

ClassType

ColorFuzz

Gets or sets the distance where colors are considered equal.

public Percentage ColorFuzz { get; set; }

Property Value

Percentage

ColorSpace

Gets or sets the color space of the image.

public ColorSpace ColorSpace { get; set; }

Property Value

ColorSpace

ColorType

Gets or sets the color type of the image.

public ColorType ColorType { get; set; }

Property Value

ColorType

ColormapSize

Gets or sets the colormap size (number of colormap entries).

public int ColormapSize { get; set; }

Property Value

int

Comment

Gets or sets the comment text of the image.

public string? Comment { get; set; }

Property Value

string

Compose

Gets or sets the composition operator to be used when composition is implicitly used (such as for image flattening).

public CompositeOperator Compose { get; set; }

Property Value

CompositeOperator

Compression

Gets the compression method of the image.

public CompressionMethod Compression { get; }

Property Value

CompressionMethod

Density

Gets or sets the vertical and horizontal resolution in pixels of the image.

public Density Density { get; set; }

Property Value

Density

Depth

Gets or sets the depth (bits allocated to red/green/blue components).

public int Depth { get; set; }

Property Value

int

EncodingGeometry

Gets the preferred size of the image when encoding.

[Obsolete("Will be removed in the next major release.")]
public IMagickGeometry? EncodingGeometry { get; }

Property Value

IMagickGeometry

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Endian

Gets or sets the endianness (little like Intel or big like SPARC) for image formats which support endian-specific options.

public Endian Endian { get; set; }

Property Value

Endian

FileName

Gets the original file name of the image (only available if read from disk).

public string? FileName { get; }

Property Value

string

FilterType

Gets or sets the filter to use when resizing image.

public FilterType FilterType { get; set; }

Property Value

FilterType

Format

Gets or sets the format of the image.

public MagickFormat Format { get; set; }

Property Value

MagickFormat

FormatInfo

Gets the information about the format of the image.

[Obsolete("Will be removed in the next major release, use MagickFormatInfo.Create(image.Format) instead.")]
public IMagickFormatInfo? FormatInfo { get; }

Property Value

IMagickFormatInfo

Gamma

Gets the gamma level of the image.

public double Gamma { get; }

Property Value

double

GifDisposeMethod

Gets or sets the gif disposal method.

public GifDisposeMethod GifDisposeMethod { get; set; }

Property Value

GifDisposeMethod

HasAlpha

Gets or sets a value indicating whether the image supports transparency (alpha channel).

public bool HasAlpha { get; set; }

Property Value

bool

Height

Gets the height of the image.

public int Height { get; }

Property Value

int

Interlace

Gets or sets the type of interlacing to use.

public Interlace Interlace { get; set; }

Property Value

Interlace

Interpolate

Gets or sets the pixel color interpolate method to use.

public PixelInterpolateMethod Interpolate { get; set; }

Property Value

PixelInterpolateMethod

IsDisposed

Gets a value indicating whether the instance is disposed.

[Obsolete("Will be removed in the next major release.")]
public bool IsDisposed { get; }

Property Value

bool

IsOpaque

Gets a value indicating whether none of the pixels in the image have an alpha value other than OpaqueAlpha (QuantumRange).

public bool IsOpaque { get; }

Property Value

bool

Label

Gets or sets the label of the image.

public string? Label { get; set; }

Property Value

string

MatteColor

Gets or sets the matte color.

public IMagickColor<ushort>? MatteColor { get; set; }

Property Value

IMagickColor<ushort>

MetaChannelCount

Gets or sets the number of meta channels that the image contains.

public int MetaChannelCount { get; set; }

Property Value

int

Orientation

Gets or sets the photo orientation of the image.

public OrientationType Orientation { get; set; }

Property Value

OrientationType

Page

Gets or sets the preferred size and location of an image canvas.

public IMagickGeometry Page { get; set; }

Property Value

IMagickGeometry

ProfileNames

Gets the names of the profiles.

public IEnumerable<string> ProfileNames { get; }

Property Value

IEnumerable<string>

Quality

Gets or sets the JPEG/MIFF/PNG compression level (default 75).

public int Quality { get; set; }

Property Value

int

RenderingIntent

Gets or sets the type of rendering intent.

public RenderingIntent RenderingIntent { get; set; }

Property Value

RenderingIntent

Settings

Gets the settings for this MagickImage instance.

public IMagickSettings<ushort> Settings { get; }

Property Value

IMagickSettings<ushort>

Signature

Gets the signature of this image.

public string Signature { get; }

Property Value

string

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

TotalColors

Gets the number of colors in the image.

public int TotalColors { get; }

Property Value

int

VirtualPixelMethod

Gets or sets the virtual pixel method.

public VirtualPixelMethod VirtualPixelMethod { get; set; }

Property Value

VirtualPixelMethod

Width

Gets the width of the image.

public int Width { get; }

Property Value

int

Methods

AdaptiveBlur()

Adaptive-blur image with the default blur factor (0x1).

public void AdaptiveBlur()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AdaptiveBlur(double)

Adaptive-blur image with specified blur factor.

public void AdaptiveBlur(double radius)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AdaptiveBlur(double, double)

Adaptive-blur image with specified blur factor.

public void AdaptiveBlur(double radius, double sigma)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AdaptiveResize(IMagickGeometry)

Resize using mesh interpolation. It works well for small resizes of less than +/- 50% of the original image size. For larger resizing on images a full filtered and slower resize function should be used instead.

public void AdaptiveResize(IMagickGeometry geometry)

Parameters

geometry IMagickGeometry

The geometry to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AdaptiveResize(int, int)

Resize using mesh interpolation. It works well for small resizes of less than +/- 50% of the original image size. For larger resizing on images a full filtered and slower resize function should be used instead.

Resize will fit the image into the requested size. It does NOT fill, the requested box size. Use the ImageMagick.IMagickGeometry overload for more control over the resulting size.
public void AdaptiveResize(int width, int height)

Parameters

width int

The new width.

height int

The new height.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AdaptiveSharpen()

Adaptively sharpens the image by sharpening more intensely near image edges and less intensely far from edges.

public void AdaptiveSharpen()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AdaptiveSharpen(Channels)

Adaptively sharpens the image by sharpening more intensely near image edges and less intensely far from edges.

public void AdaptiveSharpen(Channels channels)

Parameters

channels Channels

The channel(s) that should be sharpened.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AdaptiveSharpen(double, double)

Adaptively sharpens the image by sharpening more intensely near image edges and less intensely far from edges.

public void AdaptiveSharpen(double radius, double sigma)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AdaptiveSharpen(double, double, Channels)

Adaptively sharpens the image by sharpening more intensely near image edges and less intensely far from edges.

public void AdaptiveSharpen(double radius, double sigma, Channels channels)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

channels Channels

The channel(s) that should be sharpened.

AdaptiveThreshold(int, int)

Local adaptive threshold image. http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm.

public void AdaptiveThreshold(int width, int height)

Parameters

width int

The width of the pixel neighborhood.

height int

The height of the pixel neighborhood.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AdaptiveThreshold(int, int, Channels)

Local adaptive threshold image. http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm.

public void AdaptiveThreshold(int width, int height, Channels channels)

Parameters

width int

The width of the pixel neighborhood.

height int

The height of the pixel neighborhood.

channels Channels

The channel(s) that should be thresholded.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AdaptiveThreshold(int, int, Percentage)

Local adaptive threshold image. http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm.

public void AdaptiveThreshold(int width, int height, Percentage biasPercentage)

Parameters

width int

The width of the pixel neighborhood.

height int

The height of the pixel neighborhood.

biasPercentage Percentage

Constant to subtract from pixel neighborhood mean.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AdaptiveThreshold(int, int, Percentage, Channels)

Local adaptive threshold image. http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm.

public void AdaptiveThreshold(int width, int height, Percentage biasPercentage, Channels channels)

Parameters

width int

The width of the pixel neighborhood.

height int

The height of the pixel neighborhood.

biasPercentage Percentage

Constant to subtract from pixel neighborhood mean.

channels Channels

The channel(s) that should be thresholded.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AdaptiveThreshold(int, int, double)

Local adaptive threshold image. http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm.

public void AdaptiveThreshold(int width, int height, double bias)

Parameters

width int

The width of the pixel neighborhood.

height int

The height of the pixel neighborhood.

bias double

Constant to subtract from pixel neighborhood mean (+/-)(0-QuantumRange).

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AdaptiveThreshold(int, int, double, Channels)

Local adaptive threshold image. http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm.

public void AdaptiveThreshold(int width, int height, double bias, Channels channels)

Parameters

width int

The width of the pixel neighborhood.

height int

The height of the pixel neighborhood.

bias double

Constant to subtract from pixel neighborhood mean (+/-)(0-QuantumRange).

channels Channels

The channel(s) that should be thresholded.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AddNoise(NoiseType)

Add noise to image with the specified noise type.

public void AddNoise(NoiseType noiseType)

Parameters

noiseType NoiseType

The type of noise that should be added to the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AddNoise(NoiseType, Channels)

Add noise to the specified channel of the image with the specified noise type.

public void AddNoise(NoiseType noiseType, Channels channels)

Parameters

noiseType NoiseType

The type of noise that should be added to the image.

channels Channels

The channel(s) where the noise should be added.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AddNoise(NoiseType, double)

Add noise to image with the specified noise type.

public void AddNoise(NoiseType noiseType, double attenuate)

Parameters

noiseType NoiseType

The type of noise that should be added to the image.

attenuate double

Attenuate the random distribution.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AddNoise(NoiseType, double, Channels)

Add noise to the specified channel of the image with the specified noise type.

public void AddNoise(NoiseType noiseType, double attenuate, Channels channels)

Parameters

noiseType NoiseType

The type of noise that should be added to the image.

attenuate double

Attenuate the random distribution.

channels Channels

The channel(s) where the noise should be added.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AffineTransform(IDrawableAffine)

Affine Transform image.

public void AffineTransform(IDrawableAffine affineMatrix)

Parameters

affineMatrix IDrawableAffine

The affine matrix to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Alpha(AlphaOption)

Applies the specified alpha option.

public void Alpha(AlphaOption value)

Parameters

value AlphaOption

The option to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Annotate(string, Gravity)

Annotate with text (bounding area is entire image) and placement gravity.

public void Annotate(string text, Gravity gravity)

Parameters

text string

The text to use.

gravity Gravity

The placement gravity.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Annotate(string, IMagickGeometry)

Annotate using specified text, and bounding area.

public void Annotate(string text, IMagickGeometry boundingArea)

Parameters

text string

The text to use.

boundingArea IMagickGeometry

The bounding area.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Annotate(string, IMagickGeometry, Gravity)

Annotate using specified text, bounding area, and placement gravity.

public void Annotate(string text, IMagickGeometry boundingArea, Gravity gravity)

Parameters

text string

The text to use.

boundingArea IMagickGeometry

The bounding area.

gravity Gravity

The placement gravity.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Annotate(string, IMagickGeometry, Gravity, double)

Annotate using specified text, bounding area, and placement gravity.

public void Annotate(string text, IMagickGeometry boundingArea, Gravity gravity, double angle)

Parameters

text string

The text to use.

boundingArea IMagickGeometry

The bounding area.

gravity Gravity

The placement gravity.

angle double

The rotation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AutoGamma()

Extracts the 'mean' from the image and adjust the image to try make set its gamma appropriatally.

public void AutoGamma()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AutoGamma(Channels)

Extracts the 'mean' from the image and adjust the image to try make set its gamma appropriatally.

public void AutoGamma(Channels channels)

Parameters

channels Channels

The channel(s) to set the gamma for.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AutoLevel()

Adjusts the levels of a particular image channel by scaling the minimum and maximum values to the full quantum range.

public void AutoLevel()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AutoLevel(Channels)

Adjusts the levels of a particular image channel by scaling the minimum and maximum values to the full quantum range.

public void AutoLevel(Channels channels)

Parameters

channels Channels

The channel(s) to level.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AutoOrient()

Adjusts an image so that its orientation is suitable for viewing.

public void AutoOrient()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

AutoThreshold(AutoThresholdMethod)

Automatically selects a threshold and replaces each pixel in the image with a black pixel if the image intentsity is less than the selected threshold otherwise white.

public void AutoThreshold(AutoThresholdMethod method)

Parameters

method AutoThresholdMethod

The threshold method to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

BilateralBlur(int, int)

Applies a non-linear, edge-preserving, and noise-reducing smoothing filter.

public void BilateralBlur(int width, int height)

Parameters

width int

The width of the neighborhood in pixels.

height int

The height of the neighborhood in pixels.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

BilateralBlur(int, int, double, double)

Applies a non-linear, edge-preserving, and noise-reducing smoothing filter.

public void BilateralBlur(int width, int height, double intensitySigma, double spatialSigma)

Parameters

width int

The width of the neighborhood in pixels.

height int

The height of the neighborhood in pixels.

intensitySigma double

The sigma in the intensity space.

spatialSigma double

The sigma in the coordinate space.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

BlackThreshold(Percentage)

Forces all pixels below the threshold into black while leaving all pixels at or above the threshold unchanged.

public void BlackThreshold(Percentage threshold)

Parameters

threshold Percentage

The threshold to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

BlackThreshold(Percentage, Channels)

Forces all pixels below the threshold into black while leaving all pixels at or above the threshold unchanged.

public void BlackThreshold(Percentage threshold, Channels channels)

Parameters

threshold Percentage

The threshold to use.

channels Channels

The channel(s) to make black.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

BlueShift()

Simulate a scene at nighttime in the moonlight.

public void BlueShift()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

BlueShift(double)

Simulate a scene at nighttime in the moonlight.

public void BlueShift(double factor)

Parameters

factor double

The factor to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Blur()

Blur image with the default blur factor (0x1).

public void Blur()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Blur(Channels)

Blur the specified channel(s) of the image with the default blur factor (0x1).

public void Blur(Channels channels)

Parameters

channels Channels

The channel(s) that should be blurred.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Blur(double, double)

Blur image with specified blur factor.

public void Blur(double radius, double sigma)

Parameters

radius double

The radius of the Gaussian in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Blur(double, double, Channels)

Blur the specified channel(s) of the image with the specified blur factor.

public void Blur(double radius, double sigma, Channels channels)

Parameters

radius double

The radius of the Gaussian in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

channels Channels

The channel(s) that should be blurred.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Border(Percentage)

Add a border to the image.

public void Border(Percentage percentage)

Parameters

percentage Percentage

The size of the border.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Border(int)

Add a border to the image.

public void Border(int size)

Parameters

size int

The size of the border.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Border(int, int)

Add a border to the image.

public void Border(int width, int height)

Parameters

width int

The width of the border.

height int

The height of the border.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

BrightnessContrast(Percentage, Percentage)

Changes the brightness and/or contrast of an image. It converts the brightness and contrast parameters into slope and intercept and calls a polynomical function to apply to the image.

public void BrightnessContrast(Percentage brightness, Percentage contrast)

Parameters

brightness Percentage

The brightness.

contrast Percentage

The contrast.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

BrightnessContrast(Percentage, Percentage, Channels)

Changes the brightness and/or contrast of an image. It converts the brightness and contrast parameters into slope and intercept and calls a polynomical function to apply to the image.

public void BrightnessContrast(Percentage brightness, Percentage contrast, Channels channels)

Parameters

brightness Percentage

The brightness.

contrast Percentage

The contrast.

channels Channels

The channel(s) that should be changed.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

CannyEdge()

Uses a multi-stage algorithm to detect a wide range of edges in images.

public void CannyEdge()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

CannyEdge(double, double, Percentage, Percentage)

Uses a multi-stage algorithm to detect a wide range of edges in images.

public void CannyEdge(double radius, double sigma, Percentage lower, Percentage upper)

Parameters

radius double

The radius of the gaussian smoothing filter.

sigma double

The sigma of the gaussian smoothing filter.

lower Percentage

Percentage of edge pixels in the lower threshold.

upper Percentage

Percentage of edge pixels in the upper threshold.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Charcoal()

Charcoal effect image (looks like charcoal sketch).

public void Charcoal()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Charcoal(double, double)

Charcoal effect image (looks like charcoal sketch).

public void Charcoal(double radius, double sigma)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Chop(IMagickGeometry)

Chop image (remove vertical or horizontal subregion of image) using the specified geometry.

public void Chop(IMagickGeometry geometry)

Parameters

geometry IMagickGeometry

The geometry to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ChopHorizontal(int, int)

Chop image (remove horizontal subregion of image).

public void ChopHorizontal(int offset, int width)

Parameters

offset int

The X offset from origin.

width int

The width of the part to chop horizontally.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ChopVertical(int, int)

Chop image (remove horizontal subregion of image).

public void ChopVertical(int offset, int height)

Parameters

offset int

The Y offset from origin.

height int

The height of the part to chop vertically.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Clahe(Percentage, Percentage, int, double)

A variant of adaptive histogram equalization in which the contrast amplification is limited, so as to reduce this problem of noise amplification.

public void Clahe(Percentage xTiles, Percentage yTiles, int numberBins, double clipLimit)

Parameters

xTiles Percentage

The percentage of tile divisions to use in horizontal direction.

yTiles Percentage

The percentage of tile divisions to use in vertical direction.

numberBins int

The number of bins for histogram ("dynamic range").

clipLimit double

The contrast limit for localised changes in contrast. A limit less than 1 results in standard non-contrast limited AHE.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Clahe(int, int, int, double)

A variant of adaptive histogram equalization in which the contrast amplification is limited, so as to reduce this problem of noise amplification.

public void Clahe(int xTiles, int yTiles, int numberBins, double clipLimit)

Parameters

xTiles int

The number of tile divisions to use in horizontal direction.

yTiles int

The number of tile divisions to use in vertical direction.

numberBins int

The number of bins for histogram ("dynamic range").

clipLimit double

The contrast limit for localised changes in contrast. A limit less than 1 results in standard non-contrast limited AHE.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Clamp()

Set each pixel whose value is below zero to zero and any the pixel whose value is above the quantum range to the quantum range (Quantum.Max) otherwise the pixel value remains unchanged.

public void Clamp()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Clamp(Channels)

Set each pixel whose value is below zero to zero and any the pixel whose value is above the quantum range to the quantum range (Quantum.Max) otherwise the pixel value remains unchanged.

public void Clamp(Channels channels)

Parameters

channels Channels

The channel(s) to clamp.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Clip()

Sets the image clip mask based on any clipping path information if it exists. The clipping path can be removed with RemoveWriteMask(). This operating takes effect inside the clipping path.

public void Clip()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Clip(string)

Sets the image clip mask based on any clipping path information if it exists. The clipping path can be removed with RemoveWriteMask(). This operating takes effect inside the clipping path.

public void Clip(string pathName)

Parameters

pathName string

Name of clipping path resource. If name is preceded by #, use clipping path numbered by name.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ClipOutside()

Sets the image clip mask based on any clipping path information if it exists. The clipping path can be removed with RemoveWriteMask(). This operating takes effect outside the clipping path.

public void ClipOutside()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ClipOutside(string)

Sets the image clip mask based on any clipping path information if it exists. The clipping path can be removed with RemoveWriteMask(). This operating takes effect outside the clipping path.

public void ClipOutside(string pathName)

Parameters

pathName string

Name of clipping path resource. If name is preceded by #, use clipping path numbered by name.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Clone()

Creates a clone of the current image.

public IMagickImage<ushort> Clone()

Returns

IMagickImage<ushort>

A clone of the current image.

Clone(IMagickGeometry)

Creates a clone of the current image with the specified geometry.

public IMagickImage<ushort> Clone(IMagickGeometry geometry)

Parameters

geometry IMagickGeometry

The area to clone.

Returns

IMagickImage<ushort>

A clone of the current image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Clone(int, int)

Creates a clone of the current image.

public IMagickImage<ushort> Clone(int width, int height)

Parameters

width int

The width of the area to clone.

height int

The height of the area to clone.

Returns

IMagickImage<ushort>

A clone of the current image.

Clone(int, int, int, int)

Creates a clone of the current image.

public IMagickImage<ushort> Clone(int x, int y, int width, int height)

Parameters

x int

The X offset from origin.

y int

The Y offset from origin.

width int

The width of the area to clone.

height int

The height of the area to clone.

Returns

IMagickImage<ushort>

A clone of the current image.

Clut(IMagickImage)

Apply a color lookup table (CLUT) to the image.

public void Clut(IMagickImage image)

Parameters

image IMagickImage

The image to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Clut(IMagickImage, Channels)

Apply a color lookup table (CLUT) to the image.

public void Clut(IMagickImage image, Channels channels)

Parameters

image IMagickImage

The image to use.

channels Channels

The channel(s) to clut.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Clut(IMagickImage, PixelInterpolateMethod)

Apply a color lookup table (CLUT) to the image.

public void Clut(IMagickImage image, PixelInterpolateMethod method)

Parameters

image IMagickImage

The image to use.

method PixelInterpolateMethod

Pixel interpolate method.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Clut(IMagickImage, PixelInterpolateMethod, Channels)

Apply a color lookup table (CLUT) to the image.

public void Clut(IMagickImage image, PixelInterpolateMethod method, Channels channels)

Parameters

image IMagickImage

The image to use.

method PixelInterpolateMethod

Pixel interpolate method.

channels Channels

The channel(s) to clut.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ColorAlpha(IMagickColor<ushort>)

Sets the alpha channel to the specified color.

public void ColorAlpha(IMagickColor<ushort> color)

Parameters

color IMagickColor<ushort>

The color to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ColorDecisionList(string)

Applies the color decision list from the specified ASC CDL file.

public void ColorDecisionList(string fileName)

Parameters

fileName string

The file to read the ASC CDL information from.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ColorMatrix(IMagickColorMatrix)

Apply a color matrix to the image channels.

public void ColorMatrix(IMagickColorMatrix matrix)

Parameters

matrix IMagickColorMatrix

The color matrix to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ColorThreshold(IMagickColor<ushort>, IMagickColor<ushort>)

Forces all pixels in the color range to white otherwise black.

public void ColorThreshold(IMagickColor<ushort> startColor, IMagickColor<ushort> stopColor)

Parameters

startColor IMagickColor<ushort>

The start color of the color range.

stopColor IMagickColor<ushort>

The stop color of the color range.

Colorize(IMagickColor<ushort>, Percentage)

Colorize image with the specified color, using specified percent alpha.

public void Colorize(IMagickColor<ushort> color, Percentage alpha)

Parameters

color IMagickColor<ushort>

The color to use.

alpha Percentage

The alpha percentage.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Colorize(IMagickColor<ushort>, Percentage, Percentage, Percentage)

Colorize image with the specified color, using specified percent alpha for red, green, and blue quantums.

public void Colorize(IMagickColor<ushort> color, Percentage alphaRed, Percentage alphaGreen, Percentage alphaBlue)

Parameters

color IMagickColor<ushort>

The color to use.

alphaRed Percentage

The alpha percentage for red.

alphaGreen Percentage

The alpha percentage for green.

alphaBlue Percentage

The alpha percentage for blue.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Compare(IMagickImage)

Compare current image with another image and returns error information.

public IMagickErrorInfo Compare(IMagickImage image)

Parameters

image IMagickImage

The other image to compare with this image.

Returns

IMagickErrorInfo

The error information.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Compare(IMagickImage, ErrorMetric)

Returns the distortion based on the specified metric.

public double Compare(IMagickImage image, ErrorMetric metric)

Parameters

image IMagickImage

The other image to compare with this image.

metric ErrorMetric

The metric to use.

Returns

double

The distortion based on the specified metric.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Compare(IMagickImage, ErrorMetric, Channels)

Returns the distortion based on the specified metric.

public double Compare(IMagickImage image, ErrorMetric metric, Channels channels)

Parameters

image IMagickImage

The other image to compare with this image.

metric ErrorMetric

The metric to use.

channels Channels

The channel(s) to compare.

Returns

double

The distortion based on the specified metric.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Compare(IMagickImage, ErrorMetric, IMagickImage)

Returns the distortion based on the specified metric.

public double Compare(IMagickImage image, ErrorMetric metric, IMagickImage difference)

Parameters

image IMagickImage

The other image to compare with this image.

metric ErrorMetric

The metric to use.

difference IMagickImage

The image that will contain the difference.

Returns

double

The distortion based on the specified metric.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Compare(IMagickImage, ErrorMetric, IMagickImage, Channels)

Returns the distortion based on the specified metric.

public double Compare(IMagickImage image, ErrorMetric metric, IMagickImage difference, Channels channels)

Parameters

image IMagickImage

The other image to compare with this image.

metric ErrorMetric

The metric to use.

difference IMagickImage

The image that will contain the difference.

channels Channels

The channel(s) to compare.

Returns

double

The distortion based on the specified metric.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Compare(IMagickImage, ICompareSettings<ushort>, IMagickImage)

Returns the distortion based on the specified metric.

public double Compare(IMagickImage image, ICompareSettings<ushort> settings, IMagickImage difference)

Parameters

image IMagickImage

The other image to compare with this image.

settings ICompareSettings<ushort>

The settings to use.

difference IMagickImage

The image that will contain the difference.

Returns

double

The distortion based on the specified metric.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Compare(IMagickImage, ICompareSettings<ushort>, IMagickImage, Channels)

Returns the distortion based on the specified metric.

public double Compare(IMagickImage image, ICompareSettings<ushort> settings, IMagickImage difference, Channels channels)

Parameters

image IMagickImage

The other image to compare with this image.

settings ICompareSettings<ushort>

The settings to use.

difference IMagickImage

The image that will contain the difference.

channels Channels

The channel(s) to compare.

Returns

double

The distortion based on the specified metric.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

CompareTo(IMagickImage<ushort>?)

Compares the current instance with another image. Only the size of the image is compared.

public int CompareTo(IMagickImage<ushort>? other)

Parameters

other IMagickImage<ushort>

The object to compare this image with.

Returns

int

A signed number indicating the relative values of this instance and value.

Composite(IMagickImage)

Compose an image onto another at specified offset using the 'In' operator.

public void Composite(IMagickImage image)

Parameters

image IMagickImage

The image to composite with this image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, Channels)

Compose an image onto another at specified offset using the 'In' operator.

public void Composite(IMagickImage image, Channels channels)

Parameters

image IMagickImage

The image to composite with this image.

channels Channels

The channel(s) to composite.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, CompositeOperator)

Compose an image onto another using the specified algorithm.

public void Composite(IMagickImage image, CompositeOperator compose)

Parameters

image IMagickImage

The image to composite with this image.

compose CompositeOperator

The algorithm to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, CompositeOperator, Channels)

Compose an image onto another using the specified algorithm.

public void Composite(IMagickImage image, CompositeOperator compose, Channels channels)

Parameters

image IMagickImage

The image to composite with this image.

compose CompositeOperator

The algorithm to use.

channels Channels

The channel(s) to composite.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, CompositeOperator, string?)

Compose an image onto another at specified offset using the specified algorithm.

public void Composite(IMagickImage image, CompositeOperator compose, string? args)

Parameters

image IMagickImage

The image to composite with this image.

compose CompositeOperator

The algorithm to use.

args string

The arguments for the algorithm (compose:args).

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, CompositeOperator, string?, Channels)

Compose an image onto another at specified offset using the specified algorithm.

public void Composite(IMagickImage image, CompositeOperator compose, string? args, Channels channels)

Parameters

image IMagickImage

The image to composite with this image.

compose CompositeOperator

The algorithm to use.

args string

The arguments for the algorithm (compose:args).

channels Channels

The channel(s) to composite.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, Gravity)

Compose an image onto another at specified offset using the 'In' operator.

public void Composite(IMagickImage image, Gravity gravity)

Parameters

image IMagickImage

The image to composite with this image.

gravity Gravity

The placement gravity.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, Gravity, Channels)

Compose an image onto another at specified offset using the 'In' operator.

public void Composite(IMagickImage image, Gravity gravity, Channels channels)

Parameters

image IMagickImage

The image to composite with this image.

gravity Gravity

The placement gravity.

channels Channels

The channel(s) to composite.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, Gravity, CompositeOperator)

Compose an image onto another at specified offset using the specified algorithm.

public void Composite(IMagickImage image, Gravity gravity, CompositeOperator compose)

Parameters

image IMagickImage

The image to composite with this image.

gravity Gravity

The placement gravity.

compose CompositeOperator

The algorithm to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, Gravity, CompositeOperator, Channels)

Compose an image onto another at specified offset using the specified algorithm.

public void Composite(IMagickImage image, Gravity gravity, CompositeOperator compose, Channels channels)

Parameters

image IMagickImage

The image to composite with this image.

gravity Gravity

The placement gravity.

compose CompositeOperator

The algorithm to use.

channels Channels

The channel(s) to composite.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, Gravity, CompositeOperator, string?)

Compose an image onto another at specified offset using the specified algorithm.

public void Composite(IMagickImage image, Gravity gravity, CompositeOperator compose, string? args)

Parameters

image IMagickImage

The image to composite with this image.

gravity Gravity

The placement gravity.

compose CompositeOperator

The algorithm to use.

args string

The arguments for the algorithm (compose:args).

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, Gravity, CompositeOperator, string?, Channels)

Compose an image onto another at specified offset using the specified algorithm.

public void Composite(IMagickImage image, Gravity gravity, CompositeOperator compose, string? args, Channels channels)

Parameters

image IMagickImage

The image to composite with this image.

gravity Gravity

The placement gravity.

compose CompositeOperator

The algorithm to use.

args string

The arguments for the algorithm (compose:args).

channels Channels

The channel(s) to composite.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, Gravity, int, int)

Compose an image onto another at specified offset using the 'In' operator.

public void Composite(IMagickImage image, Gravity gravity, int x, int y)

Parameters

image IMagickImage

The image to composite with this image.

gravity Gravity

The placement gravity.

x int

The X offset from origin.

y int

The Y offset from origin.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, Gravity, int, int, Channels)

Compose an image onto another at specified offset using the 'In' operator.

public void Composite(IMagickImage image, Gravity gravity, int x, int y, Channels channels)

Parameters

image IMagickImage

The image to composite with this image.

gravity Gravity

The placement gravity.

x int

The X offset from origin.

y int

The Y offset from origin.

channels Channels

The channel(s) to composite.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, Gravity, int, int, CompositeOperator)

Compose an image onto another at specified offset using the 'In' operator.

public void Composite(IMagickImage image, Gravity gravity, int x, int y, CompositeOperator compose)

Parameters

image IMagickImage

The image to composite with this image.

gravity Gravity

The placement gravity.

x int

The X offset from origin.

y int

The Y offset from origin.

compose CompositeOperator

The algorithm to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, Gravity, int, int, CompositeOperator, Channels)

Compose an image onto another at specified offset using the 'In' operator.

public void Composite(IMagickImage image, Gravity gravity, int x, int y, CompositeOperator compose, Channels channels)

Parameters

image IMagickImage

The image to composite with this image.

gravity Gravity

The placement gravity.

x int

The X offset from origin.

y int

The Y offset from origin.

compose CompositeOperator

The algorithm to use.

channels Channels

The channel(s) to composite.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, Gravity, int, int, CompositeOperator, string?)

Compose an image onto another at specified offset using the specified algorithm.

public void Composite(IMagickImage image, Gravity gravity, int x, int y, CompositeOperator compose, string? args)

Parameters

image IMagickImage

The image to composite with this image.

gravity Gravity

The placement gravity.

x int

The X offset from origin.

y int

The Y offset from origin.

compose CompositeOperator

The algorithm to use.

args string

The arguments for the algorithm (compose:args).

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, Gravity, int, int, CompositeOperator, string?, Channels)

Compose an image onto another at specified offset using the specified algorithm.

public void Composite(IMagickImage image, Gravity gravity, int x, int y, CompositeOperator compose, string? args, Channels channels)

Parameters

image IMagickImage

The image to composite with this image.

gravity Gravity

The placement gravity.

x int

The X offset from origin.

y int

The Y offset from origin.

compose CompositeOperator

The algorithm to use.

args string

The arguments for the algorithm (compose:args).

channels Channels

The channel(s) to composite.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, int, int)

Compose an image onto another at specified offset using the 'In' operator.

public void Composite(IMagickImage image, int x, int y)

Parameters

image IMagickImage

The image to composite with this image.

x int

The X offset from origin.

y int

The Y offset from origin.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, int, int, Channels)

Compose an image onto another at specified offset using the 'In' operator.

public void Composite(IMagickImage image, int x, int y, Channels channels)

Parameters

image IMagickImage

The image to composite with this image.

x int

The X offset from origin.

y int

The Y offset from origin.

channels Channels

The channel(s) to composite.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, int, int, CompositeOperator)

Compose an image onto another at specified offset using the specified algorithm.

public void Composite(IMagickImage image, int x, int y, CompositeOperator compose)

Parameters

image IMagickImage

The image to composite with this image.

x int

The X offset from origin.

y int

The Y offset from origin.

compose CompositeOperator

The algorithm to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, int, int, CompositeOperator, Channels)

Compose an image onto another at specified offset using the specified algorithm.

public void Composite(IMagickImage image, int x, int y, CompositeOperator compose, Channels channels)

Parameters

image IMagickImage

The image to composite with this image.

x int

The X offset from origin.

y int

The Y offset from origin.

compose CompositeOperator

The algorithm to use.

channels Channels

The channel(s) to composite.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, int, int, CompositeOperator, string?)

Compose an image onto another at specified offset using the specified algorithm.

public void Composite(IMagickImage image, int x, int y, CompositeOperator compose, string? args)

Parameters

image IMagickImage

The image to composite with this image.

x int

The X offset from origin.

y int

The Y offset from origin.

compose CompositeOperator

The algorithm to use.

args string

The arguments for the algorithm (compose:args).

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Composite(IMagickImage, int, int, CompositeOperator, string?, Channels)

Compose an image onto another at specified offset using the specified algorithm.

public void Composite(IMagickImage image, int x, int y, CompositeOperator compose, string? args, Channels channels)

Parameters

image IMagickImage

The image to composite with this image.

x int

The X offset from origin.

y int

The Y offset from origin.

compose CompositeOperator

The algorithm to use.

args string

The arguments for the algorithm (compose:args).

channels Channels

The channel(s) to composite.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ConnectedComponents(IConnectedComponentsSettings)

Determines the connected-components of the image.

public IReadOnlyCollection<IConnectedComponent<ushort>> ConnectedComponents(IConnectedComponentsSettings settings)

Parameters

settings IConnectedComponentsSettings

The settings for this operation.

Returns

IReadOnlyCollection<IConnectedComponent<ushort>>

The connected-components of the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ConnectedComponents(int)

Determines the connected-components of the image.

public IReadOnlyCollection<IConnectedComponent<ushort>> ConnectedComponents(int connectivity)

Parameters

connectivity int

How many neighbors to visit, choose from 4 or 8.

Returns

IReadOnlyCollection<IConnectedComponent<ushort>>

The connected-components of the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Contrast()

Contrast image (enhance intensity differences in image).

public void Contrast()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ContrastStretch(Percentage)

A simple image enhancement technique that attempts to improve the contrast in an image by 'stretching' the range of intensity values it contains to span a desired range of values. It differs from the more sophisticated histogram equalization in that it can only apply a linear scaling function to the image pixel values. As a result the 'enhancement' is less harsh.

public void ContrastStretch(Percentage blackPoint)

Parameters

blackPoint Percentage

The black point.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ContrastStretch(Percentage, Percentage)

A simple image enhancement technique that attempts to improve the contrast in an image by 'stretching' the range of intensity values it contains to span a desired range of values. It differs from the more sophisticated histogram equalization in that it can only apply a linear scaling function to the image pixel values. As a result the 'enhancement' is less harsh.

public void ContrastStretch(Percentage blackPoint, Percentage whitePoint)

Parameters

blackPoint Percentage

The black point.

whitePoint Percentage

The white point.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ContrastStretch(Percentage, Percentage, Channels)

A simple image enhancement technique that attempts to improve the contrast in an image by 'stretching' the range of intensity values it contains to span a desired range of values. It differs from the more sophisticated histogram equalization in that it can only apply a linear scaling function to the image pixel values. As a result the 'enhancement' is less harsh.

public void ContrastStretch(Percentage blackPoint, Percentage whitePoint, Channels channels)

Parameters

blackPoint Percentage

The black point.

whitePoint Percentage

The white point.

channels Channels

The channel(s) to constrast stretch.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ConvexHull()

Returns the convex hull points of an image canvas.

public IEnumerable<PointD> ConvexHull()

Returns

IEnumerable<PointD>

The convex hull points of an image canvas.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Convolve(IConvolveMatrix)

Convolve image. Applies a user-specified convolution to the image.

public void Convolve(IConvolveMatrix matrix)

Parameters

matrix IConvolveMatrix

The convolution matrix.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

CopyPixels(IMagickImage)

Copies pixels from the source image to the destination image.

public void CopyPixels(IMagickImage source)

Parameters

source IMagickImage

The source image to copy the pixels from.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

CopyPixels(IMagickImage, Channels)

Copies pixels from the source image to the destination image.

public void CopyPixels(IMagickImage source, Channels channels)

Parameters

source IMagickImage

The source image to copy the pixels from.

channels Channels

The channels to copy.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

CopyPixels(IMagickImage, IMagickGeometry)

Copies pixels from the source image to the destination image.

public void CopyPixels(IMagickImage source, IMagickGeometry geometry)

Parameters

source IMagickImage

The source image to copy the pixels from.

geometry IMagickGeometry

The geometry to copy.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

CopyPixels(IMagickImage, IMagickGeometry, Channels)

Copies pixels from the source image to the destination image.

public void CopyPixels(IMagickImage source, IMagickGeometry geometry, Channels channels)

Parameters

source IMagickImage

The source image to copy the pixels from.

geometry IMagickGeometry

The geometry to copy.

channels Channels

The channels to copy.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

CopyPixels(IMagickImage, IMagickGeometry, int, int)

Copies pixels from the source image as defined by the geometry the destination image at the specified offset.

public void CopyPixels(IMagickImage source, IMagickGeometry geometry, int x, int y)

Parameters

source IMagickImage

The source image to copy the pixels from.

geometry IMagickGeometry

The geometry to copy.

x int

The X offset to copy the pixels to.

y int

The Y offset to copy the pixels to.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

CopyPixels(IMagickImage, IMagickGeometry, int, int, Channels)

Copies pixels from the source image as defined by the geometry the destination image at the specified offset.

public void CopyPixels(IMagickImage source, IMagickGeometry geometry, int x, int y, Channels channels)

Parameters

source IMagickImage

The source image to copy the pixels from.

geometry IMagickGeometry

The geometry to copy.

x int

The X offset to copy the pixels to.

y int

The Y offset to copy the pixels to.

channels Channels

The channels to copy.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Crop(IMagickGeometry)

Crop image (subregion of original image). RePage should be called unless the Page information is needed.

public void Crop(IMagickGeometry geometry)

Parameters

geometry IMagickGeometry

The subregion to crop.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Crop(IMagickGeometry, Gravity)

Crop image (subregion of original image). RePage should be called unless the Page information is needed.

public void Crop(IMagickGeometry geometry, Gravity gravity)

Parameters

geometry IMagickGeometry

The subregion to crop.

gravity Gravity

The position where the cropping should start from.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Crop(int, int)

Crop image (subregion of original image). RePage should be called unless the Page information is needed.

public void Crop(int width, int height)

Parameters

width int

The width of the subregion to crop.

height int

The height of the subregion to crop.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Crop(int, int, Gravity)

Crop image (subregion of original image). RePage should be called unless the Page information is needed.

public void Crop(int width, int height, Gravity gravity)

Parameters

width int

The width of the subregion to crop.

height int

The height of the subregion to crop.

gravity Gravity

The position where the cropping should start from.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

CropToTiles(IMagickGeometry)

Creates tiles of the current image in the specified dimension.

public IReadOnlyCollection<IMagickImage<ushort>> CropToTiles(IMagickGeometry geometry)

Parameters

geometry IMagickGeometry

The dimension of the tiles.

Returns

IReadOnlyCollection<IMagickImage<ushort>>

New title of the current image.

CropToTiles(int, int)

Creates tiles of the current image in the specified dimension.

public IReadOnlyCollection<IMagickImage<ushort>> CropToTiles(int width, int height)

Parameters

width int

The width of the tiles.

height int

The height of the tiles.

Returns

IReadOnlyCollection<IMagickImage<ushort>>

New title of the current image.

CycleColormap(int)

Displaces an image's colormap by a given number of positions.

public void CycleColormap(int amount)

Parameters

amount int

Displace the colormap this amount.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Decipher(string)

Converts cipher pixels to plain pixels.

public void Decipher(string passphrase)

Parameters

passphrase string

The password that was used to encrypt the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Deskew(IDeskewSettings)

Removes skew from the image. Skew is an artifact that occurs in scanned images because of the camera being misaligned, imperfections in the scanning or surface, or simply because the paper was not placed completely flat when scanned. The value of threshold ranges from 0 to QuantumRange.

public double Deskew(IDeskewSettings settings)

Parameters

settings IDeskewSettings

The deskew settings.

Returns

double

The angle that was used.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Deskew(Percentage)

Removes skew from the image. Skew is an artifact that occurs in scanned images because of the camera being misaligned, imperfections in the scanning or surface, or simply because the paper was not placed completely flat when scanned. The value of threshold ranges from 0 to QuantumRange.

public double Deskew(Percentage threshold)

Parameters

threshold Percentage

The threshold.

Returns

double

The angle that was used.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Despeckle()

Despeckle image (reduce speckle noise).

public void Despeckle()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

DetermineBitDepth()

Determines the bit depth (bits allocated to red/green/blue components). Use the Depth property to get the current value.

public int DetermineBitDepth()

Returns

int

The bit depth (bits allocated to red/green/blue components).

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

DetermineBitDepth(Channels)

Determines the bit depth (bits allocated to red/green/blue components) of the specified channel.

public int DetermineBitDepth(Channels channels)

Parameters

channels Channels

The channel to get the depth for.

Returns

int

The bit depth (bits allocated to red/green/blue components) of the specified channel.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

DetermineColorType()

Determines the color type of the image. This method can be used to automatically make the type GrayScale.

public ColorType DetermineColorType()

Returns

ColorType

The color type of the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Dispose()

Disposes the instance.

public void Dispose()

Distort(DistortMethod, IDistortSettings, params double[])

Distorts an image using various distortion methods, by mapping color lookups of the source image to a new destination image usually of the same size as the source image, unless 'bestfit' is set to true.

public void Distort(DistortMethod method, IDistortSettings settings, params double[] arguments)

Parameters

method DistortMethod

The distortion method to use.

settings IDistortSettings

The settings for the distort operation.

arguments double[]

An array containing the arguments for the distortion.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Distort(DistortMethod, params double[])

Distorts an image using various distortion methods, by mapping color lookups of the source image to a new destination image of the same size as the source image.

public void Distort(DistortMethod method, params double[] arguments)

Parameters

method DistortMethod

The distortion method to use.

arguments double[]

An array containing the arguments for the distortion.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Draw(params IDrawable[])

Draw on image using one or more drawables.

public void Draw(params IDrawable[] drawables)

Parameters

drawables IDrawable[]

The drawable(s) to draw on the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Draw(IDrawables<ushort>)

Draw on image using one or more drawables.

public void Draw(IDrawables<ushort> drawables)

Parameters

drawables IDrawables<ushort>

The drawable(s) to draw on the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Draw(IEnumerable<IDrawable>)

Draw on image using a collection of drawables.

public void Draw(IEnumerable<IDrawable> drawables)

Parameters

drawables IEnumerable<IDrawable>

The drawables to draw on the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Edge(double)

Edge image (highlight edges in image).

public void Edge(double radius)

Parameters

radius double

The radius of the pixel neighborhood.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Emboss()

Emboss image (highlight edges with 3D effect) with default value (0x1).

public void Emboss()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Emboss(double, double)

Emboss image (highlight edges with 3D effect).

public void Emboss(double radius, double sigma)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Encipher(string)

Converts pixels to cipher-pixels.

public void Encipher(string passphrase)

Parameters

passphrase string

The password that to encrypt the image with.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Enhance()

Applies a digital filter that improves the quality of a noisy image.

public void Enhance()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Equalize()

Applies a histogram equalization to the image.

public void Equalize()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Equalize(Channels)

Applies a histogram equalization to the image.

public void Equalize(Channels channels)

Parameters

channels Channels

The channel(s) to apply the operator on.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Evaluate(Channels, EvaluateFunction, params double[])

Apply an arithmetic or bitwise operator to the image pixel quantums.

public void Evaluate(Channels channels, EvaluateFunction evaluateFunction, params double[] arguments)

Parameters

channels Channels

The channel(s) to apply the operator on.

evaluateFunction EvaluateFunction

The function to use.

arguments double[]

The arguments for the function.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Evaluate(Channels, EvaluateOperator, Percentage)

Apply an arithmetic or bitwise operator to the image pixel quantums.

public void Evaluate(Channels channels, EvaluateOperator evaluateOperator, Percentage percentage)

Parameters

channels Channels

The channel(s) to apply the operator on.

evaluateOperator EvaluateOperator

The operator to use.

percentage Percentage

The value to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Evaluate(Channels, EvaluateOperator, double)

Apply an arithmetic or bitwise operator to the image pixel quantums.

public void Evaluate(Channels channels, EvaluateOperator evaluateOperator, double value)

Parameters

channels Channels

The channel(s) to apply the operator on.

evaluateOperator EvaluateOperator

The operator to use.

value double

The value to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Evaluate(Channels, IMagickGeometry, EvaluateOperator, Percentage)

Apply an arithmetic or bitwise operator to the image pixel quantums.

public void Evaluate(Channels channels, IMagickGeometry geometry, EvaluateOperator evaluateOperator, Percentage percentage)

Parameters

channels Channels

The channel(s) to apply the operator on.

geometry IMagickGeometry

The geometry to use.

evaluateOperator EvaluateOperator

The operator to use.

percentage Percentage

The value to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Evaluate(Channels, IMagickGeometry, EvaluateOperator, double)

Apply an arithmetic or bitwise operator to the image pixel quantums.

public void Evaluate(Channels channels, IMagickGeometry geometry, EvaluateOperator evaluateOperator, double value)

Parameters

channels Channels

The channel(s) to apply the operator on.

geometry IMagickGeometry

The geometry to use.

evaluateOperator EvaluateOperator

The operator.

value double

The value to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Extent(IMagickGeometry)

Extend the image as defined by the rectangle.

public void Extent(IMagickGeometry geometry)

Parameters

geometry IMagickGeometry

The geometry to extend the image to.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Extent(IMagickGeometry, Gravity)

Extend the image as defined by the geometry.

public void Extent(IMagickGeometry geometry, Gravity gravity)

Parameters

geometry IMagickGeometry

The geometry to extend the image to.

gravity Gravity

The placement gravity.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Extent(IMagickGeometry, Gravity, IMagickColor<ushort>)

Extend the image as defined by the geometry.

public void Extent(IMagickGeometry geometry, Gravity gravity, IMagickColor<ushort> backgroundColor)

Parameters

geometry IMagickGeometry

The geometry to extend the image to.

gravity Gravity

The placement gravity.

backgroundColor IMagickColor<ushort>

The background color to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Extent(IMagickGeometry, IMagickColor<ushort>)

Extend the image as defined by the geometry.

public void Extent(IMagickGeometry geometry, IMagickColor<ushort> backgroundColor)

Parameters

geometry IMagickGeometry

The geometry to extend the image to.

backgroundColor IMagickColor<ushort>

The background color to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Extent(int, int)

Extend the image as defined by the width and height.

public void Extent(int width, int height)

Parameters

width int

The width to extend the image to.

height int

The height to extend the image to.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Extent(int, int, Gravity)

Extend the image as defined by the width and height.

public void Extent(int width, int height, Gravity gravity)

Parameters

width int

The width to extend the image to.

height int

The height to extend the image to.

gravity Gravity

The placement gravity.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Extent(int, int, Gravity, IMagickColor<ushort>)

Extend the image as defined by the width and height.

public void Extent(int width, int height, Gravity gravity, IMagickColor<ushort> backgroundColor)

Parameters

width int

The width to extend the image to.

height int

The height to extend the image to.

gravity Gravity

The placement gravity.

backgroundColor IMagickColor<ushort>

The background color to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Extent(int, int, IMagickColor<ushort>)

Extend the image as defined by the width and height.

public void Extent(int width, int height, IMagickColor<ushort> backgroundColor)

Parameters

width int

The width to extend the image to.

height int

The height to extend the image to.

backgroundColor IMagickColor<ushort>

The background color to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Extent(int, int, int, int)

Extend the image as defined by the width and height.

public void Extent(int x, int y, int width, int height)

Parameters

x int

The X offset from origin.

y int

The Y offset from origin.

width int

The width to extend the image to.

height int

The height to extend the image to.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

~MagickImage()

Finalizes an instance of the MagickImage class.

protected ~MagickImage()

Flip()

Flip image (reflect each scanline in the vertical direction).

public void Flip()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

FloodFill(IMagickColor<ushort>, int, int)

Flood-fill color across pixels that match the color of the target pixel and are neighbors of the target pixel. Uses current fuzz setting when determining color match.

public void FloodFill(IMagickColor<ushort> color, int x, int y)

Parameters

color IMagickColor<ushort>

The color to use.

x int

The X coordinate.

y int

The Y coordinate.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

FloodFill(IMagickColor<ushort>, int, int, IMagickColor<ushort>)

Flood-fill color across pixels that match the color of the target pixel and are neighbors of the target pixel. Uses current fuzz setting when determining color match.

public void FloodFill(IMagickColor<ushort> color, int x, int y, IMagickColor<ushort> target)

Parameters

color IMagickColor<ushort>

The color to use.

x int

The X coordinate.

y int

The Y coordinate.

target IMagickColor<ushort>

The target color.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

FloodFill(IMagickImage<ushort>, int, int)

Flood-fill texture across pixels that match the color of the target pixel and are neighbors of the target pixel. Uses current fuzz setting when determining color match.

public void FloodFill(IMagickImage<ushort> image, int x, int y)

Parameters

image IMagickImage<ushort>

The image to use.

x int

The X coordinate.

y int

The Y coordinate.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

FloodFill(IMagickImage<ushort>, int, int, IMagickColor<ushort>)

Flood-fill texture across pixels that match the color of the target pixel and are neighbors of the target pixel. Uses current fuzz setting when determining color match.

public void FloodFill(IMagickImage<ushort> image, int x, int y, IMagickColor<ushort> target)

Parameters

image IMagickImage<ushort>

The image to use.

x int

The X coordinate.

y int

The Y coordinate.

target IMagickColor<ushort>

The target color.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

FloodFill(ushort, int, int)

Floodfill pixels matching color (within fuzz factor) of target pixel(x,y) with replacement alpha value using method.

public void FloodFill(ushort alpha, int x, int y)

Parameters

alpha ushort

The alpha to use.

x int

The X coordinate.

y int

The Y coordinate.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Flop()

Flop image (reflect each scanline in the horizontal direction).

public void Flop()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

FontTypeMetrics(string)

Obtain font metrics for text string given current font, pointsize, and density settings.

public ITypeMetric? FontTypeMetrics(string text)

Parameters

text string

The text to get the font metrics for.

Returns

ITypeMetric

The font metrics for text.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

FontTypeMetrics(string, bool)

Obtain font metrics for text string given current font, pointsize, and density settings.

public ITypeMetric? FontTypeMetrics(string text, bool ignoreNewlines)

Parameters

text string

The text to get the font metrics for.

ignoreNewlines bool

Specifies if newlines should be ignored.

Returns

ITypeMetric

The font metrics for text.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

FormatExpression(string)

Formats the specified expression, more info here: http://www.imagemagick.org/script/escape.php.

public string? FormatExpression(string expression)

Parameters

expression string

The expression, more info here: http://www.imagemagick.org/script/escape.php.

Returns

string

The result of the expression.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Frame()

Frame image with the default geometry (25x25+6+6).

public void Frame()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Frame(IMagickGeometry)

Frame image with the specified geometry.

public void Frame(IMagickGeometry geometry)

Parameters

geometry IMagickGeometry

The geometry of the frame.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Frame(int, int)

Frame image with the specified with and height.

public void Frame(int width, int height)

Parameters

width int

The width of the frame.

height int

The height of the frame.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Frame(int, int, int, int)

Frame image with the specified with, height, innerBevel and outerBevel.

public void Frame(int width, int height, int innerBevel, int outerBevel)

Parameters

width int

The width of the frame.

height int

The height of the frame.

innerBevel int

The inner bevel of the frame.

outerBevel int

The outer bevel of the frame.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

FromBase64(string)

Initializes a new instance of the MagickImage class using the specified base64 string.

public static IMagickImage<ushort> FromBase64(string value)

Parameters

value string

The base64 string to load the image from.

Returns

IMagickImage<ushort>

A new instance of the MagickImage class.

Fx(string)

Applies a mathematical expression to the image.

public void Fx(string expression)

Parameters

expression string

The expression to apply.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Fx(string, Channels)

Applies a mathematical expression to the image.

public void Fx(string expression, Channels channels)

Parameters

expression string

The expression to apply.

channels Channels

The channel(s) to apply the expression to.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GammaCorrect(double)

Gamma correct image.

public void GammaCorrect(double gamma)

Parameters

gamma double

The image gamma.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GammaCorrect(double, Channels)

Gamma correct image.

public void GammaCorrect(double gamma, Channels channels)

Parameters

gamma double

The image gamma for the channel.

channels Channels

The channel(s) to gamma correct.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GaussianBlur(double)

Gaussian blur image.

public void GaussianBlur(double radius)

Parameters

radius double

The number of neighbor pixels to be included in the convolution.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GaussianBlur(double, Channels)

Gaussian blur image.

public void GaussianBlur(double radius, Channels channels)

Parameters

radius double

The number of neighbor pixels to be included in the convolution.

channels Channels

The channel(s) to blur.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GaussianBlur(double, double)

Gaussian blur image.

public void GaussianBlur(double radius, double sigma)

Parameters

radius double

The number of neighbor pixels to be included in the convolution.

sigma double

The standard deviation of the gaussian bell curve.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GaussianBlur(double, double, Channels)

Gaussian blur image.

public void GaussianBlur(double radius, double sigma, Channels channels)

Parameters

radius double

The number of neighbor pixels to be included in the convolution.

sigma double

The standard deviation of the gaussian bell curve.

channels Channels

The channel(s) to blur.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Get8BimProfile()

Retrieve the 8bim profile from the image.

public IEightBimProfile? Get8BimProfile()

Returns

IEightBimProfile

The 8bim profile from the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GetArtifact(string)

Returns the value of the artifact with the specified name.

public string? GetArtifact(string name)

Parameters

name string

The name of the artifact.

Returns

string

The value of the artifact with the specified name.

GetAttribute(string)

Returns the value of a named image attribute.

public string? GetAttribute(string name)

Parameters

name string

The name of the attribute.

Returns

string

The value of a named image attribute.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GetClippingPath()

Returns the default clipping path. Null will be returned if the image has no clipping path.

public string? GetClippingPath()

Returns

string

The default clipping path. Null will be returned if the image has no clipping path.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GetClippingPath(string)

Returns the clipping path with the specified name. Null will be returned if the image has no clipping path.

public string? GetClippingPath(string pathName)

Parameters

pathName string

Name of clipping path resource. If name is preceded by #, use clipping path numbered by name.

Returns

string

The clipping path with the specified name. Null will be returned if the image has no clipping path.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GetColorProfile()

Retrieve the color profile from the image.

public IColorProfile? GetColorProfile()

Returns

IColorProfile

The color profile from the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GetColormapColor(int)

Returns the color at colormap position index.

public IMagickColor<ushort>? GetColormapColor(int index)

Parameters

index int

The position index.

Returns

IMagickColor<ushort>

The color at colormap position index.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GetExifProfile()

Retrieve the exif profile from the image.

public IExifProfile? GetExifProfile()

Returns

IExifProfile

The exif profile from the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GetIptcProfile()

Retrieve the iptc profile from the image.

public IIptcProfile? GetIptcProfile()

Returns

IIptcProfile

The iptc profile from the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GetPixels()

Returns a pixel collection that can be used to read or modify the pixels of this image.

public IPixelCollection<ushort> GetPixels()

Returns

IPixelCollection<ushort>

A pixel collection that can be used to read or modify the pixels of this image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GetPixelsUnsafe()

Returns a pixel collection that can be used to read or modify the pixels of this image. This instance will not do any bounds checking and directly call ImageMagick.

public IUnsafePixelCollection<ushort> GetPixelsUnsafe()

Returns

IUnsafePixelCollection<ushort>

A pixel collection that can be used to read or modify the pixels of this image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GetProfile(string)

Retrieve a named profile from the image.

public IImageProfile? GetProfile(string name)

Parameters

name string

The name of the profile (e.g. "ICM", "IPTC", or a generic profile name).

Returns

IImageProfile

A named profile from the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GetReadMask()

Gets the associated read mask of the image.

public IMagickImage<ushort>? GetReadMask()

Returns

IMagickImage<ushort>

The associated read mask of the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GetWriteMask()

Gets the associated write mask of the image.

public IMagickImage<ushort>? GetWriteMask()

Returns

IMagickImage<ushort>

The associated write mask of the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

GetXmpProfile()

Retrieve the xmp profile from the image.

public IXmpProfile? GetXmpProfile()

Returns

IXmpProfile

The xmp profile from the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Grayscale()

Converts the colors in the image to gray.

public void Grayscale()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Grayscale(PixelIntensityMethod)

Converts the colors in the image to gray.

public void Grayscale(PixelIntensityMethod method)

Parameters

method PixelIntensityMethod

The pixel intensity method to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

HaldClut(IMagickImage)

Apply a color lookup table (Hald CLUT) to the image.

public void HaldClut(IMagickImage image)

Parameters

image IMagickImage

The image to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

HaldClut(IMagickImage, Channels)

Apply a color lookup table (Hald CLUT) to the image.

public void HaldClut(IMagickImage image, Channels channels)

Parameters

image IMagickImage

The image to use.

channels Channels

The channel(s) to hald clut.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

HasProfile(string)

Gets a value indicating whether a profile with the specified name already exists on the image.

public bool HasProfile(string name)

Parameters

name string

The name of the profile.

Returns

bool

A value indicating whether a profile with the specified name already exists on the image.

Histogram()

Creates a color histogram.

public IReadOnlyDictionary<IMagickColor<ushort>, int> Histogram()

Returns

IReadOnlyDictionary<IMagickColor<ushort>, int>

A color histogram.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

HoughLine()

Identifies lines in the image.

public void HoughLine()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

HoughLine(int, int, int)

Identifies lines in the image.

public void HoughLine(int width, int height, int threshold)

Parameters

width int

The width of the neighborhood.

height int

The height of the neighborhood.

threshold int

The line count threshold.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Implode(double, PixelInterpolateMethod)

Implode image (special effect).

public void Implode(double amount, PixelInterpolateMethod method)

Parameters

amount double

The extent of the implosion.

method PixelInterpolateMethod

Pixel interpolate method.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ImportPixels(byte[], IPixelImportSettings)

Import pixels from the specified byte array into the current image.

public void ImportPixels(byte[] data, IPixelImportSettings settings)

Parameters

data byte[]

The byte array to read the image data from.

settings IPixelImportSettings

The import settings to use when importing the pixels.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ImportPixels(byte[], int, IPixelImportSettings)

Import pixels from the specified byte array into the current image.

public void ImportPixels(byte[] data, int offset, IPixelImportSettings settings)

Parameters

data byte[]

The byte array to read the image data from.

offset int

The offset at which to begin reading data.

settings IPixelImportSettings

The import settings to use when importing the pixels.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ImportPixels(ushort[], IPixelImportSettings)

Import pixels from the specified quantum array into the current image.

public void ImportPixels(ushort[] data, IPixelImportSettings settings)

Parameters

data ushort[]

The quantum array to read the pixels from.

settings IPixelImportSettings

The import settings to use when importing the pixels.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ImportPixels(ushort[], int, IPixelImportSettings)

Import pixels from the specified quantum array into the current image.

public void ImportPixels(ushort[] data, int offset, IPixelImportSettings settings)

Parameters

data ushort[]

The quantum array to read the pixels from.

offset int

The offset at which to begin reading data.

settings IPixelImportSettings

The import settings to use when importing the pixels.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Integral()

Returns the sum of values (pixel values) in the image.

public IMagickImage<ushort>? Integral()

Returns

IMagickImage<ushort>

The sum of values (pixel values) in the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InterpolativeResize(IMagickGeometry, PixelInterpolateMethod)

Resize image to specified size using the specified interpolation method.

public void InterpolativeResize(IMagickGeometry geometry, PixelInterpolateMethod method)

Parameters

geometry IMagickGeometry

The geometry to use.

method PixelInterpolateMethod

Pixel interpolate method.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InterpolativeResize(Percentage, Percentage, PixelInterpolateMethod)

Resize image to specified size using the specified interpolation method.

public void InterpolativeResize(Percentage percentageWidth, Percentage percentageHeight, PixelInterpolateMethod method)

Parameters

percentageWidth Percentage

The percentage of the width.

percentageHeight Percentage

The percentage of the height.

method PixelInterpolateMethod

Pixel interpolate method.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InterpolativeResize(Percentage, PixelInterpolateMethod)

Resize image to specified size using the specified interpolation method.

public void InterpolativeResize(Percentage percentage, PixelInterpolateMethod method)

Parameters

percentage Percentage

The percentage.

method PixelInterpolateMethod

Pixel interpolate method.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InterpolativeResize(int, int, PixelInterpolateMethod)

Resize image to specified size using the specified interpolation method.

public void InterpolativeResize(int width, int height, PixelInterpolateMethod method)

Parameters

width int

The new width.

height int

The new height.

method PixelInterpolateMethod

Pixel interpolate method.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseContrast()

Inverse contrast image (diminish intensity differences in image).

public void InverseContrast()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseFloodFill(IMagickColor<ushort>, int, int)

Flood-fill texture across pixels that do not match the color of the target pixel and are neighbors of the target pixel. Uses current fuzz setting when determining color match.

public void InverseFloodFill(IMagickColor<ushort> color, int x, int y)

Parameters

color IMagickColor<ushort>

The color to use.

x int

The X coordinate.

y int

The Y coordinate.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseFloodFill(IMagickColor<ushort>, int, int, IMagickColor<ushort>)

Flood-fill texture across pixels that do not match the color of the target pixel and are neighbors of the target pixel. Uses current fuzz setting when determining color match.

public void InverseFloodFill(IMagickColor<ushort> color, int x, int y, IMagickColor<ushort> target)

Parameters

color IMagickColor<ushort>

The color to use.

x int

The X coordinate.

y int

The Y coordinate.

target IMagickColor<ushort>

The target color.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseFloodFill(IMagickImage<ushort>, int, int)

Flood-fill texture across pixels that do not match the color of the target pixel and are neighbors of the target pixel. Uses current fuzz setting when determining color match.

public void InverseFloodFill(IMagickImage<ushort> image, int x, int y)

Parameters

image IMagickImage<ushort>

The image to use.

x int

The X coordinate.

y int

The Y coordinate.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseFloodFill(IMagickImage<ushort>, int, int, IMagickColor<ushort>)

Flood-fill texture across pixels that match the color of the target pixel and are neighbors of the target pixel. Uses current fuzz setting when determining color match.

public void InverseFloodFill(IMagickImage<ushort> image, int x, int y, IMagickColor<ushort> target)

Parameters

image IMagickImage<ushort>

The image to use.

x int

The X coordinate.

y int

The Y coordinate.

target IMagickColor<ushort>

The target color.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseFloodFill(ushort, int, int)

Floodfill pixels not matching color (within fuzz factor) of target pixel(x,y) with replacement alpha value using method.

public void InverseFloodFill(ushort alpha, int x, int y)

Parameters

alpha ushort

The alpha to use.

x int

The X coordinate.

y int

The Y coordinate.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseLevel(Percentage, Percentage)

Applies the reversed level operation to just the specific channels specified. It compresses the full range of color values, so that they lie between the given black and white points.

public void InverseLevel(Percentage blackPointPercentage, Percentage whitePointPercentage)

Parameters

blackPointPercentage Percentage

The darkest color in the image. Colors darker are set to zero.

whitePointPercentage Percentage

The lightest color in the image. Colors brighter are set to the maximum quantum value.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseLevel(Percentage, Percentage, Channels)

Applies the reversed level operation to just the specific channels specified. It compresses the full range of color values, so that they lie between the given black and white points.

public void InverseLevel(Percentage blackPointPercentage, Percentage whitePointPercentage, Channels channels)

Parameters

blackPointPercentage Percentage

The darkest color in the image. Colors darker are set to zero.

whitePointPercentage Percentage

The lightest color in the image. Colors brighter are set to the maximum quantum value.

channels Channels

The channel(s) to level.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseLevel(Percentage, Percentage, double)

Applies the reversed level operation to just the specific channels specified. It compresses the full range of color values, so that they lie between the given black and white points.

public void InverseLevel(Percentage blackPointPercentage, Percentage whitePointPercentage, double gamma)

Parameters

blackPointPercentage Percentage

The darkest color in the image. Colors darker are set to zero.

whitePointPercentage Percentage

The lightest color in the image. Colors brighter are set to the maximum quantum value.

gamma double

The gamma correction to apply to the image. (Useful range of 0 to 10).

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseLevel(Percentage, Percentage, double, Channels)

Applies the reversed level operation to just the specific channels specified. It compresses the full range of color values, so that they lie between the given black and white points.

public void InverseLevel(Percentage blackPointPercentage, Percentage whitePointPercentage, double gamma, Channels channels)

Parameters

blackPointPercentage Percentage

The darkest color in the image. Colors darker are set to zero.

whitePointPercentage Percentage

The lightest color in the image. Colors brighter are set to the maximum quantum value.

gamma double

The gamma correction to apply to the image. (Useful range of 0 to 10).

channels Channels

The channel(s) to level.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseLevel(ushort, ushort)

Applies the reversed level operation to just the specific channels specified. It compresses the full range of color values, so that they lie between the given black and white points.

public void InverseLevel(ushort blackPoint, ushort whitePoint)

Parameters

blackPoint ushort

The darkest color in the image. Colors darker are set to zero.

whitePoint ushort

The lightest color in the image. Colors brighter are set to the maximum quantum value.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseLevel(ushort, ushort, Channels)

Applies the reversed level operation to just the specific channels specified. It compresses the full range of color values, so that they lie between the given black and white points.

public void InverseLevel(ushort blackPoint, ushort whitePoint, Channels channels)

Parameters

blackPoint ushort

The darkest color in the image. Colors darker are set to zero.

whitePoint ushort

The lightest color in the image. Colors brighter are set to the maximum quantum value.

channels Channels

The channel(s) to level.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseLevel(ushort, ushort, double)

Applies the reversed level operation to just the specific channels specified. It compresses the full range of color values, so that they lie between the given black and white points.

public void InverseLevel(ushort blackPoint, ushort whitePoint, double gamma)

Parameters

blackPoint ushort

The darkest color in the image. Colors darker are set to zero.

whitePoint ushort

The lightest color in the image. Colors brighter are set to the maximum quantum value.

gamma double

The gamma correction to apply to the image. (Useful range of 0 to 10).

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseLevel(ushort, ushort, double, Channels)

Applies the reversed level operation to just the specific channels specified. It compresses the full range of color values, so that they lie between the given black and white points.

public void InverseLevel(ushort blackPoint, ushort whitePoint, double gamma, Channels channels)

Parameters

blackPoint ushort

The darkest color in the image. Colors darker are set to zero.

whitePoint ushort

The lightest color in the image. Colors brighter are set to the maximum quantum value.

gamma double

The gamma correction to apply to the image. (Useful range of 0 to 10).

channels Channels

The channel(s) to level.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseLevelColors(IMagickColor<ushort>, IMagickColor<ushort>)

Maps the given color to "black" and "white" values, linearly spreading out the colors, and level values on a channel by channel bases, as per level(). The given colors allows you to specify different level ranges for each of the color channels separately.

public void InverseLevelColors(IMagickColor<ushort> blackColor, IMagickColor<ushort> whiteColor)

Parameters

blackColor IMagickColor<ushort>

The color to map black to/from.

whiteColor IMagickColor<ushort>

The color to map white to/from.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseLevelColors(IMagickColor<ushort>, IMagickColor<ushort>, Channels)

Maps the given color to "black" and "white" values, linearly spreading out the colors, and level values on a channel by channel bases, as per level(). The given colors allows you to specify different level ranges for each of the color channels separately.

public void InverseLevelColors(IMagickColor<ushort> blackColor, IMagickColor<ushort> whiteColor, Channels channels)

Parameters

blackColor IMagickColor<ushort>

The color to map black to/from.

whiteColor IMagickColor<ushort>

The color to map white to/from.

channels Channels

The channel(s) to level.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseOpaque(IMagickColor<ushort>, IMagickColor<ushort>)

Changes any pixel that does not match the target with the color defined by fill.

public void InverseOpaque(IMagickColor<ushort> target, IMagickColor<ushort> fill)

Parameters

target IMagickColor<ushort>

The color to replace.

fill IMagickColor<ushort>

The color to replace opaque color with.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseSigmoidalContrast(double)

Adjust the image contrast with an inverse non-linear sigmoidal contrast algorithm.

public void InverseSigmoidalContrast(double contrast)

Parameters

contrast double

The contrast to use..

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseSigmoidalContrast(double, Percentage)

Adjust the image contrast with an inverse non-linear sigmoidal contrast algorithm.

public void InverseSigmoidalContrast(double contrast, Percentage midpointPercentage)

Parameters

contrast double

The contrast to use.

midpointPercentage Percentage

The midpoint to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseSigmoidalContrast(double, double)

Adjust the image contrast with an inverse non-linear sigmoidal contrast algorithm.

public void InverseSigmoidalContrast(double contrast, double midpoint)

Parameters

contrast double

The contrast to use.

midpoint double

The midpoint to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseSigmoidalContrast(double, double, Channels)

Adjust the image contrast with an inverse non-linear sigmoidal contrast algorithm.

public void InverseSigmoidalContrast(double contrast, double midpoint, Channels channels)

Parameters

contrast double

The contrast to use.

midpoint double

The midpoint to use.

channels Channels

The channel(s) that should be adjusted.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseTransparent(IMagickColor<ushort>)

Add alpha channel to image, setting pixels that don't match the specified color to transparent.

public void InverseTransparent(IMagickColor<ushort> color)

Parameters

color IMagickColor<ushort>

The color that should not be made transparent.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

InverseTransparentChroma(IMagickColor<ushort>, IMagickColor<ushort>)

Add alpha channel to image, setting pixels that don't lie in between the given two colors to transparent.

public void InverseTransparentChroma(IMagickColor<ushort> colorLow, IMagickColor<ushort> colorHigh)

Parameters

colorLow IMagickColor<ushort>

The low target color.

colorHigh IMagickColor<ushort>

The high target color.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Kmeans(IKmeansSettings)

Applies k-means color reduction to an image. This is a colorspace clustering or segmentation technique.

public void Kmeans(IKmeansSettings settings)

Parameters

settings IKmeansSettings

The kmeans settings.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Kuwahara()

An edge preserving noise reduction filter.

public void Kuwahara()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Kuwahara(double, double)

An edge preserving noise reduction filter.

public void Kuwahara(double radius, double sigma)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Level(Percentage, Percentage)

Adjust the levels of the image by scaling the colors falling between specified white and black points to the full available quantum range.

public void Level(Percentage blackPointPercentage, Percentage whitePointPercentage)

Parameters

blackPointPercentage Percentage

The darkest color in the image. Colors darker are set to zero.

whitePointPercentage Percentage

The lightest color in the image. Colors brighter are set to the maximum quantum value.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Level(Percentage, Percentage, Channels)

Adjust the levels of the image by scaling the colors falling between specified white and black points to the full available quantum range.

public void Level(Percentage blackPointPercentage, Percentage whitePointPercentage, Channels channels)

Parameters

blackPointPercentage Percentage

The darkest color in the image. Colors darker are set to zero.

whitePointPercentage Percentage

The lightest color in the image. Colors brighter are set to the maximum quantum value.

channels Channels

The channel(s) to level.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Level(Percentage, Percentage, double)

Adjust the levels of the image by scaling the colors falling between specified white and black points to the full available quantum range.

public void Level(Percentage blackPointPercentage, Percentage whitePointPercentage, double gamma)

Parameters

blackPointPercentage Percentage

The darkest color in the image. Colors darker are set to zero.

whitePointPercentage Percentage

The lightest color in the image. Colors brighter are set to the maximum quantum value.

gamma double

The gamma correction to apply to the image. (Useful range of 0 to 10).

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Level(Percentage, Percentage, double, Channels)

Adjust the levels of the image by scaling the colors falling between specified white and black points to the full available quantum range.

public void Level(Percentage blackPointPercentage, Percentage whitePointPercentage, double gamma, Channels channels)

Parameters

blackPointPercentage Percentage

The darkest color in the image. Colors darker are set to zero.

whitePointPercentage Percentage

The lightest color in the image. Colors brighter are set to the maximum quantum value.

gamma double

The gamma correction to apply to the image. (Useful range of 0 to 10).

channels Channels

The channel(s) to level.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Level(ushort, ushort)

Adjust the levels of the image by scaling the colors falling between specified white and black points to the full available quantum range. Uses a midpoint of 1.0.

public void Level(ushort blackPoint, ushort whitePoint)

Parameters

blackPoint ushort

The darkest color in the image. Colors darker are set to zero.

whitePoint ushort

The lightest color in the image. Colors brighter are set to the maximum quantum value.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Level(ushort, ushort, Channels)

Adjust the levels of the image by scaling the colors falling between specified white and black points to the full available quantum range.

public void Level(ushort blackPoint, ushort whitePoint, Channels channels)

Parameters

blackPoint ushort

The darkest color in the image. Colors darker are set to zero.

whitePoint ushort

The lightest color in the image. Colors brighter are set to the maximum quantum value.

channels Channels

The channel(s) to level.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Level(ushort, ushort, double)

Adjust the levels of the image by scaling the colors falling between specified white and black points to the full available quantum range.

public void Level(ushort blackPoint, ushort whitePoint, double gamma)

Parameters

blackPoint ushort

The darkest color in the image. Colors darker are set to zero.

whitePoint ushort

The lightest color in the image. Colors brighter are set to the maximum quantum value.

gamma double

The gamma correction to apply to the image. (Useful range of 0 to 10).

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Level(ushort, ushort, double, Channels)

Adjust the levels of the image by scaling the colors falling between specified white and black points to the full available quantum range.

public void Level(ushort blackPoint, ushort whitePoint, double gamma, Channels channels)

Parameters

blackPoint ushort

The darkest color in the image. Colors darker are set to zero.

whitePoint ushort

The lightest color in the image. Colors brighter are set to the maximum quantum value.

gamma double

The gamma correction to apply to the image. (Useful range of 0 to 10).

channels Channels

The channel(s) to level.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

LevelColors(IMagickColor<ushort>, IMagickColor<ushort>)

Maps the given color to "black" and "white" values, linearly spreading out the colors, and level values on a channel by channel bases, as per level(). The given colors allows you to specify different level ranges for each of the color channels separately.

public void LevelColors(IMagickColor<ushort> blackColor, IMagickColor<ushort> whiteColor)

Parameters

blackColor IMagickColor<ushort>

The color to map black to/from.

whiteColor IMagickColor<ushort>

The color to map white to/from.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

LevelColors(IMagickColor<ushort>, IMagickColor<ushort>, Channels)

Maps the given color to "black" and "white" values, linearly spreading out the colors, and level values on a channel by channel bases, as per level(). The given colors allows you to specify different level ranges for each of the color channels separately.

public void LevelColors(IMagickColor<ushort> blackColor, IMagickColor<ushort> whiteColor, Channels channels)

Parameters

blackColor IMagickColor<ushort>

The color to map black to/from.

whiteColor IMagickColor<ushort>

The color to map white to/from.

channels Channels

The channel(s) to level.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

LinearStretch(Percentage, Percentage)

Discards any pixels below the black point and above the white point and levels the remaining pixels.

public void LinearStretch(Percentage blackPoint, Percentage whitePoint)

Parameters

blackPoint Percentage

The black point.

whitePoint Percentage

The white point.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

LiquidRescale(IMagickGeometry)

Rescales image with seam carving.

public void LiquidRescale(IMagickGeometry geometry)

Parameters

geometry IMagickGeometry

The geometry to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

LiquidRescale(Percentage)

Rescales image with seam carving.

public void LiquidRescale(Percentage percentage)

Parameters

percentage Percentage

The percentage.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

LiquidRescale(Percentage, Percentage)

Rescales image with seam carving.

public void LiquidRescale(Percentage percentageWidth, Percentage percentageHeight)

Parameters

percentageWidth Percentage

The percentage of the width.

percentageHeight Percentage

The percentage of the height.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

LiquidRescale(Percentage, Percentage, double, double)

Rescales image with seam carving.

public void LiquidRescale(Percentage percentageWidth, Percentage percentageHeight, double deltaX, double rigidity)

Parameters

percentageWidth Percentage

The percentage of the width.

percentageHeight Percentage

The percentage of the height.

deltaX double

Maximum seam transversal step (0 means straight seams).

rigidity double

Introduce a bias for non-straight seams (typically 0).

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

LiquidRescale(int, int)

Rescales image with seam carving.

public void LiquidRescale(int width, int height)

Parameters

width int

The new width.

height int

The new height.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

LiquidRescale(int, int, double, double)

Rescales image with seam carving.

public void LiquidRescale(int width, int height, double deltaX, double rigidity)

Parameters

width int

The new width.

height int

The new height.

deltaX double

Maximum seam transversal step (0 means straight seams).

rigidity double

Introduce a bias for non-straight seams (typically 0).

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

LocalContrast(double, Percentage)

Local contrast enhancement.

public void LocalContrast(double radius, Percentage strength)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

strength Percentage

The strength of the blur mask.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

LocalContrast(double, Percentage, Channels)

Local contrast enhancement.

public void LocalContrast(double radius, Percentage strength, Channels channels)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

strength Percentage

The strength of the blur mask.

channels Channels

The channel(s) that should be changed.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Lower(int)

Lower image (darken the edges of an image to give a 3-D lowered effect).

public void Lower(int size)

Parameters

size int

The size of the edges.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Magnify()

Magnify image by integral size.

public void Magnify()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Map(IMagickImage)

Remap image colors with closest color from reference image.

public IMagickErrorInfo Map(IMagickImage image)

Parameters

image IMagickImage

The image to use.

Returns

IMagickErrorInfo

The error informaton.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Map(IMagickImage, IQuantizeSettings)

Remap image colors with closest color from reference image.

public IMagickErrorInfo Map(IMagickImage image, IQuantizeSettings settings)

Parameters

image IMagickImage

The image to use.

settings IQuantizeSettings

Quantize settings.

Returns

IMagickErrorInfo

The error informaton.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Map(IEnumerable<IMagickColor<ushort>>)

Remap image colors with closest color from the specified colors.

public IMagickErrorInfo Map(IEnumerable<IMagickColor<ushort>> colors)

Parameters

colors IEnumerable<IMagickColor<ushort>>

The colors to use.

Returns

IMagickErrorInfo

The error informaton.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Map(IEnumerable<IMagickColor<ushort>>, IQuantizeSettings)

Remap image colors with closest color from the specified colors.

public IMagickErrorInfo Map(IEnumerable<IMagickColor<ushort>> colors, IQuantizeSettings settings)

Parameters

colors IEnumerable<IMagickColor<ushort>>

The colors to use.

settings IQuantizeSettings

Quantize settings.

Returns

IMagickErrorInfo

The error informaton.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MeanShift(int)

Delineate arbitrarily shaped clusters in the image.

public void MeanShift(int size)

Parameters

size int

The width and height of the pixels neighborhood.

MeanShift(int, Percentage)

Delineate arbitrarily shaped clusters in the image.

public void MeanShift(int size, Percentage colorDistance)

Parameters

size int

The width and height of the pixels neighborhood.

colorDistance Percentage

The color distance.

MeanShift(int, int)

Delineate arbitrarily shaped clusters in the image.

public void MeanShift(int width, int height)

Parameters

width int

The width of the pixels neighborhood.

height int

The height of the pixels neighborhood.

MeanShift(int, int, Percentage)

Delineate arbitrarily shaped clusters in the image.

public void MeanShift(int width, int height, Percentage colorDistance)

Parameters

width int

The width of the pixels neighborhood.

height int

The height of the pixels neighborhood.

colorDistance Percentage

The color distance.

MedianFilter()

Filter image by replacing each pixel component with the median color in a circular neighborhood.

public void MedianFilter()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MedianFilter(int)

Filter image by replacing each pixel component with the median color in a circular neighborhood.

public void MedianFilter(int radius)

Parameters

radius int

The radius of the pixel neighborhood.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Minify()

Reduce image by integral size.

public void Minify()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MinimumBoundingBox()

Returns the points that form the minimum bounding box around the image foreground objects with the "Rotating Calipers" algorithm. he method also returns these properties: minimum-bounding-box:area, minimum-bounding-box:width, minimum-bounding-box:height, and minimum-bounding-box:angle.

public IEnumerable<PointD> MinimumBoundingBox()

Returns

IEnumerable<PointD>

The points that form the minimum bounding box around the image foreground objects.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Modulate(Percentage)

Modulate percent brightness of an image.

public void Modulate(Percentage brightness)

Parameters

brightness Percentage

The brightness percentage.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Modulate(Percentage, Percentage)

Modulate percent saturation and brightness of an image.

public void Modulate(Percentage brightness, Percentage saturation)

Parameters

brightness Percentage

The brightness percentage.

saturation Percentage

The saturation percentage.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Modulate(Percentage, Percentage, Percentage)

Modulate percent hue, saturation, and brightness of an image.

public void Modulate(Percentage brightness, Percentage saturation, Percentage hue)

Parameters

brightness Percentage

The brightness percentage.

saturation Percentage

The saturation percentage.

hue Percentage

The hue percentage.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Moments()

Returns the normalized moments of one or more image channels.

public IMoments Moments()

Returns

IMoments

The normalized moments of one or more image channels.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Morphology(IMorphologySettings)

Applies a kernel to the image according to the given mophology settings.

public void Morphology(IMorphologySettings settings)

Parameters

settings IMorphologySettings

The morphology settings.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Morphology(MorphologyMethod, Kernel)

Applies a kernel to the image according to the given mophology method.

public void Morphology(MorphologyMethod method, Kernel kernel)

Parameters

method MorphologyMethod

The morphology method.

kernel Kernel

Built-in kernel.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Morphology(MorphologyMethod, Kernel, Channels)

Applies a kernel to the image according to the given mophology method.

public void Morphology(MorphologyMethod method, Kernel kernel, Channels channels)

Parameters

method MorphologyMethod

The morphology method.

kernel Kernel

Built-in kernel.

channels Channels

The channels to apply the kernel to.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Morphology(MorphologyMethod, Kernel, Channels, int)

Applies a kernel to the image according to the given mophology method.

public void Morphology(MorphologyMethod method, Kernel kernel, Channels channels, int iterations)

Parameters

method MorphologyMethod

The morphology method.

kernel Kernel

Built-in kernel.

channels Channels

The channels to apply the kernel to.

iterations int

The number of iterations. A value of -1 means loop until no change found.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Morphology(MorphologyMethod, Kernel, int)

Applies a kernel to the image according to the given mophology method.

public void Morphology(MorphologyMethod method, Kernel kernel, int iterations)

Parameters

method MorphologyMethod

The morphology method.

kernel Kernel

Built-in kernel.

iterations int

The number of iterations. A value of -1 means loop until no change found.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Morphology(MorphologyMethod?, Kernel?, string?)

Applies a kernel to the image according to the given mophology method.

public void Morphology(MorphologyMethod? method, Kernel? kernel, string? arguments)

Parameters

method MorphologyMethod

The morphology method.

kernel Kernel

Built-in kernel.

arguments string

Kernel arguments.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Morphology(MorphologyMethod?, Kernel?, string?, Channels?)

Applies a kernel to the image according to the given mophology method.

public void Morphology(MorphologyMethod? method, Kernel? kernel, string? arguments, Channels? channels)

Parameters

method MorphologyMethod

The morphology method.

kernel Kernel

Built-in kernel.

arguments string

Kernel arguments.

channels Channels

The channels to apply the kernel to.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Morphology(MorphologyMethod?, Kernel?, string?, Channels?, int)

Applies a kernel to the image according to the given mophology method.

public void Morphology(MorphologyMethod? method, Kernel? kernel, string? arguments, Channels? channels, int iterations)

Parameters

method MorphologyMethod

The morphology method.

kernel Kernel

Built-in kernel.

arguments string

Kernel arguments.

channels Channels

The channels to apply the kernel to.

iterations int

The number of iterations. A value of -1 means loop until no change found.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Morphology(MorphologyMethod?, Kernel?, string?, int)

Applies a kernel to the image according to the given mophology method.

public void Morphology(MorphologyMethod? method, Kernel? kernel, string? arguments, int iterations)

Parameters

method MorphologyMethod

The morphology method.

kernel Kernel

Built-in kernel.

arguments string

Kernel arguments.

iterations int

The number of iterations. A value of -1 means loop until no change found.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Morphology(MorphologyMethod, string)

Applies a kernel to the image according to the given mophology method.

public void Morphology(MorphologyMethod method, string userKernel)

Parameters

method MorphologyMethod

The morphology method.

userKernel string

User suplied kernel.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Morphology(MorphologyMethod, string, Channels)

Applies a kernel to the image according to the given mophology method.

public void Morphology(MorphologyMethod method, string userKernel, Channels channels)

Parameters

method MorphologyMethod

The morphology method.

userKernel string

User suplied kernel.

channels Channels

The channels to apply the kernel to.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Morphology(MorphologyMethod, string, Channels, int)

Applies a kernel to the image according to the given mophology method.

public void Morphology(MorphologyMethod method, string userKernel, Channels channels, int iterations)

Parameters

method MorphologyMethod

The morphology method.

userKernel string

User suplied kernel.

channels Channels

The channels to apply the kernel to.

iterations int

The number of iterations. A value of -1 means loop until no change found.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Morphology(MorphologyMethod, string, int)

Applies a kernel to the image according to the given mophology method.

public void Morphology(MorphologyMethod method, string userKernel, int iterations)

Parameters

method MorphologyMethod

The morphology method.

userKernel string

User suplied kernel.

iterations int

The number of iterations. A value of -1 means loop until no change found.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

MotionBlur(double, double, double)

Motion blur image with specified blur factor.

public void MotionBlur(double radius, double sigma, double angle)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

angle double

The angle the object appears to be comming from (zero degrees is from the right).

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Negate()

Negate colors in image.

public void Negate()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Negate(Channels)

Negate colors in image for the specified channel.

public void Negate(Channels channels)

Parameters

channels Channels

The channel(s) that should be negated.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

NegateGrayscale()

Negate the grayscale colors in image.

public void NegateGrayscale()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

NegateGrayscale(Channels)

Negate the grayscale colors in image for the specified channel.

public void NegateGrayscale(Channels channels)

Parameters

channels Channels

The channel(s) that should be negated.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Normalize()

Normalize image (increase contrast by normalizing the pixel values to span the full range of color values).

public void Normalize()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

OilPaint()

Oilpaint image (image looks like oil painting).

public void OilPaint()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

OilPaint(double, double)

Oilpaint image (image looks like oil painting).

public void OilPaint(double radius, double sigma)

Parameters

radius double

The radius of the circular neighborhood.

sigma double

The standard deviation of the Laplacian, in pixels.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Opaque(IMagickColor<ushort>, IMagickColor<ushort>)

Changes any pixel that matches target with the color defined by fill.

public void Opaque(IMagickColor<ushort> target, IMagickColor<ushort> fill)

Parameters

target IMagickColor<ushort>

The color to replace.

fill IMagickColor<ushort>

The color to replace opaque color with.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

OrderedDither(string)

Perform a ordered dither based on a number of pre-defined dithering threshold maps, but over multiple intensity levels.

public void OrderedDither(string thresholdMap)

Parameters

thresholdMap string

A string containing the name of the threshold dither map to use, followed by zero or more numbers representing the number of color levels tho dither between.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

OrderedDither(string, Channels)

Perform a ordered dither based on a number of pre-defined dithering threshold maps, but over multiple intensity levels.

public void OrderedDither(string thresholdMap, Channels channels)

Parameters

thresholdMap string

A string containing the name of the threshold dither map to use, followed by zero or more numbers representing the number of color levels tho dither between.

channels Channels

The channel(s) to dither.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Perceptible(double)

Set each pixel whose value is less than epsilon to epsilon or -epsilon (whichever is closer) otherwise the pixel value remains unchanged.

public void Perceptible(double epsilon)

Parameters

epsilon double

The epsilon threshold.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Perceptible(double, Channels)

Set each pixel whose value is less than epsilon to epsilon or -epsilon (whichever is closer) otherwise the pixel value remains unchanged.

public void Perceptible(double epsilon, Channels channels)

Parameters

epsilon double

The epsilon threshold.

channels Channels

The channel(s) to perceptible.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

PerceptualHash()

Returns the perceptual hash of this image with the colorspaces ImageMagick.ColorSpace.sRGB and ImageMagick.ColorSpace.HCLp.

public IPerceptualHash? PerceptualHash()

Returns

IPerceptualHash

The perceptual hash of this image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

PerceptualHash(params ColorSpace[])

Returns the perceptual hash of this image.

public IPerceptualHash? PerceptualHash(params ColorSpace[] colorSpaces)

Parameters

colorSpaces ColorSpace[]

The colorspaces to get the perceptual hash for.

Returns

IPerceptualHash

The perceptual hash of this image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Ping(byte[])

Reads only metadata and not the pixel data.

public void Ping(byte[] data)

Parameters

data byte[]

The byte array to read the information from.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Ping(byte[], IMagickReadSettings<ushort>?)

Reads only metadata and not the pixel data.

public void Ping(byte[] data, IMagickReadSettings<ushort>? readSettings)

Parameters

data byte[]

The byte array to read the information from.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Ping(byte[], int, int)

Reads only metadata and not the pixel data.

public void Ping(byte[] data, int offset, int count)

Parameters

data byte[]

The byte array to read the image data from.

offset int

The offset at which to begin reading data.

count int

The maximum number of bytes to read.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Ping(byte[], int, int, IMagickReadSettings<ushort>?)

Reads only metadata and not the pixel data.

public void Ping(byte[] data, int offset, int count, IMagickReadSettings<ushort>? readSettings)

Parameters

data byte[]

The byte array to read the image data from.

offset int

The offset at which to begin reading data.

count int

The maximum number of bytes to read.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Ping(FileInfo)

Reads only metadata and not the pixel data.

public void Ping(FileInfo file)

Parameters

file FileInfo

The file to read the image from.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Ping(FileInfo, IMagickReadSettings<ushort>?)

Reads only metadata and not the pixel data.

public void Ping(FileInfo file, IMagickReadSettings<ushort>? readSettings)

Parameters

file FileInfo

The file to read the image from.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Ping(Stream)

Reads only metadata and not the pixel data.

public void Ping(Stream stream)

Parameters

stream Stream

The stream to read the image data from.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Ping(Stream, IMagickReadSettings<ushort>?)

Reads only metadata and not the pixel data.

public void Ping(Stream stream, IMagickReadSettings<ushort>? readSettings)

Parameters

stream Stream

The stream to read the image data from.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Ping(string)

Reads only metadata and not the pixel data.

public void Ping(string fileName)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Ping(string, IMagickReadSettings<ushort>?)

Reads only metadata and not the pixel data.

public void Ping(string fileName, IMagickReadSettings<ushort>? readSettings)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Polaroid(string, double, PixelInterpolateMethod)

Simulates a polaroid picture.

public void Polaroid(string caption, double angle, PixelInterpolateMethod method)

Parameters

caption string

The caption to put on the image.

angle double

The angle of image.

method PixelInterpolateMethod

Pixel interpolate method.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Posterize(int)

Reduces the image to a limited number of colors for a "poster" effect.

public void Posterize(int levels)

Parameters

levels int

Number of color levels allowed in each channel.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Posterize(int, Channels)

Reduces the image to a limited number of colors for a "poster" effect.

public void Posterize(int levels, Channels channels)

Parameters

levels int

Number of color levels allowed in each channel.

channels Channels

The channel(s) to posterize.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Posterize(int, DitherMethod)

Reduces the image to a limited number of colors for a "poster" effect.

public void Posterize(int levels, DitherMethod method)

Parameters

levels int

Number of color levels allowed in each channel.

method DitherMethod

Dither method to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Posterize(int, DitherMethod, Channels)

Reduces the image to a limited number of colors for a "poster" effect.

public void Posterize(int levels, DitherMethod method, Channels channels)

Parameters

levels int

Number of color levels allowed in each channel.

method DitherMethod

Dither method to use.

channels Channels

The channel(s) to posterize.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

PreserveColorType()

Sets an internal option to preserve the color type.

public void PreserveColorType()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Quantize(IQuantizeSettings)

Quantize image (reduce number of colors).

public IMagickErrorInfo? Quantize(IQuantizeSettings settings)

Parameters

settings IQuantizeSettings

Quantize settings.

Returns

IMagickErrorInfo

The error information.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Raise(int)

Raise image (lighten the edges of an image to give a 3-D raised effect).

public void Raise(int size)

Parameters

size int

The size of the edges.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

RandomThreshold(Percentage, Percentage)

Changes the value of individual pixels based on the intensity of each pixel compared to a random threshold. The result is a low-contrast, two color image.

public void RandomThreshold(Percentage percentageLow, Percentage percentageHigh)

Parameters

percentageLow Percentage

The low threshold.

percentageHigh Percentage

The high threshold.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

RandomThreshold(Percentage, Percentage, Channels)

Changes the value of individual pixels based on the intensity of each pixel compared to a random threshold. The result is a low-contrast, two color image.

public void RandomThreshold(Percentage percentageLow, Percentage percentageHigh, Channels channels)

Parameters

percentageLow Percentage

The low threshold.

percentageHigh Percentage

The high threshold.

channels Channels

The channel(s) to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

RandomThreshold(ushort, ushort)

Changes the value of individual pixels based on the intensity of each pixel compared to a random threshold. The result is a low-contrast, two color image.

public void RandomThreshold(ushort low, ushort high)

Parameters

low ushort

The low threshold.

high ushort

The high threshold.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

RandomThreshold(ushort, ushort, Channels)

Changes the value of individual pixels based on the intensity of each pixel compared to a random threshold. The result is a low-contrast, two color image.

public void RandomThreshold(ushort low, ushort high, Channels channels)

Parameters

low ushort

The low threshold.

high ushort

The high threshold.

channels Channels

The channel(s) to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

RangeThreshold(Percentage, Percentage, Percentage, Percentage)

Applies soft and hard thresholding.

public void RangeThreshold(Percentage percentageLowBlack, Percentage percentageLowWhite, Percentage percentageHighWhite, Percentage percentageHighBlack)

Parameters

percentageLowBlack Percentage

Defines the minimum black threshold value.

percentageLowWhite Percentage

Defines the minimum white threshold value.

percentageHighWhite Percentage

Defines the maximum white threshold value.

percentageHighBlack Percentage

Defines the maximum black threshold value.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

RangeThreshold(ushort, ushort, ushort, ushort)

Applies soft and hard thresholding.

public void RangeThreshold(ushort lowBlack, ushort lowWhite, ushort highWhite, ushort highBlack)

Parameters

lowBlack ushort

Defines the minimum black threshold value.

lowWhite ushort

Defines the minimum white threshold value.

highWhite ushort

Defines the maximum white threshold value.

highBlack ushort

Defines the maximum black threshold value.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

RePage()

Resets the page property of this image.

public void RePage()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(IMagickColor<ushort>, int, int)

Read single image frame.

public void Read(IMagickColor<ushort> color, int width, int height)

Parameters

color IMagickColor<ushort>

The color to fill the image with.

width int

The width.

height int

The height.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(byte[])

Read single image frame.

public void Read(byte[] data)

Parameters

data byte[]

The byte array to read the image data from.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(byte[], IMagickReadSettings<ushort>?)

Read single image frame.

public void Read(byte[] data, IMagickReadSettings<ushort>? readSettings)

Parameters

data byte[]

The byte array to read the image data from.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(byte[], MagickFormat)

Read single image frame.

public void Read(byte[] data, MagickFormat format)

Parameters

data byte[]

The byte array to read the image data from.

format MagickFormat

The format to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(byte[], int, int)

Read single image frame.

public void Read(byte[] data, int offset, int count)

Parameters

data byte[]

The byte array to read the image data from.

offset int

The offset at which to begin reading data.

count int

The maximum number of bytes to read.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(byte[], int, int, IMagickReadSettings<ushort>?)

Read single image frame.

public void Read(byte[] data, int offset, int count, IMagickReadSettings<ushort>? readSettings)

Parameters

data byte[]

The byte array to read the image data from.

offset int

The offset at which to begin reading data.

count int

The maximum number of bytes to read.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(byte[], int, int, MagickFormat)

Read single image frame.

public void Read(byte[] data, int offset, int count, MagickFormat format)

Parameters

data byte[]

The byte array to read the image data from.

offset int

The offset at which to begin reading data.

count int

The maximum number of bytes to read.

format MagickFormat

The format to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(FileInfo)

Read single image frame.

public void Read(FileInfo file)

Parameters

file FileInfo

The file to read the image from.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(FileInfo, IMagickReadSettings<ushort>?)

Read single image frame.

public void Read(FileInfo file, IMagickReadSettings<ushort>? readSettings)

Parameters

file FileInfo

The file to read the image from.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(FileInfo, MagickFormat)

Read single image frame.

public void Read(FileInfo file, MagickFormat format)

Parameters

file FileInfo

The file to read the image from.

format MagickFormat

The format to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(FileInfo, int, int)

Read single image frame.

public void Read(FileInfo file, int width, int height)

Parameters

file FileInfo

The file to read the image from.

width int

The width.

height int

The height.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(Stream)

Read single image frame.

public void Read(Stream stream)

Parameters

stream Stream

The stream to read the image data from.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(Stream, IMagickReadSettings<ushort>?)

Read single image frame.

public void Read(Stream stream, IMagickReadSettings<ushort>? readSettings)

Parameters

stream Stream

The stream to read the image data from.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(Stream, MagickFormat)

Read single image frame.

public void Read(Stream stream, MagickFormat format)

Parameters

stream Stream

The stream to read the image data from.

format MagickFormat

The format to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(string)

Read single image frame.

public void Read(string fileName)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(string, IMagickReadSettings<ushort>?)

Read single image frame.

public void Read(string fileName, IMagickReadSettings<ushort>? readSettings)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(string, MagickFormat)

Read single image frame.

public void Read(string fileName, MagickFormat format)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

format MagickFormat

The format to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Read(string, int, int)

Read single image frame.

public void Read(string fileName, int width, int height)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

width int

The width.

height int

The height.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(FileInfo)

Read single image frame.

public Task ReadAsync(FileInfo file)

Parameters

file FileInfo

The file to read the image from.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(FileInfo, IMagickReadSettings<ushort>?)

Read single image frame.

public Task ReadAsync(FileInfo file, IMagickReadSettings<ushort>? readSettings)

Parameters

file FileInfo

The file to read the image from.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(FileInfo, IMagickReadSettings<ushort>?, CancellationToken)

Read single image frame.

public Task ReadAsync(FileInfo file, IMagickReadSettings<ushort>? readSettings, CancellationToken cancellationToken)

Parameters

file FileInfo

The file to read the image from.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(FileInfo, MagickFormat)

Read single image frame.

public Task ReadAsync(FileInfo file, MagickFormat format)

Parameters

file FileInfo

The file to read the image from.

format MagickFormat

The format to use.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(FileInfo, MagickFormat, CancellationToken)

Read single image frame.

public Task ReadAsync(FileInfo file, MagickFormat format, CancellationToken cancellationToken)

Parameters

file FileInfo

The file to read the image from.

format MagickFormat

The format to use.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(FileInfo, CancellationToken)

Read single image frame.

public Task ReadAsync(FileInfo file, CancellationToken cancellationToken)

Parameters

file FileInfo

The file to read the image from.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(Stream)

Read single image frame.

public Task ReadAsync(Stream stream)

Parameters

stream Stream

The stream to read the image data from.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(Stream, IMagickReadSettings<ushort>?)

Read single image frame.

public Task ReadAsync(Stream stream, IMagickReadSettings<ushort>? readSettings)

Parameters

stream Stream

The stream to read the image data from.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(Stream, IMagickReadSettings<ushort>?, CancellationToken)

Read single image frame.

public Task ReadAsync(Stream stream, IMagickReadSettings<ushort>? readSettings, CancellationToken cancellationToken)

Parameters

stream Stream

The stream to read the image data from.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(Stream, MagickFormat)

Read single image frame.

public Task ReadAsync(Stream stream, MagickFormat format)

Parameters

stream Stream

The stream to read the image data from.

format MagickFormat

The format to use.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(Stream, MagickFormat, CancellationToken)

Read single image frame.

public Task ReadAsync(Stream stream, MagickFormat format, CancellationToken cancellationToken)

Parameters

stream Stream

The stream to read the image data from.

format MagickFormat

The format to use.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(Stream, CancellationToken)

Read single image frame.

public Task ReadAsync(Stream stream, CancellationToken cancellationToken)

Parameters

stream Stream

The stream to read the image data from.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(string)

Read single image frame.

public Task ReadAsync(string fileName)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(string, IMagickReadSettings<ushort>?)

Read single image frame.

public Task ReadAsync(string fileName, IMagickReadSettings<ushort>? readSettings)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(string, IMagickReadSettings<ushort>?, CancellationToken)

Read single image frame.

public Task ReadAsync(string fileName, IMagickReadSettings<ushort>? readSettings, CancellationToken cancellationToken)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

readSettings IMagickReadSettings<ushort>

The settings to use when reading the image.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(string, MagickFormat)

Read single image frame.

public Task ReadAsync(string fileName, MagickFormat format)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

format MagickFormat

The format to use.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(string, MagickFormat, CancellationToken)

Read single image frame.

public Task ReadAsync(string fileName, MagickFormat format, CancellationToken cancellationToken)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

format MagickFormat

The format to use.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadAsync(string, CancellationToken)

Read single image frame.

public Task ReadAsync(string fileName, CancellationToken cancellationToken)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadPixels(byte[], IPixelReadSettings<ushort>)

Read single image frame from pixel data.

public void ReadPixels(byte[] data, IPixelReadSettings<ushort> settings)

Parameters

data byte[]

The byte array to read the image data from.

settings IPixelReadSettings<ushort>

The pixel settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadPixels(byte[], int, int, IPixelReadSettings<ushort>)

Read single image frame from pixel data.

public void ReadPixels(byte[] data, int offset, int count, IPixelReadSettings<ushort> settings)

Parameters

data byte[]

The byte array to read the image data from.

offset int

The offset at which to begin reading data.

count int

The maximum number of bytes to read.

settings IPixelReadSettings<ushort>

The pixel settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadPixels(FileInfo, IPixelReadSettings<ushort>)

Read single image frame from pixel data.

public void ReadPixels(FileInfo file, IPixelReadSettings<ushort> settings)

Parameters

file FileInfo

The file to read the image from.

settings IPixelReadSettings<ushort>

The pixel settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadPixels(Stream, IPixelReadSettings<ushort>)

Read single image frame from pixel data.

public void ReadPixels(Stream stream, IPixelReadSettings<ushort> settings)

Parameters

stream Stream

The stream to read the image data from.

settings IPixelReadSettings<ushort>

The pixel settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadPixels(string, IPixelReadSettings<ushort>)

Read single image frame from pixel data.

public void ReadPixels(string fileName, IPixelReadSettings<ushort> settings)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

settings IPixelReadSettings<ushort>

The pixel settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadPixels(ushort[], IPixelReadSettings<ushort>)

Read single image frame.

public void ReadPixels(ushort[] data, IPixelReadSettings<ushort> settings)

Parameters

data ushort[]

The quantum array to read the image data from.

settings IPixelReadSettings<ushort>

The pixel settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadPixels(ushort[], int, int, IPixelReadSettings<ushort>)

Read single image frame from pixel data.

public void ReadPixels(ushort[] data, int offset, int count, IPixelReadSettings<ushort> settings)

Parameters

data ushort[]

The quantum array to read the image data from.

offset int

The offset at which to begin reading data.

count int

The maximum number of items to read.

settings IPixelReadSettings<ushort>

The pixel settings to use when reading the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadPixelsAsync(FileInfo, IPixelReadSettings<ushort>)

Read single image frame from pixel data.

public Task ReadPixelsAsync(FileInfo file, IPixelReadSettings<ushort> settings)

Parameters

file FileInfo

The file to read the image from.

settings IPixelReadSettings<ushort>

The pixel settings to use when reading the image.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadPixelsAsync(FileInfo, IPixelReadSettings<ushort>, CancellationToken)

Read single image frame from pixel data.

public Task ReadPixelsAsync(FileInfo file, IPixelReadSettings<ushort> settings, CancellationToken cancellationToken)

Parameters

file FileInfo

The file to read the image from.

settings IPixelReadSettings<ushort>

The pixel settings to use when reading the image.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadPixelsAsync(Stream, IPixelReadSettings<ushort>)

Read single image frame from pixel data.

public Task ReadPixelsAsync(Stream stream, IPixelReadSettings<ushort> settings)

Parameters

stream Stream

The stream to read the image data from.

settings IPixelReadSettings<ushort>

The pixel settings to use when reading the image.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadPixelsAsync(Stream, IPixelReadSettings<ushort>, CancellationToken)

Read single image frame from pixel data.

public Task ReadPixelsAsync(Stream stream, IPixelReadSettings<ushort> settings, CancellationToken cancellationToken)

Parameters

stream Stream

The stream to read the image data from.

settings IPixelReadSettings<ushort>

The pixel settings to use when reading the image.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadPixelsAsync(string, IPixelReadSettings<ushort>)

Read single image frame from pixel data.

public Task ReadPixelsAsync(string fileName, IPixelReadSettings<ushort> settings)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

settings IPixelReadSettings<ushort>

The pixel settings to use when reading the image.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReadPixelsAsync(string, IPixelReadSettings<ushort>, CancellationToken)

Read single image frame from pixel data.

public Task ReadPixelsAsync(string fileName, IPixelReadSettings<ushort> settings, CancellationToken cancellationToken)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

settings IPixelReadSettings<ushort>

The pixel settings to use when reading the image.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReduceNoise()

Reduce noise in image using a noise peak elimination filter.

public void ReduceNoise()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ReduceNoise(int)

Reduce noise in image using a noise peak elimination filter.

public void ReduceNoise(int order)

Parameters

order int

The order to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

RegionMask(IMagickGeometry)

Associates a mask with the image as defined by the specified region.

public void RegionMask(IMagickGeometry geometry)

Parameters

geometry IMagickGeometry

The mask region.

RemoveArtifact(string)

Removes the artifact with the specified name.

public void RemoveArtifact(string name)

Parameters

name string

The name of the artifact.

RemoveAttribute(string)

Removes the attribute with the specified name.

public void RemoveAttribute(string name)

Parameters

name string

The name of the attribute.

RemoveProfile(IImageProfile)

Remove a profile from the image.

public void RemoveProfile(IImageProfile profile)

Parameters

profile IImageProfile

The profile to remove.

RemoveProfile(string)

Remove a named profile from the image.

public void RemoveProfile(string name)

Parameters

name string

The name of the profile (e.g. "ICM", "IPTC", or a generic profile name).

RemoveReadMask()

Removes the associated read mask of the image.

public void RemoveReadMask()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

RemoveRegionMask()

Removes the region mask of the image.

public void RemoveRegionMask()

RemoveWriteMask()

Removes the associated write mask of the image.

public void RemoveWriteMask()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Resample(PointD)

Resize image in terms of its pixel size.

public void Resample(PointD density)

Parameters

density PointD

The density to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Resample(double, double)

Resize image in terms of its pixel size.

public void Resample(double resolutionX, double resolutionY)

Parameters

resolutionX double

The new X resolution.

resolutionY double

The new Y resolution.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Resize(IMagickGeometry)

Resize image to specified geometry.

public void Resize(IMagickGeometry geometry)

Parameters

geometry IMagickGeometry

The geometry to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Resize(Percentage)

Resize image to specified percentage.

public void Resize(Percentage percentage)

Parameters

percentage Percentage

The percentage.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Resize(Percentage, Percentage)

Resize image to specified percentage.

public void Resize(Percentage percentageWidth, Percentage percentageHeight)

Parameters

percentageWidth Percentage

The percentage of the width.

percentageHeight Percentage

The percentage of the height.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Resize(int, int)

Resize image to specified size.

Resize will fit the image into the requested size. It does NOT fill, the requested box size. Use the ImageMagick.IMagickGeometry overload for more control over the resulting size.
public void Resize(int width, int height)

Parameters

width int

The new width.

height int

The new height.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Roll(int, int)

Roll image (rolls image vertically and horizontally).

public void Roll(int x, int y)

Parameters

x int

The X offset from origin.

y int

The Y offset from origin.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Rotate(double)

Rotate image clockwise by specified number of degrees.

public void Rotate(double degrees)

Parameters

degrees double

The number of degrees to rotate (positive to rotate clockwise, negative to rotate counter-clockwise).

Remarks

Specify a negative number for degrees to rotate counter-clockwise.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

RotationalBlur(double)

Rotational blur image.

public void RotationalBlur(double angle)

Parameters

angle double

The angle to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

RotationalBlur(double, Channels)

Rotational blur image.

public void RotationalBlur(double angle, Channels channels)

Parameters

angle double

The angle to use.

channels Channels

The channel(s) to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Sample(IMagickGeometry)

Resize image by using pixel sampling algorithm.

public void Sample(IMagickGeometry geometry)

Parameters

geometry IMagickGeometry

The geometry to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Sample(Percentage)

Resize image by using pixel sampling algorithm to the specified percentage.

public void Sample(Percentage percentage)

Parameters

percentage Percentage

The percentage.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Sample(Percentage, Percentage)

Resize image by using pixel sampling algorithm to the specified percentage.

public void Sample(Percentage percentageWidth, Percentage percentageHeight)

Parameters

percentageWidth Percentage

The percentage of the width.

percentageHeight Percentage

The percentage of the height.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Sample(int, int)

Resize image by using pixel sampling algorithm.

Resize will fit the image into the requested size. It does NOT fill, the requested box size. Use the ImageMagick.IMagickGeometry overload for more control over the resulting size.
public void Sample(int width, int height)

Parameters

width int

The new width.

height int

The new height.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Scale(IMagickGeometry)

Resize image by using simple ratio algorithm.

public void Scale(IMagickGeometry geometry)

Parameters

geometry IMagickGeometry

The geometry to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Scale(Percentage)

Resize image by using simple ratio algorithm to the specified percentage.

public void Scale(Percentage percentage)

Parameters

percentage Percentage

The percentage.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Scale(Percentage, Percentage)

Resize image by using simple ratio algorithm to the specified percentage.

public void Scale(Percentage percentageWidth, Percentage percentageHeight)

Parameters

percentageWidth Percentage

The percentage of the width.

percentageHeight Percentage

The percentage of the height.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Scale(int, int)

Resize image by using simple ratio algorithm.

Resize will fit the image into the requested size. It does NOT fill, the requested box size. Use the ImageMagick.IMagickGeometry overload for more control over the resulting size.
public void Scale(int width, int height)

Parameters

width int

The new width.

height int

The new height.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Segment()

Segment (coalesce similar image components) by analyzing the histograms of the color components and identifying units that are homogeneous with the fuzzy c-means technique. Also uses QuantizeColorSpace and Verbose image attributes.

public void Segment()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Segment(ColorSpace, double, double)

Segment (coalesce similar image components) by analyzing the histograms of the color components and identifying units that are homogeneous with the fuzzy c-means technique. Also uses QuantizeColorSpace and Verbose image attributes.

public void Segment(ColorSpace quantizeColorSpace, double clusterThreshold, double smoothingThreshold)

Parameters

quantizeColorSpace ColorSpace

Quantize colorspace.

clusterThreshold double

This represents the minimum number of pixels contained in a hexahedra before it can be considered valid (expressed as a percentage).

smoothingThreshold double

The smoothing threshold eliminates noise in the second derivative of the histogram. As the value is increased, you can expect a smoother second derivative.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SelectiveBlur(double, double, Percentage)

Selectively blur pixels within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold.

public void SelectiveBlur(double radius, double sigma, Percentage thresholdPercentage)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Gaussian, in pixels.

thresholdPercentage Percentage

Only pixels within this contrast threshold are included in the blur operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SelectiveBlur(double, double, Percentage, Channels)

Selectively blur pixels within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold.

public void SelectiveBlur(double radius, double sigma, Percentage thresholdPercentage, Channels channels)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Gaussian, in pixels.

thresholdPercentage Percentage

Only pixels within this contrast threshold are included in the blur operation.

channels Channels

The channel(s) to blur.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SelectiveBlur(double, double, double)

Selectively blur pixels within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold.

public void SelectiveBlur(double radius, double sigma, double threshold)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Gaussian, in pixels.

threshold double

Only pixels within this contrast threshold are included in the blur operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SelectiveBlur(double, double, double, Channels)

Selectively blur pixels within a contrast threshold. It is similar to the unsharpen mask that sharpens everything with contrast above a certain threshold.

public void SelectiveBlur(double radius, double sigma, double threshold, Channels channels)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Gaussian, in pixels.

threshold double

Only pixels within this contrast threshold are included in the blur operation.

channels Channels

The channel(s) to blur.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Separate()

Separates the channels from the image and returns it as grayscale images.

public IReadOnlyCollection<IMagickImage<ushort>> Separate()

Returns

IReadOnlyCollection<IMagickImage<ushort>>

The channels from the image as grayscale images.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Separate(Channels)

Separates the specified channels from the image and returns it as grayscale images.

public IReadOnlyCollection<IMagickImage<ushort>> Separate(Channels channels)

Parameters

channels Channels

The channel(s) to separates.

Returns

IReadOnlyCollection<IMagickImage<ushort>>

The channels from the image as grayscale images.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SepiaTone()

Applies a special effect to the image, similar to the effect achieved in a photo darkroom by sepia toning.

public void SepiaTone()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SepiaTone(Percentage)

Applies a special effect to the image, similar to the effect achieved in a photo darkroom by sepia toning.

public void SepiaTone(Percentage threshold)

Parameters

threshold Percentage

The tone threshold.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SetArtifact(string, bool)

Inserts the artifact with the specified name and value into the artifact tree of the image.

public void SetArtifact(string name, bool flag)

Parameters

name string

The name of the artifact.

flag bool

The value of the artifact.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SetArtifact(string, string)

Inserts the artifact with the specified name and value into the artifact tree of the image.

public void SetArtifact(string name, string value)

Parameters

name string

The name of the artifact.

value string

The value of the artifact.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SetAttenuate(double)

Lessen (or intensify) when adding noise to an image.

public void SetAttenuate(double attenuate)

Parameters

attenuate double

The attenuate value.

SetAttribute(string, bool)

Sets a named image attribute.

public void SetAttribute(string name, bool flag)

Parameters

name string

The name of the attribute.

flag bool

The value of the attribute.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SetAttribute(string, string)

Sets a named image attribute.

public void SetAttribute(string name, string value)

Parameters

name string

The name of the attribute.

value string

The value of the attribute.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SetBitDepth(int)

Set the bit depth (bits allocated to red/green/blue components).

public void SetBitDepth(int value)

Parameters

value int

The depth.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SetBitDepth(int, Channels)

Set the bit depth (bits allocated to red/green/blue components) of the specified channel.

public void SetBitDepth(int value, Channels channels)

Parameters

value int

The depth.

channels Channels

The channel to set the depth for.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SetClippingPath(string)

Sets the default clipping path.

public void SetClippingPath(string value)

Parameters

value string

The clipping path.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SetClippingPath(string, string)

Sets the clipping path with the specified name.

public void SetClippingPath(string value, string pathName)

Parameters

value string

The clipping path.

pathName string

Name of clipping path resource. If name is preceded by #, use clipping path numbered by name.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SetColormapColor(int, IMagickColor<ushort>)

Set color at colormap position index.

public void SetColormapColor(int index, IMagickColor<ushort> color)

Parameters

index int

The position index.

color IMagickColor<ushort>

The color.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SetCompression(CompressionMethod)

Sets the compression of the image. This method should only be used when the encoder uses the compression of the image. For most usecases Setting.Compression should be used instead.

public void SetCompression(CompressionMethod compression)

Parameters

compression CompressionMethod

The compression method.

SetProfile(IColorProfile)

Set the specified profile of the image. If a profile with the same name already exists it will be overwritten.

public void SetProfile(IColorProfile profile)

Parameters

profile IColorProfile

The profile to set.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SetProfile(IColorProfile, ColorTransformMode)

Set the specified profile of the image. If a profile with the same name already exists it will be overwritten.

public void SetProfile(IColorProfile profile, ColorTransformMode mode)

Parameters

profile IColorProfile

The profile to set.

mode ColorTransformMode

The color transformation mode.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SetProfile(IImageProfile)

Set the specified profile of the image. If a profile with the same name already exists it will be overwritten.

public void SetProfile(IImageProfile profile)

Parameters

profile IImageProfile

The profile to set.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SetReadMask(IMagickImage)

Sets the associated read mask of the image. The mask must be the same dimensions as the image and only contain the colors black and white.

public void SetReadMask(IMagickImage image)

Parameters

image IMagickImage

The image that contains the read mask.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SetWriteMask(IMagickImage)

Sets the associated write mask of the image. The mask must be the same dimensions as the image and only contains the colors black and white or have grayscale values that will cause blended updates of the image.

public void SetWriteMask(IMagickImage image)

Parameters

image IMagickImage

The image that contains the write mask.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Shade()

Shade image using distant light source.

public void Shade()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Shade(double, double)

Shade image using distant light source.

public void Shade(double azimuth, double elevation)

Parameters

azimuth double

The azimuth of the light source direction.

elevation double

The elevation of the light source direction.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Shade(double, double, Channels)

Shade image using distant light source.

public void Shade(double azimuth, double elevation, Channels channels)

Parameters

azimuth double

The azimuth of the light source direction.

elevation double

The elevation of the light source direction.

channels Channels

The channel(s) that should be shaded.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ShadeGrayscale()

Shade image using distant light source and make it grayscale.

public void ShadeGrayscale()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ShadeGrayscale(double, double)

Shade image using distant light source and make it grayscale.

public void ShadeGrayscale(double azimuth, double elevation)

Parameters

azimuth double

The azimuth of the light source direction.

elevation double

The elevation of the light source direction.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ShadeGrayscale(double, double, Channels)

Shade image using distant light source and make it grayscale.

public void ShadeGrayscale(double azimuth, double elevation, Channels channels)

Parameters

azimuth double

The azimuth of the light source direction.

elevation double

The elevation of the light source direction.

channels Channels

The channel(s) that should be shaded.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Shadow()

Simulate an image shadow.

public void Shadow()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Shadow(IMagickColor<ushort>)

Simulate an image shadow.

public void Shadow(IMagickColor<ushort> color)

Parameters

color IMagickColor<ushort>

The color of the shadow.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Shadow(int, int, double, Percentage)

Simulate an image shadow.

public void Shadow(int x, int y, double sigma, Percentage alpha)

Parameters

x int

the shadow x-offset.

y int

the shadow y-offset.

sigma double

The standard deviation of the Gaussian, in pixels.

alpha Percentage

Transparency percentage.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Shadow(int, int, double, Percentage, IMagickColor<ushort>)

Simulate an image shadow.

public void Shadow(int x, int y, double sigma, Percentage alpha, IMagickColor<ushort> color)

Parameters

x int
y int

the shadow y-offset.

sigma double

The standard deviation of the Gaussian, in pixels.

alpha Percentage

Transparency percentage.

color IMagickColor<ushort>

The color of the shadow.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Sharpen()

Sharpen pixels in image.

public void Sharpen()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Sharpen(Channels)

Sharpen pixels in image.

public void Sharpen(Channels channels)

Parameters

channels Channels

The channel(s) that should be sharpened.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Sharpen(double, double)

Sharpen pixels in image.

public void Sharpen(double radius, double sigma)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Sharpen(double, double, Channels)

Sharpen pixels in image.

public void Sharpen(double radius, double sigma, Channels channels)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

channels Channels

The channel(s) that should be sharpened.

Shave(int)

Shave pixels from image edges.

public void Shave(int size)

Parameters

size int

The size of to shave of the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Shave(int, int)

Shave pixels from image edges.

public void Shave(int leftRight, int topBottom)

Parameters

leftRight int

The number of pixels to shave left and right.

topBottom int

The number of pixels to shave top and bottom.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Shear(double, double)

Shear image (create parallelogram by sliding image by X or Y axis).

public void Shear(double xAngle, double yAngle)

Parameters

xAngle double

Specifies the number of x degrees to shear the image.

yAngle double

Specifies the number of y degrees to shear the image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SigmoidalContrast(double)

Adjust the image contrast with a non-linear sigmoidal contrast algorithm.

public void SigmoidalContrast(double contrast)

Parameters

contrast double

The contrast to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SigmoidalContrast(double, Percentage)

Adjust the image contrast with a non-linear sigmoidal contrast algorithm.

public void SigmoidalContrast(double contrast, Percentage midpointPercentage)

Parameters

contrast double

The contrast to use.

midpointPercentage Percentage

The midpoint to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SigmoidalContrast(double, double)

Adjust the image contrast with a non-linear sigmoidal contrast algorithm.

public void SigmoidalContrast(double contrast, double midpoint)

Parameters

contrast double

The contrast to use.

midpoint double

The midpoint to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SigmoidalContrast(double, double, Channels)

Adjust the image contrast with a non-linear sigmoidal contrast algorithm.

public void SigmoidalContrast(double contrast, double midpoint, Channels channels)

Parameters

contrast double

The contrast to use.

midpoint double

The midpoint to use.

channels Channels

The channel(s) that should be adjusted.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Sketch()

Simulates a pencil sketch.

public void Sketch()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Sketch(double, double, double)

Simulates a pencil sketch. We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and sketch selects a suitable radius for you.

public void Sketch(double radius, double sigma, double angle)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

angle double

Apply the effect along this angle.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Solarize()

Solarize image (similar to effect seen when exposing a photographic film to light during the development process).

public void Solarize()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Solarize(Percentage)

Solarize image (similar to effect seen when exposing a photographic film to light during the development process).

public void Solarize(Percentage factorPercentage)

Parameters

factorPercentage Percentage

The factor to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Solarize(double)

Solarize image (similar to effect seen when exposing a photographic film to light during the development process).

public void Solarize(double factor)

Parameters

factor double

The factor to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SortPixels()

Sort pixels within each scanline in ascending order of intensity.

public void SortPixels()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SparseColor(Channels, SparseColorMethod, params ISparseColorArg<ushort>[])

Sparse color image, given a set of coordinates, interpolates the colors found at those coordinates, across the whole image, using various methods.

public void SparseColor(Channels channels, SparseColorMethod method, params ISparseColorArg<ushort>[] args)

Parameters

channels Channels

The channel(s) to use.

method SparseColorMethod

The sparse color method to use.

args ISparseColorArg<ushort>[]

The sparse color arguments.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SparseColor(Channels, SparseColorMethod, IEnumerable<ISparseColorArg<ushort>>)

Sparse color image, given a set of coordinates, interpolates the colors found at those coordinates, across the whole image, using various methods.

public void SparseColor(Channels channels, SparseColorMethod method, IEnumerable<ISparseColorArg<ushort>> args)

Parameters

channels Channels

The channel(s) to use.

method SparseColorMethod

The sparse color method to use.

args IEnumerable<ISparseColorArg<ushort>>

The sparse color arguments.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SparseColor(SparseColorMethod, params ISparseColorArg<ushort>[])

Sparse color image, given a set of coordinates, interpolates the colors found at those coordinates, across the whole image, using various methods.

public void SparseColor(SparseColorMethod method, params ISparseColorArg<ushort>[] args)

Parameters

method SparseColorMethod

The sparse color method to use.

args ISparseColorArg<ushort>[]

The sparse color arguments.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SparseColor(SparseColorMethod, IEnumerable<ISparseColorArg<ushort>>)

Sparse color image, given a set of coordinates, interpolates the colors found at those coordinates, across the whole image, using various methods.

public void SparseColor(SparseColorMethod method, IEnumerable<ISparseColorArg<ushort>> args)

Parameters

method SparseColorMethod

The sparse color method to use.

args IEnumerable<ISparseColorArg<ushort>>

The sparse color arguments.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Splice(IMagickGeometry)

Splice the background color into the image.

public void Splice(IMagickGeometry geometry)

Parameters

geometry IMagickGeometry

The geometry to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Spread()

Spread pixels randomly within image.

public void Spread()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Spread(PixelInterpolateMethod, double)

Spread pixels randomly within image by specified amount.

public void Spread(PixelInterpolateMethod method, double radius)

Parameters

method PixelInterpolateMethod

Pixel interpolate method.

radius double

Choose a random pixel in a neighborhood of this extent.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Spread(double)

Spread pixels randomly within image by specified amount.

public void Spread(double radius)

Parameters

radius double

Choose a random pixel in a neighborhood of this extent.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Statistic(StatisticType, int, int)

Makes each pixel the min / max / median / mode / etc. of the neighborhood of the specified width and height.

public void Statistic(StatisticType type, int width, int height)

Parameters

type StatisticType

The statistic type.

width int

The width of the pixel neighborhood.

height int

The height of the pixel neighborhood.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Statistics()

Returns the image statistics.

public IStatistics Statistics()

Returns

IStatistics

The image statistics.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Statistics(Channels)

Returns the image statistics.

public IStatistics Statistics(Channels channels)

Parameters

channels Channels

The channel(s) that should be used.

Returns

IStatistics

The image statistics.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Stegano(IMagickImage)

Add a digital watermark to the image (based on second image).

public void Stegano(IMagickImage watermark)

Parameters

watermark IMagickImage

The image to use as a watermark.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Stereo(IMagickImage)

Create an image which appears in stereo when viewed with red-blue glasses (Red image on left, blue on right).

public void Stereo(IMagickImage rightImage)

Parameters

rightImage IMagickImage

The image to use as the right part of the resulting image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Strip()

Strips an image of all profiles and comments.

public void Strip()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SubImageSearch(IMagickImage<ushort>)

Search for the specified image at EVERY possible location in this image. This is slow! very very slow.. It returns a similarity image such that an exact match location is completely white and if none of the pixels match, black, otherwise some gray level in-between.

public IMagickSearchResult<ushort>? SubImageSearch(IMagickImage<ushort> image)

Parameters

image IMagickImage<ushort>

The image to search for.

Returns

IMagickSearchResult<ushort>

The result of the search action.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SubImageSearch(IMagickImage<ushort>, ErrorMetric)

Search for the specified image at EVERY possible location in this image. This is slow! very very slow.. It returns a similarity image such that an exact match location is completely white and if none of the pixels match, black, otherwise some gray level in-between.

public IMagickSearchResult<ushort>? SubImageSearch(IMagickImage<ushort> image, ErrorMetric metric)

Parameters

image IMagickImage<ushort>

The image to search for.

metric ErrorMetric

The metric to use.

Returns

IMagickSearchResult<ushort>

The result of the search action.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

SubImageSearch(IMagickImage<ushort>, ErrorMetric, double)

Search for the specified image at EVERY possible location in this image. This is slow! very very slow.. It returns a similarity image such that an exact match location is completely white and if none of the pixels match, black, otherwise some gray level in-between.

public IMagickSearchResult<ushort>? SubImageSearch(IMagickImage<ushort> image, ErrorMetric metric, double similarityThreshold)

Parameters

image IMagickImage<ushort>

The image to search for.

metric ErrorMetric

The metric to use.

similarityThreshold double

Minimum distortion for (sub)image match.

Returns

IMagickSearchResult<ushort>

The result of the search action.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Swirl(PixelInterpolateMethod, double)

Swirl image (image pixels are rotated by degrees).

public void Swirl(PixelInterpolateMethod method, double degrees)

Parameters

method PixelInterpolateMethod

Pixel interpolate method.

degrees double

The number of degrees.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Swirl(double)

Swirl image (image pixels are rotated by degrees).

public void Swirl(double degrees)

Parameters

degrees double

The number of degrees.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Texture(IMagickImage)

Channel a texture on image background.

public void Texture(IMagickImage image)

Parameters

image IMagickImage

The image to use as a texture on the image background.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Threshold(Percentage)

Threshold image.

public void Threshold(Percentage percentage)

Parameters

percentage Percentage

The threshold percentage.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Threshold(Percentage, Channels)

Threshold image.

public void Threshold(Percentage percentage, Channels channels)

Parameters

percentage Percentage

The threshold percentage.

channels Channels

The channel(s) that should be thresholded.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Thumbnail(IMagickGeometry)

Resize image to thumbnail size and remove all the image profiles except the icc/icm profile.

public void Thumbnail(IMagickGeometry geometry)

Parameters

geometry IMagickGeometry

The geometry to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Thumbnail(Percentage)

Resize image to thumbnail size and remove all the image profiles except the icc/icm profile.

public void Thumbnail(Percentage percentage)

Parameters

percentage Percentage

The percentage.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Thumbnail(Percentage, Percentage)

Resize image to thumbnail size and remove all the image profiles except the icc/icm profile.

public void Thumbnail(Percentage percentageWidth, Percentage percentageHeight)

Parameters

percentageWidth Percentage

The percentage of the width.

percentageHeight Percentage

The percentage of the height.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Thumbnail(int, int)

Resize image to thumbnail size and remove all the image profiles except the icc/icm profile.

Resize will fit the image into the requested size. It does NOT fill, the requested box size. Use the ImageMagick.IMagickGeometry overload for more control over the resulting size.
public void Thumbnail(int width, int height)

Parameters

width int

The new width.

height int

The new height.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Tile(IMagickImage, CompositeOperator)

Compose an image repeated across and down the image.

public void Tile(IMagickImage image, CompositeOperator compose)

Parameters

image IMagickImage

The image to composite with this image.

compose CompositeOperator

The algorithm to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Tile(IMagickImage, CompositeOperator, string?)

Compose an image repeated across and down the image.

public void Tile(IMagickImage image, CompositeOperator compose, string? args)

Parameters

image IMagickImage

The image to composite with this image.

compose CompositeOperator

The algorithm to use.

args string

The arguments for the algorithm (compose:args).

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Tint(IMagickGeometry, IMagickColor<ushort>)

Applies a color vector to each pixel in the image. The length of the vector is 0 for black and white and at its maximum for the midtones. The vector weighting function is f(x)=(1-(4.0*((x-0.5)*(x-0.5)))).

public void Tint(IMagickGeometry opacity, IMagickColor<ushort> color)

Parameters

opacity IMagickGeometry

An opacity value used for tinting.

color IMagickColor<ushort>

A color value used for tinting.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ToBase64()

Converts this instance to a base64 string.

public string ToBase64()

Returns

string

A base64 string.

ToBase64(IWriteDefines)

Converts this instance to a base64 string.

public string ToBase64(IWriteDefines defines)

Parameters

defines IWriteDefines

The defines to set.

Returns

string

A base64 string.

ToBase64(MagickFormat)

Converts this instance to a base64 string.

public string ToBase64(MagickFormat format)

Parameters

format MagickFormat

The format to use.

Returns

string

A base64 string.

ToByteArray()

Converts this instance to a byte array.

public byte[] ToByteArray()

Returns

byte[]

A byte array.

ToByteArray(IWriteDefines)

Converts this instance to a byte array.

public byte[] ToByteArray(IWriteDefines defines)

Parameters

defines IWriteDefines

The defines to set.

Returns

byte[]

A byte array.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ToByteArray(MagickFormat)

Converts this instance to a byte array.

public byte[] ToByteArray(MagickFormat format)

Parameters

format MagickFormat

The format to use.

Returns

byte[]

A byte array.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

ToString()

Returns a string that represents the current image.

public override string ToString()

Returns

string

A string that represents the current image.

TransformColorSpace(IColorProfile)

Transforms the image from the colorspace of the source profile to the target profile. This requires the image to have a color profile. Nothing will happen if the image has no color profile.

public bool TransformColorSpace(IColorProfile target)

Parameters

target IColorProfile

The target color profile.

Returns

bool

True when the colorspace was transformed otherwise false.

TransformColorSpace(IColorProfile, ColorTransformMode)

Transforms the image from the colorspace of the source profile to the target profile. This requires the image to have a color profile. Nothing will happen if the image has no color profile.

public bool TransformColorSpace(IColorProfile target, ColorTransformMode mode)

Parameters

target IColorProfile

The target color profile.

mode ColorTransformMode

The color transformation mode.

Returns

bool

True when the colorspace was transformed otherwise false.

TransformColorSpace(IColorProfile, IColorProfile)

Transforms the image from the colorspace of the source profile to the target profile. The source profile will only be used if the image does not contain a color profile. Nothing will happen if the source profile has a different colorspace then that of the image.

public bool TransformColorSpace(IColorProfile source, IColorProfile target)

Parameters

source IColorProfile

The source color profile.

target IColorProfile

The target color profile.

Returns

bool

True when the colorspace was transformed otherwise false.

TransformColorSpace(IColorProfile, IColorProfile, ColorTransformMode)

Transforms the image from the colorspace of the source profile to the target profile. The source profile will only be used if the image does not contain a color profile. Nothing will happen if the source profile has a different colorspace then that of the image.

public bool TransformColorSpace(IColorProfile source, IColorProfile target, ColorTransformMode mode)

Parameters

source IColorProfile

The source color profile.

target IColorProfile

The target color profile.

mode ColorTransformMode

The color transformation mode.

Returns

bool

True when the colorspace was transformed otherwise false.

Transparent(IMagickColor<ushort>)

Add alpha channel to image, setting pixels matching color to transparent.

public void Transparent(IMagickColor<ushort> color)

Parameters

color IMagickColor<ushort>

The color to make transparent.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

TransparentChroma(IMagickColor<ushort>, IMagickColor<ushort>)

Add alpha channel to image, setting pixels that lie in between the given two colors to transparent.

public void TransparentChroma(IMagickColor<ushort> colorLow, IMagickColor<ushort> colorHigh)

Parameters

colorLow IMagickColor<ushort>

The low target color.

colorHigh IMagickColor<ushort>

The high target color.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Transpose()

Creates a horizontal mirror image by reflecting the pixels around the central y-axis while rotating them by 90 degrees.

public void Transpose()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Transverse()

Creates a vertical mirror image by reflecting the pixels around the central x-axis while rotating them by 270 degrees.

public void Transverse()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Trim()

Trim edges that are the background color from the image. The property BoundingBox can be used to the coordinates of the area that will be extracted.

public void Trim()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Trim(params Gravity[])

Trim the specified edges that are the background color from the image.

public void Trim(params Gravity[] edges)

Parameters

edges Gravity[]

The edges that need to be trimmed.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Trim(Percentage)

Trim edges that are the background color from the image. The property BoundingBox can be used to the coordinates of the area that will be extracted.

public void Trim(Percentage percentBackground)

Parameters

percentBackground Percentage

The percentage of background pixels permitted in the outer rows and columns.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

UniqueColors()

Returns the unique colors of an image.

public IMagickImage<ushort> UniqueColors()

Returns

IMagickImage<ushort>

The unique colors of an image.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

UnsharpMask(double, double)

Replace image with a sharpened version of the original image using the unsharp mask algorithm.

public void UnsharpMask(double radius, double sigma)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

UnsharpMask(double, double, Channels)

Replace image with a sharpened version of the original image using the unsharp mask algorithm.

public void UnsharpMask(double radius, double sigma, Channels channels)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

channels Channels

The channel(s) that should be sharpened.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

UnsharpMask(double, double, double, double)

Replace image with a sharpened version of the original image using the unsharp mask algorithm.

public void UnsharpMask(double radius, double sigma, double amount, double threshold)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

amount double

The percentage of the difference between the original and the blur image that is added back into the original.

threshold double

The threshold in pixels needed to apply the diffence amount.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

UnsharpMask(double, double, double, double, Channels)

Replace image with a sharpened version of the original image using the unsharp mask algorithm.

public void UnsharpMask(double radius, double sigma, double amount, double threshold, Channels channels)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

amount double

The percentage of the difference between the original and the blur image that is added back into the original.

threshold double

The threshold in pixels needed to apply the diffence amount.

channels Channels

The channel(s) that should be sharpened.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Vignette()

Softens the edges of the image in vignette style.

public void Vignette()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Vignette(double, double, int, int)

Softens the edges of the image in vignette style.

public void Vignette(double radius, double sigma, int x, int y)

Parameters

radius double

The radius of the Gaussian, in pixels, not counting the center pixel.

sigma double

The standard deviation of the Laplacian, in pixels.

x int

The x ellipse offset.

y int

the y ellipse offset.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Wave()

Map image pixels to a sine wave.

public void Wave()

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Wave(PixelInterpolateMethod, double, double)

Map image pixels to a sine wave.

public void Wave(PixelInterpolateMethod method, double amplitude, double length)

Parameters

method PixelInterpolateMethod

The pixel interpolate method.

amplitude double

The amplitude.

length double

The length of the wave.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WaveletDenoise(Percentage)

Removes noise from the image using a wavelet transform.

public void WaveletDenoise(Percentage thresholdPercentage)

Parameters

thresholdPercentage Percentage

The threshold for smoothing.

WaveletDenoise(Percentage, double)

Removes noise from the image using a wavelet transform.

public void WaveletDenoise(Percentage thresholdPercentage, double softness)

Parameters

thresholdPercentage Percentage

The threshold for smoothing.

softness double

Attenuate the smoothing threshold.

WaveletDenoise(ushort)

Removes noise from the image using a wavelet transform.

public void WaveletDenoise(ushort threshold)

Parameters

threshold ushort

The threshold for smoothing.

WaveletDenoise(ushort, double)

Removes noise from the image using a wavelet transform.

public void WaveletDenoise(ushort threshold, double softness)

Parameters

threshold ushort

The threshold for smoothing.

softness double

Attenuate the smoothing threshold.

WhiteBalance()

Apply a white balancing to an image according to a grayworld assumption in the LAB colorspace.

public void WhiteBalance()

WhiteBalance(Percentage)

Apply a white balancing to an image according to a grayworld assumption in the LAB colorspace.

public void WhiteBalance(Percentage vibrance)

Parameters

vibrance Percentage

The vibrance.

WhiteThreshold(Percentage)

Forces all pixels above the threshold into white while leaving all pixels at or below the threshold unchanged.

public void WhiteThreshold(Percentage threshold)

Parameters

threshold Percentage

The threshold to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WhiteThreshold(Percentage, Channels)

Forces all pixels above the threshold into white while leaving all pixels at or below the threshold unchanged.

public void WhiteThreshold(Percentage threshold, Channels channels)

Parameters

threshold Percentage

The threshold to use.

channels Channels

The channel(s) to make black.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Write(FileInfo)

Writes the image to the specified file.

public void Write(FileInfo file)

Parameters

file FileInfo

The file to write the image to.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Write(FileInfo, IWriteDefines)

Writes the image to the specified file.

public void Write(FileInfo file, IWriteDefines defines)

Parameters

file FileInfo

The file to write the image to.

defines IWriteDefines

The defines to set.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Write(FileInfo, MagickFormat)

Writes the image to the specified file.

public void Write(FileInfo file, MagickFormat format)

Parameters

file FileInfo

The file to write the image to.

format MagickFormat

The format to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Write(Stream)

Writes the image to the specified stream.

public void Write(Stream stream)

Parameters

stream Stream

The stream to write the image data to.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Write(Stream, IWriteDefines)

Writes the image to the specified stream.

public void Write(Stream stream, IWriteDefines defines)

Parameters

stream Stream

The stream to write the image data to.

defines IWriteDefines

The defines to set.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Write(Stream, MagickFormat)

Writes the image to the specified stream.

public void Write(Stream stream, MagickFormat format)

Parameters

stream Stream

The stream to write the image data to.

format MagickFormat

The format to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Write(string)

Writes the image to the specified file name.

public void Write(string fileName)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Write(string, IWriteDefines)

Writes the image to the specified file name.

public void Write(string fileName, IWriteDefines defines)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

defines IWriteDefines

The defines to set.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Write(string, MagickFormat)

Writes the image to the specified file name.

public void Write(string fileName, MagickFormat format)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

format MagickFormat

The format to use.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(FileInfo)

Writes the image to the specified file.

public Task WriteAsync(FileInfo file)

Parameters

file FileInfo

The file to write the image to.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(FileInfo, IWriteDefines)

Writes the image to the specified file.

public Task WriteAsync(FileInfo file, IWriteDefines defines)

Parameters

file FileInfo

The file to write the image to.

defines IWriteDefines

The defines to set.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(FileInfo, IWriteDefines, CancellationToken)

Writes the image to the specified file.

public Task WriteAsync(FileInfo file, IWriteDefines defines, CancellationToken cancellationToken)

Parameters

file FileInfo

The file to write the image to.

defines IWriteDefines

The defines to set.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(FileInfo, MagickFormat)

Writes the image to the specified file.

public Task WriteAsync(FileInfo file, MagickFormat format)

Parameters

file FileInfo

The file to write the image to.

format MagickFormat

The format to use.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(FileInfo, MagickFormat, CancellationToken)

Writes the image to the specified file.

public Task WriteAsync(FileInfo file, MagickFormat format, CancellationToken cancellationToken)

Parameters

file FileInfo

The file to write the image to.

format MagickFormat

The format to use.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(FileInfo, CancellationToken)

Writes the image to the specified file.

public Task WriteAsync(FileInfo file, CancellationToken cancellationToken)

Parameters

file FileInfo

The file to write the image to.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(Stream)

Writes the image to the specified stream.

public Task WriteAsync(Stream stream)

Parameters

stream Stream

The stream to write the image data to.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(Stream, IWriteDefines)

Writes the image to the specified stream.

public Task WriteAsync(Stream stream, IWriteDefines defines)

Parameters

stream Stream

The stream to write the image data to.

defines IWriteDefines

The defines to set.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(Stream, IWriteDefines, CancellationToken)

Writes the image to the specified stream.

public Task WriteAsync(Stream stream, IWriteDefines defines, CancellationToken cancellationToken)

Parameters

stream Stream

The stream to write the image data to.

defines IWriteDefines

The defines to set.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(Stream, MagickFormat)

Writes the image to the specified stream.

public Task WriteAsync(Stream stream, MagickFormat format)

Parameters

stream Stream

The stream to write the image data to.

format MagickFormat

The format to use.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(Stream, MagickFormat, CancellationToken)

Writes the image to the specified stream.

public Task WriteAsync(Stream stream, MagickFormat format, CancellationToken cancellationToken)

Parameters

stream Stream

The stream to write the image data to.

format MagickFormat

The format to use.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(Stream, CancellationToken)

Writes the image to the specified stream.

public Task WriteAsync(Stream stream, CancellationToken cancellationToken)

Parameters

stream Stream

The stream to write the image data to.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(string)

Writes the image to the specified file name.

public Task WriteAsync(string fileName)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(string, IWriteDefines)

Writes the image to the specified file name.

public Task WriteAsync(string fileName, IWriteDefines defines)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

defines IWriteDefines

The defines to set.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(string, IWriteDefines, CancellationToken)

Writes the image to the specified file name.

public Task WriteAsync(string fileName, IWriteDefines defines, CancellationToken cancellationToken)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

defines IWriteDefines

The defines to set.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(string, MagickFormat)

Writes the image to the specified file name.

public Task WriteAsync(string fileName, MagickFormat format)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

format MagickFormat

The format to use.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(string, MagickFormat, CancellationToken)

Writes the image to the specified file name.

public Task WriteAsync(string fileName, MagickFormat format, CancellationToken cancellationToken)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

format MagickFormat

The format to use.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

WriteAsync(string, CancellationToken)

Writes the image to the specified file name.

public Task WriteAsync(string fileName, CancellationToken cancellationToken)

Parameters

fileName string

The fully qualified name of the image file, or the relative image file name.

cancellationToken CancellationToken

The token to monitor for cancellation requests.

Returns

Task

A Task representing the asynchronous operation.

Exceptions

ImageMagick.MagickException

Thrown when an error is raised by ImageMagick.

Events

Progress

Event that will be raised when progress is reported by this image.

public event EventHandler<ProgressEventArgs> Progress

Event Type

EventHandler<ProgressEventArgs>

Warning

Event that will we raised when a warning is raised by ImageMagick.

public event EventHandler<WarningEventArgs> Warning

Event Type

EventHandler<WarningEventArgs>

Operators

operator >(MagickImage?, MagickImage?)

Determines whether the first MagickImage is more than the second MagickImage.

public static bool operator >(MagickImage? left, MagickImage? right)

Parameters

left MagickImage

The first MagickImage to compare.

right MagickImage

The second MagickImage to compare.

Returns

bool

operator >=(MagickImage?, MagickImage?)

Determines whether the first MagickImage is more than or equal to the second MagickImage.

public static bool operator >=(MagickImage? left, MagickImage? right)

Parameters

left MagickImage

The first MagickImage to compare.

right MagickImage

The second MagickImage to compare.

Returns

bool

operator <(MagickImage?, MagickImage?)

Determines whether the first MagickImage is less than the second MagickImage.

public static bool operator <(MagickImage? left, MagickImage? right)

Parameters

left MagickImage

The first MagickImage to compare.

right MagickImage

The second MagickImage to compare.

Returns

bool

operator <=(MagickImage?, MagickImage?)

Determines whether the first MagickImage is less than or equal to the second MagickImage.

public static bool operator <=(MagickImage? left, MagickImage? right)

Parameters

left MagickImage

The first MagickImage to compare.

right MagickImage

The second MagickImage to compare.

Returns

bool