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
- 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
intThe width.
height
intThe 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
MagickFormatThe 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
intThe offset at which to begin reading data.
count
intThe 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
intThe offset at which to begin reading data.
count
intThe 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
intThe offset at which to begin reading data.
count
intThe maximum number of bytes to read.
format
MagickFormatThe 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
FileInfoThe 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
FileInfoThe 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
FileInfoThe file to read the image from.
format
MagickFormatThe 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
StreamThe 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
StreamThe 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
StreamThe stream to read the image data from.
format
MagickFormatThe 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
stringThe 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
stringThe 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
stringThe fully qualified name of the image file, or the relative image file name.
format
MagickFormatThe 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
stringThe fully qualified name of the image file, or the relative image file name.
width
intThe width.
height
intThe 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
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
AnimationTicksPerSecond
Gets or sets the ticks per seconds for the animation delay.
public int AnimationTicksPerSecond { get; set; }
Property Value
ArtifactNames
Gets the names of the artifacts.
public IEnumerable<string> ArtifactNames { get; }
Property Value
AttributeNames
Gets the names of the attributes.
public IEnumerable<string> AttributeNames { get; }
Property Value
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
BaseWidth
Gets the width of the image before transformations.
public int BaseWidth { get; }
Property Value
BlackPointCompensation
Gets or sets a value indicating whether black point compensation should be used.
public bool BlackPointCompensation { get; set; }
Property Value
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
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
Comment
Gets or sets the comment text of the image.
public string? Comment { get; set; }
Property Value
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
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
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
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
Height
Gets the height of the image.
public int Height { get; }
Property Value
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
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
Label
Gets or sets the label of the image.
public string? Label { get; set; }
Property Value
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
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
Quality
Gets or sets the JPEG/MIFF/PNG compression level (default 75).
public int Quality { get; set; }
Property Value
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
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
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
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
doubleThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe 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
IMagickGeometryThe 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
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
ChannelsThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe standard deviation of the Laplacian, in pixels.
channels
ChannelsThe 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
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
intThe width of the pixel neighborhood.
height
intThe height of the pixel neighborhood.
channels
ChannelsThe 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
intThe width of the pixel neighborhood.
height
intThe height of the pixel neighborhood.
biasPercentage
PercentageConstant 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
intThe width of the pixel neighborhood.
height
intThe height of the pixel neighborhood.
biasPercentage
PercentageConstant to subtract from pixel neighborhood mean.
channels
ChannelsThe 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
intThe width of the pixel neighborhood.
height
intThe height of the pixel neighborhood.
bias
doubleConstant 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
intThe width of the pixel neighborhood.
height
intThe height of the pixel neighborhood.
bias
doubleConstant to subtract from pixel neighborhood mean (+/-)(0-QuantumRange).
channels
ChannelsThe 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
NoiseTypeThe 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
NoiseTypeThe type of noise that should be added to the image.
channels
ChannelsThe 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
NoiseTypeThe type of noise that should be added to the image.
attenuate
doubleAttenuate 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
NoiseTypeThe type of noise that should be added to the image.
attenuate
doubleAttenuate the random distribution.
channels
ChannelsThe 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
IDrawableAffineThe 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
AlphaOptionThe 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
stringThe text to use.
gravity
GravityThe 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
stringThe text to use.
boundingArea
IMagickGeometryThe 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
stringThe text to use.
boundingArea
IMagickGeometryThe bounding area.
gravity
GravityThe 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
stringThe text to use.
boundingArea
IMagickGeometryThe bounding area.
gravity
GravityThe placement gravity.
angle
doubleThe 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
ChannelsThe 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
ChannelsThe 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
AutoThresholdMethodThe 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
intThe width of the neighborhood in pixels.
height
intThe 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
intThe width of the neighborhood in pixels.
height
intThe height of the neighborhood in pixels.
intensitySigma
doubleThe sigma in the intensity space.
spatialSigma
doubleThe 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
PercentageThe 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
PercentageThe threshold to use.
channels
ChannelsThe 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
doubleThe 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
ChannelsThe 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
doubleThe radius of the Gaussian in pixels, not counting the center pixel.
sigma
doubleThe 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
doubleThe radius of the Gaussian in pixels, not counting the center pixel.
sigma
doubleThe standard deviation of the Laplacian, in pixels.
channels
ChannelsThe 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
PercentageThe 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
intThe 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
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
PercentageThe brightness.
contrast
PercentageThe 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
PercentageThe brightness.
contrast
PercentageThe contrast.
channels
ChannelsThe 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
doubleThe radius of the gaussian smoothing filter.
sigma
doubleThe sigma of the gaussian smoothing filter.
lower
PercentagePercentage of edge pixels in the lower threshold.
upper
PercentagePercentage 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe 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
IMagickGeometryThe 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
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
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
PercentageThe percentage of tile divisions to use in horizontal direction.
yTiles
PercentageThe percentage of tile divisions to use in vertical direction.
numberBins
intThe number of bins for histogram ("dynamic range").
clipLimit
doubleThe 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
intThe number of tile divisions to use in horizontal direction.
yTiles
intThe number of tile divisions to use in vertical direction.
numberBins
intThe number of bins for histogram ("dynamic range").
clipLimit
doubleThe 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
ChannelsThe 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
stringName 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
stringName 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
IMagickGeometryThe 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
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
intThe X offset from origin.
y
intThe Y offset from origin.
width
intThe width of the area to clone.
height
intThe 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
IMagickImageThe 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
IMagickImageThe image to use.
channels
ChannelsThe 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
IMagickImageThe image to use.
method
PixelInterpolateMethodPixel 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
IMagickImageThe image to use.
method
PixelInterpolateMethodPixel interpolate method.
channels
ChannelsThe 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
stringThe 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
IMagickColorMatrixThe 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
PercentageThe 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
PercentageThe alpha percentage for red.
alphaGreen
PercentageThe alpha percentage for green.
alphaBlue
PercentageThe 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
IMagickImageThe 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
IMagickImageThe other image to compare with this image.
metric
ErrorMetricThe 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
IMagickImageThe other image to compare with this image.
metric
ErrorMetricThe metric to use.
channels
ChannelsThe 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
IMagickImageThe other image to compare with this image.
metric
ErrorMetricThe metric to use.
difference
IMagickImageThe 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
IMagickImageThe other image to compare with this image.
metric
ErrorMetricThe metric to use.
difference
IMagickImageThe image that will contain the difference.
channels
ChannelsThe 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
IMagickImageThe other image to compare with this image.
settings
ICompareSettings<ushort>The settings to use.
difference
IMagickImageThe 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
IMagickImageThe other image to compare with this image.
settings
ICompareSettings<ushort>The settings to use.
difference
IMagickImageThe image that will contain the difference.
channels
ChannelsThe 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
IMagickImageThe 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
IMagickImageThe image to composite with this image.
channels
ChannelsThe 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
IMagickImageThe image to composite with this image.
compose
CompositeOperatorThe 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
IMagickImageThe image to composite with this image.
compose
CompositeOperatorThe algorithm to use.
channels
ChannelsThe 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
IMagickImageThe image to composite with this image.
compose
CompositeOperatorThe algorithm to use.
args
stringThe 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
IMagickImageThe image to composite with this image.
compose
CompositeOperatorThe algorithm to use.
args
stringThe arguments for the algorithm (compose:args).
channels
ChannelsThe 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
IMagickImageThe image to composite with this image.
gravity
GravityThe 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
IMagickImageThe image to composite with this image.
gravity
GravityThe placement gravity.
channels
ChannelsThe 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
IMagickImageThe image to composite with this image.
gravity
GravityThe placement gravity.
compose
CompositeOperatorThe 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
IMagickImageThe image to composite with this image.
gravity
GravityThe placement gravity.
compose
CompositeOperatorThe algorithm to use.
channels
ChannelsThe 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
IMagickImageThe image to composite with this image.
gravity
GravityThe placement gravity.
compose
CompositeOperatorThe algorithm to use.
args
stringThe 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
IMagickImageThe image to composite with this image.
gravity
GravityThe placement gravity.
compose
CompositeOperatorThe algorithm to use.
args
stringThe arguments for the algorithm (compose:args).
channels
ChannelsThe 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
IMagickImageThe image to composite with this image.
gravity
GravityThe placement gravity.
x
intThe X offset from origin.
y
intThe 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
IMagickImageThe image to composite with this image.
gravity
GravityThe placement gravity.
x
intThe X offset from origin.
y
intThe Y offset from origin.
channels
ChannelsThe 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
IMagickImageThe image to composite with this image.
gravity
GravityThe placement gravity.
x
intThe X offset from origin.
y
intThe Y offset from origin.
compose
CompositeOperatorThe 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
IMagickImageThe image to composite with this image.
gravity
GravityThe placement gravity.
x
intThe X offset from origin.
y
intThe Y offset from origin.
compose
CompositeOperatorThe algorithm to use.
channels
ChannelsThe 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
IMagickImageThe image to composite with this image.
gravity
GravityThe placement gravity.
x
intThe X offset from origin.
y
intThe Y offset from origin.
compose
CompositeOperatorThe algorithm to use.
args
stringThe 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
IMagickImageThe image to composite with this image.
gravity
GravityThe placement gravity.
x
intThe X offset from origin.
y
intThe Y offset from origin.
compose
CompositeOperatorThe algorithm to use.
args
stringThe arguments for the algorithm (compose:args).
channels
ChannelsThe 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
IMagickImageThe image to composite with this image.
x
intThe X offset from origin.
y
intThe 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
IMagickImageThe image to composite with this image.
x
intThe X offset from origin.
y
intThe Y offset from origin.
channels
ChannelsThe 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
IMagickImageThe image to composite with this image.
x
intThe X offset from origin.
y
intThe Y offset from origin.
compose
CompositeOperatorThe 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
IMagickImageThe image to composite with this image.
x
intThe X offset from origin.
y
intThe Y offset from origin.
compose
CompositeOperatorThe algorithm to use.
channels
ChannelsThe 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
IMagickImageThe image to composite with this image.
x
intThe X offset from origin.
y
intThe Y offset from origin.
compose
CompositeOperatorThe algorithm to use.
args
stringThe 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
IMagickImageThe image to composite with this image.
x
intThe X offset from origin.
y
intThe Y offset from origin.
compose
CompositeOperatorThe algorithm to use.
args
stringThe arguments for the algorithm (compose:args).
channels
ChannelsThe 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
IConnectedComponentsSettingsThe 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
intHow 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
PercentageThe 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
PercentageThe black point.
whitePoint
PercentageThe 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
PercentageThe black point.
whitePoint
PercentageThe white point.
channels
ChannelsThe 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
IConvolveMatrixThe 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
IMagickImageThe 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
IMagickImageThe source image to copy the pixels from.
channels
ChannelsThe 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
IMagickImageThe source image to copy the pixels from.
geometry
IMagickGeometryThe 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
IMagickImageThe source image to copy the pixels from.
geometry
IMagickGeometryThe geometry to copy.
channels
ChannelsThe 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
IMagickImageThe source image to copy the pixels from.
geometry
IMagickGeometryThe geometry to copy.
x
intThe X offset to copy the pixels to.
y
intThe 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
IMagickImageThe source image to copy the pixels from.
geometry
IMagickGeometryThe geometry to copy.
x
intThe X offset to copy the pixels to.
y
intThe Y offset to copy the pixels to.
channels
ChannelsThe 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
IMagickGeometryThe 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
IMagickGeometryThe subregion to crop.
gravity
GravityThe 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
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
intThe width of the subregion to crop.
height
intThe height of the subregion to crop.
gravity
GravityThe 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
IMagickGeometryThe 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
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
intDisplace 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
stringThe 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
IDeskewSettingsThe 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
PercentageThe 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
ChannelsThe 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
DistortMethodThe distortion method to use.
settings
IDistortSettingsThe 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
DistortMethodThe 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
doubleThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe 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
stringThe 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
ChannelsThe 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
ChannelsThe channel(s) to apply the operator on.
evaluateFunction
EvaluateFunctionThe 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
ChannelsThe channel(s) to apply the operator on.
evaluateOperator
EvaluateOperatorThe operator to use.
percentage
PercentageThe 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
ChannelsThe channel(s) to apply the operator on.
evaluateOperator
EvaluateOperatorThe operator to use.
value
doubleThe 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
ChannelsThe channel(s) to apply the operator on.
geometry
IMagickGeometryThe geometry to use.
evaluateOperator
EvaluateOperatorThe operator to use.
percentage
PercentageThe 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
ChannelsThe channel(s) to apply the operator on.
geometry
IMagickGeometryThe geometry to use.
evaluateOperator
EvaluateOperatorThe operator.
value
doubleThe 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
IMagickGeometryThe 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
IMagickGeometryThe geometry to extend the image to.
gravity
GravityThe 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
IMagickGeometryThe geometry to extend the image to.
gravity
GravityThe 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
IMagickGeometryThe 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
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
intThe width to extend the image to.
height
intThe height to extend the image to.
gravity
GravityThe 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
intThe width to extend the image to.
height
intThe height to extend the image to.
gravity
GravityThe 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
intThe width to extend the image to.
height
intThe 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
intThe X offset from origin.
y
intThe Y offset from origin.
width
intThe width to extend the image to.
height
intThe 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
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
intThe X coordinate.
y
intThe 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
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
intThe X coordinate.
y
intThe 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
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
stringThe 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
stringThe text to get the font metrics for.
ignoreNewlines
boolSpecifies 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
stringThe 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
IMagickGeometryThe 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
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
intThe width of the frame.
height
intThe height of the frame.
innerBevel
intThe inner bevel of the frame.
outerBevel
intThe 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
stringThe 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
stringThe 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
stringThe expression to apply.
channels
ChannelsThe 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
doubleThe 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
doubleThe image gamma for the channel.
channels
ChannelsThe 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
doubleThe 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
doubleThe number of neighbor pixels to be included in the convolution.
channels
ChannelsThe 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
doubleThe number of neighbor pixels to be included in the convolution.
sigma
doubleThe 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
doubleThe number of neighbor pixels to be included in the convolution.
sigma
doubleThe standard deviation of the gaussian bell curve.
channels
ChannelsThe 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
stringThe 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
stringThe 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
stringName 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
intThe 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
stringThe 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
PixelIntensityMethodThe 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
IMagickImageThe 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
IMagickImageThe image to use.
channels
ChannelsThe 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
stringThe 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
intThe width of the neighborhood.
height
intThe height of the neighborhood.
threshold
intThe 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
doubleThe extent of the implosion.
method
PixelInterpolateMethodPixel 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
IPixelImportSettingsThe 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
intThe offset at which to begin reading data.
settings
IPixelImportSettingsThe 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
IPixelImportSettingsThe 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
intThe offset at which to begin reading data.
settings
IPixelImportSettingsThe 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
IMagickGeometryThe geometry to use.
method
PixelInterpolateMethodPixel 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
PercentageThe percentage of the width.
percentageHeight
PercentageThe percentage of the height.
method
PixelInterpolateMethodPixel 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
PercentageThe percentage.
method
PixelInterpolateMethodPixel 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
intThe new width.
height
intThe new height.
method
PixelInterpolateMethodPixel 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
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
intThe X coordinate.
y
intThe 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
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
intThe X coordinate.
y
intThe 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
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
PercentageThe darkest color in the image. Colors darker are set to zero.
whitePointPercentage
PercentageThe 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
PercentageThe darkest color in the image. Colors darker are set to zero.
whitePointPercentage
PercentageThe lightest color in the image. Colors brighter are set to the maximum quantum value.
channels
ChannelsThe 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
PercentageThe darkest color in the image. Colors darker are set to zero.
whitePointPercentage
PercentageThe lightest color in the image. Colors brighter are set to the maximum quantum value.
gamma
doubleThe 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
PercentageThe darkest color in the image. Colors darker are set to zero.
whitePointPercentage
PercentageThe lightest color in the image. Colors brighter are set to the maximum quantum value.
gamma
doubleThe gamma correction to apply to the image. (Useful range of 0 to 10).
channels
ChannelsThe 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
ushortThe darkest color in the image. Colors darker are set to zero.
whitePoint
ushortThe 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
ushortThe darkest color in the image. Colors darker are set to zero.
whitePoint
ushortThe lightest color in the image. Colors brighter are set to the maximum quantum value.
channels
ChannelsThe 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
ushortThe darkest color in the image. Colors darker are set to zero.
whitePoint
ushortThe lightest color in the image. Colors brighter are set to the maximum quantum value.
gamma
doubleThe 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
ushortThe darkest color in the image. Colors darker are set to zero.
whitePoint
ushortThe lightest color in the image. Colors brighter are set to the maximum quantum value.
gamma
doubleThe gamma correction to apply to the image. (Useful range of 0 to 10).
channels
ChannelsThe 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
ChannelsThe 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
doubleThe 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
doubleThe contrast to use.
midpointPercentage
PercentageThe 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
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
doubleThe contrast to use.
midpoint
doubleThe midpoint to use.
channels
ChannelsThe 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
IKmeansSettingsThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe 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
PercentageThe darkest color in the image. Colors darker are set to zero.
whitePointPercentage
PercentageThe 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
PercentageThe darkest color in the image. Colors darker are set to zero.
whitePointPercentage
PercentageThe lightest color in the image. Colors brighter are set to the maximum quantum value.
channels
ChannelsThe 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
PercentageThe darkest color in the image. Colors darker are set to zero.
whitePointPercentage
PercentageThe lightest color in the image. Colors brighter are set to the maximum quantum value.
gamma
doubleThe 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
PercentageThe darkest color in the image. Colors darker are set to zero.
whitePointPercentage
PercentageThe lightest color in the image. Colors brighter are set to the maximum quantum value.
gamma
doubleThe gamma correction to apply to the image. (Useful range of 0 to 10).
channels
ChannelsThe 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
ushortThe darkest color in the image. Colors darker are set to zero.
whitePoint
ushortThe 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
ushortThe darkest color in the image. Colors darker are set to zero.
whitePoint
ushortThe lightest color in the image. Colors brighter are set to the maximum quantum value.
channels
ChannelsThe 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
ushortThe darkest color in the image. Colors darker are set to zero.
whitePoint
ushortThe lightest color in the image. Colors brighter are set to the maximum quantum value.
gamma
doubleThe 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
ushortThe darkest color in the image. Colors darker are set to zero.
whitePoint
ushortThe lightest color in the image. Colors brighter are set to the maximum quantum value.
gamma
doubleThe gamma correction to apply to the image. (Useful range of 0 to 10).
channels
ChannelsThe 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
ChannelsThe 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
PercentageThe black point.
whitePoint
PercentageThe 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
IMagickGeometryThe 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
PercentageThe 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
PercentageThe percentage of the width.
percentageHeight
PercentageThe 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
PercentageThe percentage of the width.
percentageHeight
PercentageThe percentage of the height.
deltaX
doubleMaximum seam transversal step (0 means straight seams).
rigidity
doubleIntroduce 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
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
intThe new width.
height
intThe new height.
deltaX
doubleMaximum seam transversal step (0 means straight seams).
rigidity
doubleIntroduce 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
strength
PercentageThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
strength
PercentageThe strength of the blur mask.
channels
ChannelsThe 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
intThe 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
IMagickImageThe 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
IMagickImageThe image to use.
settings
IQuantizeSettingsQuantize 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
IQuantizeSettingsQuantize 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
intThe 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
intThe width and height of the pixels neighborhood.
colorDistance
PercentageThe color distance.
MeanShift(int, int)
Delineate arbitrarily shaped clusters in the image.
public void MeanShift(int width, int height)
Parameters
MeanShift(int, int, Percentage)
Delineate arbitrarily shaped clusters in the image.
public void MeanShift(int width, int height, Percentage colorDistance)
Parameters
width
intThe width of the pixels neighborhood.
height
intThe height of the pixels neighborhood.
colorDistance
PercentageThe 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
intThe 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
PercentageThe 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
PercentageThe brightness percentage.
saturation
PercentageThe 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
PercentageThe brightness percentage.
saturation
PercentageThe saturation percentage.
hue
PercentageThe 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
IMorphologySettingsThe 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
MorphologyMethodThe morphology method.
kernel
KernelBuilt-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
MorphologyMethodThe morphology method.
kernel
KernelBuilt-in kernel.
channels
ChannelsThe 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
MorphologyMethodThe morphology method.
kernel
KernelBuilt-in kernel.
channels
ChannelsThe channels to apply the kernel to.
iterations
intThe 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
MorphologyMethodThe morphology method.
kernel
KernelBuilt-in kernel.
iterations
intThe 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
MorphologyMethodThe morphology method.
kernel
KernelBuilt-in kernel.
arguments
stringKernel 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
MorphologyMethodThe morphology method.
kernel
KernelBuilt-in kernel.
arguments
stringKernel arguments.
channels
ChannelsThe 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
MorphologyMethodThe morphology method.
kernel
KernelBuilt-in kernel.
arguments
stringKernel arguments.
channels
ChannelsThe channels to apply the kernel to.
iterations
intThe 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
MorphologyMethodThe morphology method.
kernel
KernelBuilt-in kernel.
arguments
stringKernel arguments.
iterations
intThe 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
MorphologyMethodThe morphology method.
userKernel
stringUser 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
MorphologyMethodThe morphology method.
userKernel
stringUser suplied kernel.
channels
ChannelsThe 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
MorphologyMethodThe morphology method.
userKernel
stringUser suplied kernel.
channels
ChannelsThe channels to apply the kernel to.
iterations
intThe 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
MorphologyMethodThe morphology method.
userKernel
stringUser suplied kernel.
iterations
intThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe standard deviation of the Laplacian, in pixels.
angle
doubleThe 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
ChannelsThe 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
ChannelsThe 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
doubleThe radius of the circular neighborhood.
sigma
doubleThe 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
stringA 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
stringA 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
ChannelsThe 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
doubleThe 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
doubleThe epsilon threshold.
channels
ChannelsThe 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
intThe offset at which to begin reading data.
count
intThe 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
intThe offset at which to begin reading data.
count
intThe 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
FileInfoThe 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
FileInfoThe 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
StreamThe 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
StreamThe 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
stringThe 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
stringThe 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
stringThe caption to put on the image.
angle
doubleThe angle of image.
method
PixelInterpolateMethodPixel 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
intNumber 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
intNumber of color levels allowed in each channel.
channels
ChannelsThe 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
intNumber of color levels allowed in each channel.
method
DitherMethodDither 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
intNumber of color levels allowed in each channel.
method
DitherMethodDither method to use.
channels
ChannelsThe 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
IQuantizeSettingsQuantize 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
intThe 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
PercentageThe low threshold.
percentageHigh
PercentageThe 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
PercentageThe low threshold.
percentageHigh
PercentageThe high threshold.
channels
ChannelsThe 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
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
ushortThe low threshold.
high
ushortThe high threshold.
channels
ChannelsThe 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
PercentageDefines the minimum black threshold value.
percentageLowWhite
PercentageDefines the minimum white threshold value.
percentageHighWhite
PercentageDefines the maximum white threshold value.
percentageHighBlack
PercentageDefines 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
ushortDefines the minimum black threshold value.
lowWhite
ushortDefines the minimum white threshold value.
highWhite
ushortDefines the maximum white threshold value.
highBlack
ushortDefines 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
intThe width.
height
intThe 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
MagickFormatThe 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
intThe offset at which to begin reading data.
count
intThe 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
intThe offset at which to begin reading data.
count
intThe 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
intThe offset at which to begin reading data.
count
intThe maximum number of bytes to read.
format
MagickFormatThe 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
FileInfoThe 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
FileInfoThe 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
FileInfoThe file to read the image from.
format
MagickFormatThe 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
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Read(Stream)
Read single image frame.
public void Read(Stream stream)
Parameters
stream
StreamThe 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
StreamThe 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
StreamThe stream to read the image data from.
format
MagickFormatThe 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
stringThe 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
stringThe 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
stringThe fully qualified name of the image file, or the relative image file name.
format
MagickFormatThe 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
stringThe fully qualified name of the image file, or the relative image file name.
width
intThe width.
height
intThe 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
FileInfoThe file to read the image from.
Returns
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
FileInfoThe file to read the image from.
readSettings
IMagickReadSettings<ushort>The settings to use when reading the image.
Returns
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
FileInfoThe file to read the image from.
readSettings
IMagickReadSettings<ushort>The settings to use when reading the image.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
FileInfoThe file to read the image from.
format
MagickFormatThe format to use.
Returns
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
FileInfoThe file to read the image from.
format
MagickFormatThe format to use.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
FileInfoThe file to read the image from.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ReadAsync(Stream)
Read single image frame.
public Task ReadAsync(Stream stream)
Parameters
stream
StreamThe stream to read the image data from.
Returns
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
StreamThe stream to read the image data from.
readSettings
IMagickReadSettings<ushort>The settings to use when reading the image.
Returns
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
StreamThe stream to read the image data from.
readSettings
IMagickReadSettings<ushort>The settings to use when reading the image.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
StreamThe stream to read the image data from.
format
MagickFormatThe format to use.
Returns
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
StreamThe stream to read the image data from.
format
MagickFormatThe format to use.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
StreamThe stream to read the image data from.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ReadAsync(string)
Read single image frame.
public Task ReadAsync(string fileName)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
Returns
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
stringThe 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
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
stringThe 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
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
stringThe fully qualified name of the image file, or the relative image file name.
format
MagickFormatThe format to use.
Returns
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
stringThe fully qualified name of the image file, or the relative image file name.
format
MagickFormatThe format to use.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
stringThe fully qualified name of the image file, or the relative image file name.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
intThe offset at which to begin reading data.
count
intThe 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
FileInfoThe 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
StreamThe 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
stringThe 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
intThe offset at which to begin reading data.
count
intThe 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
FileInfoThe file to read the image from.
settings
IPixelReadSettings<ushort>The pixel settings to use when reading the image.
Returns
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
FileInfoThe file to read the image from.
settings
IPixelReadSettings<ushort>The pixel settings to use when reading the image.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
StreamThe stream to read the image data from.
settings
IPixelReadSettings<ushort>The pixel settings to use when reading the image.
Returns
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
StreamThe stream to read the image data from.
settings
IPixelReadSettings<ushort>The pixel settings to use when reading the image.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
stringThe 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
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
stringThe 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
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
intThe 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
IMagickGeometryThe mask region.
RemoveArtifact(string)
Removes the artifact with the specified name.
public void RemoveArtifact(string name)
Parameters
name
stringThe name of the artifact.
RemoveAttribute(string)
Removes the attribute with the specified name.
public void RemoveAttribute(string name)
Parameters
name
stringThe name of the attribute.
RemoveProfile(IImageProfile)
Remove a profile from the image.
public void RemoveProfile(IImageProfile profile)
Parameters
profile
IImageProfileThe profile to remove.
RemoveProfile(string)
Remove a named profile from the image.
public void RemoveProfile(string name)
Parameters
name
stringThe 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
PointDThe 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
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
IMagickGeometryThe 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
PercentageThe 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
PercentageThe percentage of the width.
percentageHeight
PercentageThe 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
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
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
doubleThe 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
doubleThe 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
doubleThe angle to use.
channels
ChannelsThe 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
IMagickGeometryThe 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
PercentageThe 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
PercentageThe percentage of the width.
percentageHeight
PercentageThe 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
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
IMagickGeometryThe 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
PercentageThe 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
PercentageThe percentage of the width.
percentageHeight
PercentageThe 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
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
ColorSpaceQuantize colorspace.
clusterThreshold
doubleThis represents the minimum number of pixels contained in a hexahedra before it can be considered valid (expressed as a percentage).
smoothingThreshold
doubleThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe standard deviation of the Gaussian, in pixels.
thresholdPercentage
PercentageOnly 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe standard deviation of the Gaussian, in pixels.
thresholdPercentage
PercentageOnly pixels within this contrast threshold are included in the blur operation.
channels
ChannelsThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe standard deviation of the Gaussian, in pixels.
threshold
doubleOnly 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe standard deviation of the Gaussian, in pixels.
threshold
doubleOnly pixels within this contrast threshold are included in the blur operation.
channels
ChannelsThe 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
ChannelsThe 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
PercentageThe 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
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
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
doubleThe attenuate value.
SetAttribute(string, bool)
Sets a named image attribute.
public void SetAttribute(string name, bool flag)
Parameters
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
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
intThe 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
intThe depth.
channels
ChannelsThe 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
stringThe 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
stringThe clipping path.
pathName
stringName 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
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
CompressionMethodThe 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
IColorProfileThe 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
IColorProfileThe profile to set.
mode
ColorTransformModeThe 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
IImageProfileThe 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
IMagickImageThe 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
IMagickImageThe 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
doubleThe azimuth of the light source direction.
elevation
doubleThe 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
doubleThe azimuth of the light source direction.
elevation
doubleThe elevation of the light source direction.
channels
ChannelsThe 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
doubleThe azimuth of the light source direction.
elevation
doubleThe 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
doubleThe azimuth of the light source direction.
elevation
doubleThe elevation of the light source direction.
channels
ChannelsThe 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
intthe shadow x-offset.
y
intthe shadow y-offset.
sigma
doubleThe standard deviation of the Gaussian, in pixels.
alpha
PercentageTransparency 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
inty
intthe shadow y-offset.
sigma
doubleThe standard deviation of the Gaussian, in pixels.
alpha
PercentageTransparency 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
ChannelsThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe standard deviation of the Laplacian, in pixels.
channels
ChannelsThe channel(s) that should be sharpened.
Shave(int)
Shave pixels from image edges.
public void Shave(int size)
Parameters
size
intThe 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
intThe number of pixels to shave left and right.
topBottom
intThe 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
doubleSpecifies the number of x degrees to shear the image.
yAngle
doubleSpecifies 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
doubleThe 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
doubleThe contrast to use.
midpointPercentage
PercentageThe 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
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
doubleThe contrast to use.
midpoint
doubleThe midpoint to use.
channels
ChannelsThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe standard deviation of the Laplacian, in pixels.
angle
doubleApply 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
PercentageThe 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
doubleThe 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
ChannelsThe channel(s) to use.
method
SparseColorMethodThe 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
ChannelsThe channel(s) to use.
method
SparseColorMethodThe 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
SparseColorMethodThe 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
SparseColorMethodThe 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
IMagickGeometryThe 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
PixelInterpolateMethodPixel interpolate method.
radius
doubleChoose 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
doubleChoose 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
StatisticTypeThe statistic type.
width
intThe width of the pixel neighborhood.
height
intThe 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
ChannelsThe 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
IMagickImageThe 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
IMagickImageThe 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
ErrorMetricThe 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
ErrorMetricThe metric to use.
similarityThreshold
doubleMinimum 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
PixelInterpolateMethodPixel interpolate method.
degrees
doubleThe 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
doubleThe 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
IMagickImageThe 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
PercentageThe 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
PercentageThe threshold percentage.
channels
ChannelsThe 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
IMagickGeometryThe 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
PercentageThe 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
PercentageThe percentage of the width.
percentageHeight
PercentageThe 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
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
IMagickImageThe image to composite with this image.
compose
CompositeOperatorThe 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
IMagickImageThe image to composite with this image.
compose
CompositeOperatorThe algorithm to use.
args
stringThe 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
IMagickGeometryAn 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
ToBase64(IWriteDefines)
Converts this instance to a base64 string.
public string ToBase64(IWriteDefines defines)
Parameters
defines
IWriteDefinesThe defines to set.
Returns
ToBase64(MagickFormat)
Converts this instance to a base64 string.
public string ToBase64(MagickFormat format)
Parameters
format
MagickFormatThe format to use.
Returns
ToByteArray()
Converts this instance to a byte array.
public byte[] ToByteArray()
Returns
ToByteArray(IWriteDefines)
Converts this instance to a byte array.
public byte[] ToByteArray(IWriteDefines defines)
Parameters
defines
IWriteDefinesThe defines to set.
Returns
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
MagickFormatThe format to use.
Returns
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
IColorProfileThe 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
IColorProfileThe target color profile.
mode
ColorTransformModeThe 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
IColorProfileThe source color profile.
target
IColorProfileThe 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
IColorProfileThe source color profile.
target
IColorProfileThe target color profile.
mode
ColorTransformModeThe 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
PercentageThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe standard deviation of the Laplacian, in pixels.
channels
ChannelsThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe standard deviation of the Laplacian, in pixels.
amount
doubleThe percentage of the difference between the original and the blur image that is added back into the original.
threshold
doubleThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe standard deviation of the Laplacian, in pixels.
amount
doubleThe percentage of the difference between the original and the blur image that is added back into the original.
threshold
doubleThe threshold in pixels needed to apply the diffence amount.
channels
ChannelsThe 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
doubleThe radius of the Gaussian, in pixels, not counting the center pixel.
sigma
doubleThe standard deviation of the Laplacian, in pixels.
x
intThe x ellipse offset.
y
intthe 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
PixelInterpolateMethodThe pixel interpolate method.
amplitude
doubleThe amplitude.
length
doubleThe 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
PercentageThe threshold for smoothing.
WaveletDenoise(Percentage, double)
Removes noise from the image using a wavelet transform.
public void WaveletDenoise(Percentage thresholdPercentage, double softness)
Parameters
thresholdPercentage
PercentageThe threshold for smoothing.
softness
doubleAttenuate the smoothing threshold.
WaveletDenoise(ushort)
Removes noise from the image using a wavelet transform.
public void WaveletDenoise(ushort threshold)
Parameters
threshold
ushortThe threshold for smoothing.
WaveletDenoise(ushort, double)
Removes noise from the image using a wavelet transform.
public void WaveletDenoise(ushort threshold, double softness)
Parameters
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
PercentageThe 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
PercentageThe 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
PercentageThe threshold to use.
channels
ChannelsThe 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
FileInfoThe 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
FileInfoThe file to write the image to.
defines
IWriteDefinesThe 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
FileInfoThe file to write the image to.
format
MagickFormatThe 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
StreamThe 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
StreamThe stream to write the image data to.
defines
IWriteDefinesThe 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
StreamThe stream to write the image data to.
format
MagickFormatThe 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
stringThe 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
stringThe fully qualified name of the image file, or the relative image file name.
defines
IWriteDefinesThe 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
stringThe fully qualified name of the image file, or the relative image file name.
format
MagickFormatThe 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
FileInfoThe file to write the image to.
Returns
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
FileInfoThe file to write the image to.
defines
IWriteDefinesThe defines to set.
Returns
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
FileInfoThe file to write the image to.
defines
IWriteDefinesThe defines to set.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
FileInfoThe file to write the image to.
format
MagickFormatThe format to use.
Returns
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
FileInfoThe file to write the image to.
format
MagickFormatThe format to use.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
FileInfoThe file to write the image to.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
StreamThe stream to write the image data to.
Returns
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
StreamThe stream to write the image data to.
defines
IWriteDefinesThe defines to set.
Returns
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
StreamThe stream to write the image data to.
defines
IWriteDefinesThe defines to set.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
StreamThe stream to write the image data to.
format
MagickFormatThe format to use.
Returns
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
StreamThe stream to write the image data to.
format
MagickFormatThe format to use.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
StreamThe stream to write the image data to.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
stringThe fully qualified name of the image file, or the relative image file name.
Returns
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
stringThe fully qualified name of the image file, or the relative image file name.
defines
IWriteDefinesThe defines to set.
Returns
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
stringThe fully qualified name of the image file, or the relative image file name.
defines
IWriteDefinesThe defines to set.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
stringThe fully qualified name of the image file, or the relative image file name.
format
MagickFormatThe format to use.
Returns
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
stringThe fully qualified name of the image file, or the relative image file name.
format
MagickFormatThe format to use.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
stringThe fully qualified name of the image file, or the relative image file name.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
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
MagickImageThe first MagickImage to compare.
right
MagickImageThe second MagickImage to compare.
Returns
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
MagickImageThe first MagickImage to compare.
right
MagickImageThe second MagickImage to compare.
Returns
operator <(MagickImage?, MagickImage?)
Determines whether the first MagickImage is less than the second MagickImage.
public static bool operator <(MagickImage? left, MagickImage? right)
Parameters
left
MagickImageThe first MagickImage to compare.
right
MagickImageThe second MagickImage to compare.
Returns
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
MagickImageThe first MagickImage to compare.
right
MagickImageThe second MagickImage to compare.