Class MagickImage
- Namespace
- ImageMagick
- Assembly
- Magick.NET-Q8-AnyCPU.dll
Class that represents an ImageMagick image.
public sealed class MagickImage : IMagickImage<byte>, IMagickImage, IMagickImageCreateOperations, IComparable<IMagickImage<byte>?>, IDisposable
- Inheritance
-
MagickImage
- Implements
-
IMagickImage<byte>IMagickImageIMagickImageCreateOperations
- Inherited Members
Constructors
MagickImage()
Initializes a new instance of the MagickImage class.
public MagickImage()
MagickImage(IMagickColor<byte>, uint, uint)
Initializes a new instance of the MagickImage class.
public MagickImage(IMagickColor<byte> color, uint width, uint height)
Parameters
color
IMagickColor<byte>The color to fill the image with.
width
uintThe width.
height
uintThe height.
MagickImage(IMagickImage<byte>)
Initializes a new instance of the MagickImage class.
public MagickImage(IMagickImage<byte> image)
Parameters
image
IMagickImage<byte>The image to create a copy of.
MagickImage(ReadOnlySequence<byte>)
Initializes a new instance of the MagickImage class.
public MagickImage(ReadOnlySequence<byte> data)
Parameters
data
ReadOnlySequence<byte>The span of bytes to read the image data from.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
MagickImage(ReadOnlySequence<byte>, IMagickReadSettings<byte>)
Initializes a new instance of the MagickImage class.
public MagickImage(ReadOnlySequence<byte> data, IMagickReadSettings<byte> readSettings)
Parameters
data
ReadOnlySequence<byte>The span of bytes to read the image data from.
readSettings
IMagickReadSettings<byte>The settings to use when reading the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
MagickImage(ReadOnlySequence<byte>, MagickFormat)
Initializes a new instance of the MagickImage class.
public MagickImage(ReadOnlySequence<byte> data, MagickFormat format)
Parameters
data
ReadOnlySequence<byte>The span of bytes to read the image data from.
format
MagickFormatThe format to use.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
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<byte>)
Initializes a new instance of the MagickImage class.
public MagickImage(byte[] data, IMagickReadSettings<byte> readSettings)
Parameters
data
byte[]The byte array to read the image data from.
readSettings
IMagickReadSettings<byte>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[], uint, uint)
Initializes a new instance of the MagickImage class.
public MagickImage(byte[] data, uint offset, uint count)
Parameters
data
byte[]The byte array to read the image data from.
offset
uintThe offset at which to begin reading data.
count
uintThe maximum number of bytes to read.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
MagickImage(byte[], uint, uint, IMagickReadSettings<byte>)
Initializes a new instance of the MagickImage class.
public MagickImage(byte[] data, uint offset, uint count, IMagickReadSettings<byte> readSettings)
Parameters
data
byte[]The byte array to read the image data from.
offset
uintThe offset at which to begin reading data.
count
uintThe maximum number of bytes to read.
readSettings
IMagickReadSettings<byte>The settings to use when reading the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
MagickImage(byte[], uint, uint, MagickFormat)
Initializes a new instance of the MagickImage class.
public MagickImage(byte[] data, uint offset, uint count, MagickFormat format)
Parameters
data
byte[]The byte array to read the image data from.
offset
uintThe offset at which to begin reading data.
count
uintThe 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<byte>)
Initializes a new instance of the MagickImage class.
public MagickImage(FileInfo file, IMagickReadSettings<byte> readSettings)
Parameters
file
FileInfoThe file to read the image from.
readSettings
IMagickReadSettings<byte>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<byte>)
Initializes a new instance of the MagickImage class.
public MagickImage(Stream stream, IMagickReadSettings<byte> readSettings)
Parameters
stream
StreamThe stream to read the image data from.
readSettings
IMagickReadSettings<byte>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(ReadOnlySpan<byte>)
Initializes a new instance of the MagickImage class.
public MagickImage(ReadOnlySpan<byte> data)
Parameters
data
ReadOnlySpan<byte>The span of bytes to read the image data from.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
MagickImage(ReadOnlySpan<byte>, IMagickReadSettings<byte>)
Initializes a new instance of the MagickImage class.
public MagickImage(ReadOnlySpan<byte> data, IMagickReadSettings<byte> readSettings)
Parameters
data
ReadOnlySpan<byte>The span of bytes to read the image data from.
readSettings
IMagickReadSettings<byte>The settings to use when reading the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
MagickImage(ReadOnlySpan<byte>, IPixelReadSettings<byte>)
Initializes a new instance of the MagickImage class.
public MagickImage(ReadOnlySpan<byte> data, IPixelReadSettings<byte> settings)
Parameters
data
ReadOnlySpan<byte>The span of bytes to read the image data from.
settings
IPixelReadSettings<byte>The pixel settings to use when reading the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
MagickImage(ReadOnlySpan<byte>, MagickFormat)
Initializes a new instance of the MagickImage class.
public MagickImage(ReadOnlySpan<byte> data, MagickFormat format)
Parameters
data
ReadOnlySpan<byte>The span of bytes 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<byte>)
Initializes a new instance of the MagickImage class.
public MagickImage(string fileName, IMagickReadSettings<byte> readSettings)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
readSettings
IMagickReadSettings<byte>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, uint, uint)
Initializes a new instance of the MagickImage class.
public MagickImage(string fileName, uint width, uint height)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
width
uintThe width.
height
uintThe 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 uint AnimationDelay { get; set; }
Property Value
AnimationIterations
Gets or sets the number of iterations to loop an animation (e.g. Netscape loop extension) for.
public uint 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<byte>? BackgroundColor { get; set; }
Property Value
- IMagickColor<byte>
BaseHeight
Gets the height of the image before transformations.
public uint BaseHeight { get; }
Property Value
BaseWidth
Gets the width of the image before transformations.
public uint 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<byte>? BorderColor { get; set; }
Property Value
- IMagickColor<byte>
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 uint ChannelCount { get; }
Property Value
Channels
Gets the color and metadata channels of the image.
public IEnumerable<PixelChannel> Channels { get; }
Property Value
- IEnumerable<PixelChannel>
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 uint Depth { get; set; }
Property Value
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
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 uint Height { get; }
Property Value
Interlace
Gets the type of interlacing to use.
public Interlace Interlace { get; }
Property Value
- Interlace
Interpolate
Gets or sets the pixel color interpolate method to use.
public PixelInterpolateMethod Interpolate { get; set; }
Property Value
- PixelInterpolateMethod
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<byte>? MatteColor { get; set; }
Property Value
- IMagickColor<byte>
MetaChannelCount
Gets or sets the number of meta channels that the image contains.
public uint 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 uint 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<byte> Settings { get; }
Property Value
- IMagickSettings<byte>
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 uint 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 uint 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(uint, uint)
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(uint width, uint 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(uint, uint)
Local adaptive threshold image. http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm.
public void AdaptiveThreshold(uint width, uint height)
Parameters
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
AdaptiveThreshold(uint, uint, Channels)
Local adaptive threshold image. http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm.
public void AdaptiveThreshold(uint width, uint height, Channels channels)
Parameters
width
uintThe width of the pixel neighborhood.
height
uintThe 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(uint, uint, Percentage)
Local adaptive threshold image. http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm.
public void AdaptiveThreshold(uint width, uint height, Percentage biasPercentage)
Parameters
width
uintThe width of the pixel neighborhood.
height
uintThe 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(uint, uint, Percentage, Channels)
Local adaptive threshold image. http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm.
public void AdaptiveThreshold(uint width, uint height, Percentage biasPercentage, Channels channels)
Parameters
width
uintThe width of the pixel neighborhood.
height
uintThe 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(uint, uint, double)
Local adaptive threshold image. http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm.
public void AdaptiveThreshold(uint width, uint height, double bias)
Parameters
width
uintThe width of the pixel neighborhood.
height
uintThe 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(uint, uint, double, Channels)
Local adaptive threshold image. http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm.
public void AdaptiveThreshold(uint width, uint height, double bias, Channels channels)
Parameters
width
uintThe width of the pixel neighborhood.
height
uintThe 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(uint, uint)
Applies a non-linear, edge-preserving, and noise-reducing smoothing filter.
public void BilateralBlur(uint width, uint height)
Parameters
width
uintThe width of the neighborhood in pixels.
height
uintThe height of the neighborhood in pixels.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
BilateralBlur(uint, uint, double, double)
Applies a non-linear, edge-preserving, and noise-reducing smoothing filter.
public void BilateralBlur(uint width, uint height, double intensitySigma, double spatialSigma)
Parameters
width
uintThe width of the neighborhood in pixels.
height
uintThe 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(uint)
Add a border to the image.
public void Border(uint size)
Parameters
size
uintThe size of the border.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Border(uint, uint)
Add a border to the image.
public void Border(uint width, uint 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, uint)
Chop image (remove horizontal subregion of image).
public void ChopHorizontal(int offset, uint width)
Parameters
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ChopVertical(int, uint)
Chop image (remove horizontal subregion of image).
public void ChopVertical(int offset, uint height)
Parameters
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Clahe(Percentage, Percentage, uint, 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, uint 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
uintThe 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(uint, uint, uint, 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(uint xTiles, uint yTiles, uint numberBins, double clipLimit)
Parameters
xTiles
uintThe number of tile divisions to use in horizontal direction.
yTiles
uintThe number of tile divisions to use in vertical direction.
numberBins
uintThe 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<byte> Clone()
Returns
- IMagickImage<byte>
A clone of the current image.
Clone(IMagickGeometry)
Creates a clone of the current image with the specified geometry.
[Obsolete("This property will be removed in the next major release, use CloneArea instead.")]
public IMagickImage<byte> Clone(IMagickGeometry geometry)
Parameters
geometry
IMagickGeometryThe area to clone.
Returns
- IMagickImage<byte>
A clone of the current image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Clone(int, int, uint, uint)
Creates a clone of the current image.
[Obsolete("This property will be removed in the next major release, use CloneArea instead.")]
public IMagickImage<byte> Clone(int x, int y, uint width, uint height)
Parameters
x
intThe X offset from origin.
y
intThe Y offset from origin.
width
uintThe width of the area to clone.
height
uintThe height of the area to clone.
Returns
- IMagickImage<byte>
A clone of the current image.
Clone(uint, uint)
Creates a clone of the current image.
[Obsolete("This property will be removed in the next major release, use CloneArea instead.")]
public IMagickImage<byte> Clone(uint width, uint height)
Parameters
Returns
- IMagickImage<byte>
A clone of the current image.
CloneAndMutate(Action<IMagickImageCloneMutator<byte>>)
Creates a clone of the current image and executes the action that can be used to mutate the clone. This is more efficient because it prevents an extra copy of the image.
public IMagickImage<byte> CloneAndMutate(Action<IMagickImageCloneMutator<byte>> action)
Parameters
Returns
- IMagickImage<byte>
A clone of the current image.
CloneArea(IMagickGeometry)
Creates a clone of the current image with the specified geometry.
public IMagickImage<byte> CloneArea(IMagickGeometry geometry)
Parameters
geometry
IMagickGeometryThe area to clone.
Returns
- IMagickImage<byte>
A clone of the current image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CloneArea(int, int, uint, uint)
Creates a clone of the current image.
public IMagickImage<byte> CloneArea(int x, int y, uint width, uint height)
Parameters
x
intThe X offset from origin.
y
intThe Y offset from origin.
width
uintThe width of the area to clone.
height
uintThe height of the area to clone.
Returns
- IMagickImage<byte>
A clone of the current image.
CloneArea(uint, uint)
Creates a clone of the current image.
public IMagickImage<byte> CloneArea(uint width, uint height)
Parameters
Returns
- IMagickImage<byte>
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<byte>)
Sets the alpha channel to the specified color.
public void ColorAlpha(IMagickColor<byte> color)
Parameters
color
IMagickColor<byte>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<byte>, IMagickColor<byte>)
Forces all pixels in the color range to white otherwise black.
public void ColorThreshold(IMagickColor<byte> startColor, IMagickColor<byte> stopColor)
Parameters
startColor
IMagickColor<byte>The start color of the color range.
stopColor
IMagickColor<byte>The stop color of the color range.
Colorize(IMagickColor<byte>, Percentage)
Colorize image with the specified color, using specified percent alpha.
public void Colorize(IMagickColor<byte> color, Percentage alpha)
Parameters
color
IMagickColor<byte>The color to use.
alpha
PercentageThe alpha percentage.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Colorize(IMagickColor<byte>, Percentage, Percentage, Percentage)
Colorize image with the specified color, using specified percent alpha for red, green, and blue quantums.
public void Colorize(IMagickColor<byte> color, Percentage alphaRed, Percentage alphaGreen, Percentage alphaBlue)
Parameters
color
IMagickColor<byte>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, Channels, out double)
Returns the distortion based on the specified metric.
public IMagickImage<byte> Compare(IMagickImage image, ErrorMetric metric, Channels channels, out double distortion)
Parameters
image
IMagickImageThe other image to compare with this image.
metric
ErrorMetricThe metric to use.
channels
ChannelsThe channel(s) to compare.
distortion
doubleThe distortion based on the specified metric.
Returns
- IMagickImage<byte>
The image that contains the difference.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Compare(IMagickImage, ErrorMetric, out double)
Returns the distortion based on the specified metric.
public IMagickImage<byte> Compare(IMagickImage image, ErrorMetric metric, out double distortion)
Parameters
image
IMagickImageThe other image to compare with this image.
metric
ErrorMetricThe metric to use.
distortion
doubleThe distortion based on the specified metric.
Returns
- IMagickImage<byte>
The image that contains the difference.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Compare(IMagickImage, ICompareSettings<byte>, Channels, out double)
Returns the distortion based on the specified metric.
public IMagickImage<byte> Compare(IMagickImage image, ICompareSettings<byte> settings, Channels channels, out double distortion)
Parameters
image
IMagickImageThe other image to compare with this image.
settings
ICompareSettings<byte>The settings to use.
channels
ChannelsThe channel(s) to compare.
distortion
doubleThe distortion based on the specified metric.
Returns
- IMagickImage<byte>
The image that contains the difference.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Compare(IMagickImage, ICompareSettings<byte>, out double)
Returns the distortion based on the specified metric.
public IMagickImage<byte> Compare(IMagickImage image, ICompareSettings<byte> settings, out double distortion)
Parameters
image
IMagickImageThe other image to compare with this image.
settings
ICompareSettings<byte>The settings to use.
distortion
doubleThe distortion based on the specified metric.
Returns
- IMagickImage<byte>
The image that contains the difference.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CompareTo(IMagickImage<byte>?)
Compares the current instance with another image. Only the size of the image is compared.
public int CompareTo(IMagickImage<byte>? other)
Parameters
other
IMagickImage<byte>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 IReadOnlyList<IConnectedComponent<byte>> ConnectedComponents(IConnectedComponentsSettings settings)
Parameters
settings
IConnectedComponentsSettingsThe settings for this operation.
Returns
- IReadOnlyList<IConnectedComponent<byte>>
The connected-components of the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ConnectedComponents(uint)
Determines the connected-components of the image.
public IReadOnlyList<IConnectedComponent<byte>> ConnectedComponents(uint connectivity)
Parameters
connectivity
uintHow many neighbors to visit, choose from 4 or 8.
Returns
- IReadOnlyList<IConnectedComponent<byte>>
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). ResetPage() 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). ResetPage() 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(uint, uint)
Crop image (subregion of original image). ResetPage() should be called unless the Page information is needed.
public void Crop(uint width, uint height)
Parameters
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Crop(uint, uint, Gravity)
Crop image (subregion of original image). ResetPage() should be called unless the Page information is needed.
public void Crop(uint width, uint height, Gravity gravity)
Parameters
width
uintThe width of the subregion to crop.
height
uintThe 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 IReadOnlyList<IMagickImage<byte>> CropToTiles(IMagickGeometry geometry)
Parameters
geometry
IMagickGeometryThe dimension of the tiles.
Returns
- IReadOnlyList<IMagickImage<byte>>
New title of the current image.
CropToTiles(uint, uint)
Creates tiles of the current image in the specified dimension.
public IReadOnlyList<IMagickImage<byte>> CropToTiles(uint width, uint height)
Parameters
Returns
- IReadOnlyList<IMagickImage<byte>>
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(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.
DeskewAndCrop(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. After the image is deskewed, it is cropped.
public double DeskewAndCrop(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 uint DetermineBitDepth()
Returns
- uint
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 uint DetermineBitDepth(Channels channels)
Parameters
channels
ChannelsThe channel to get the depth for.
Returns
- uint
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, 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.
Distort(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(IDistortSettings settings, params double[] arguments)
Parameters
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.
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<byte>)
Draw on image using one or more drawables.
public void Draw(IDrawables<byte> drawables)
Parameters
drawables
IDrawables<byte>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<byte>)
Extend the image as defined by the geometry.
public void Extent(IMagickGeometry geometry, Gravity gravity, IMagickColor<byte> backgroundColor)
Parameters
geometry
IMagickGeometryThe geometry to extend the image to.
gravity
GravityThe placement gravity.
backgroundColor
IMagickColor<byte>The background color to use.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Extent(IMagickGeometry, IMagickColor<byte>)
Extend the image as defined by the geometry.
public void Extent(IMagickGeometry geometry, IMagickColor<byte> backgroundColor)
Parameters
geometry
IMagickGeometryThe geometry to extend the image to.
backgroundColor
IMagickColor<byte>The background color to use.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Extent(int, int, uint, uint)
Extend the image as defined by the width and height.
public void Extent(int x, int y, uint width, uint height)
Parameters
x
intThe X offset from origin.
y
intThe Y offset from origin.
width
uintThe width to extend the image to.
height
uintThe height to extend the image to.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Extent(uint, uint)
Extend the image as defined by the width and height.
public void Extent(uint width, uint height)
Parameters
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Extent(uint, uint, Gravity)
Extend the image as defined by the width and height.
public void Extent(uint width, uint height, Gravity gravity)
Parameters
width
uintThe width to extend the image to.
height
uintThe height to extend the image to.
gravity
GravityThe placement gravity.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Extent(uint, uint, Gravity, IMagickColor<byte>)
Extend the image as defined by the width and height.
public void Extent(uint width, uint height, Gravity gravity, IMagickColor<byte> backgroundColor)
Parameters
width
uintThe width to extend the image to.
height
uintThe height to extend the image to.
gravity
GravityThe placement gravity.
backgroundColor
IMagickColor<byte>The background color to use.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Extent(uint, uint, IMagickColor<byte>)
Extend the image as defined by the width and height.
public void Extent(uint width, uint height, IMagickColor<byte> backgroundColor)
Parameters
width
uintThe width to extend the image to.
height
uintThe height to extend the image to.
backgroundColor
IMagickColor<byte>The background color to use.
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<byte>, 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<byte> color, int x, int y)
Parameters
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
FloodFill(IMagickColor<byte>, int, int, IMagickColor<byte>)
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<byte> color, int x, int y, IMagickColor<byte> target)
Parameters
color
IMagickColor<byte>The color to use.
x
intThe X coordinate.
y
intThe Y coordinate.
target
IMagickColor<byte>The target color.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
FloodFill(IMagickImage<byte>, 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<byte> image, int x, int y)
Parameters
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
FloodFill(IMagickImage<byte>, int, int, IMagickColor<byte>)
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<byte> image, int x, int y, IMagickColor<byte> target)
Parameters
image
IMagickImage<byte>The image to use.
x
intThe X coordinate.
y
intThe Y coordinate.
target
IMagickColor<byte>The target color.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
FloodFill(byte, int, int)
Floodfill pixels matching color (within fuzz factor) of target pixel(x,y) with replacement alpha value using method.
public void FloodFill(byte 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(uint, uint)
Frame image with the specified with and height.
public void Frame(uint width, uint height)
Parameters
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Frame(uint, uint, int, int)
Frame image with the specified with, height, innerBevel and outerBevel.
public void Frame(uint width, uint height, int innerBevel, int outerBevel)
Parameters
width
uintThe width of the frame.
height
uintThe 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<byte> FromBase64(string value)
Parameters
value
stringThe base64 string to load the image from.
Returns
- IMagickImage<byte>
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<byte>? GetColormapColor(int index)
Parameters
index
intThe position index.
Returns
- IMagickColor<byte>
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<byte> GetPixels()
Returns
- IPixelCollection<byte>
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<byte> GetPixelsUnsafe()
Returns
- IUnsafePixelCollection<byte>
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<byte>? GetReadMask()
Returns
- IMagickImage<byte>
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<byte>? GetWriteMask()
Returns
- IMagickImage<byte>
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<byte>, uint> Histogram()
Returns
- IReadOnlyDictionary<IMagickColor<byte>, uint>
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(uint, uint, uint)
Identifies lines in the image.
public void HoughLine(uint width, uint height, uint threshold)
Parameters
width
uintThe width of the neighborhood.
height
uintThe height of the neighborhood.
threshold
uintThe 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[], uint, IPixelImportSettings)
Import pixels from the specified byte array into the current image.
public void ImportPixels(byte[] data, uint offset, IPixelImportSettings settings)
Parameters
data
byte[]The byte array to read the image data from.
offset
uintThe 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(ReadOnlySpan<byte>, IPixelImportSettings)
Import pixels from the specified byte array into the current image.
public void ImportPixels(ReadOnlySpan<byte> data, IPixelImportSettings settings)
Parameters
data
ReadOnlySpan<byte>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.
Integral()
Returns the sum of values (pixel values) in the image.
public IMagickImage<byte>? Integral()
Returns
- IMagickImage<byte>
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(uint, uint, PixelInterpolateMethod)
Resize image to specified size using the specified interpolation method.
public void InterpolativeResize(uint width, uint height, PixelInterpolateMethod method)
Parameters
width
uintThe new width.
height
uintThe 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<byte>, 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<byte> color, int x, int y)
Parameters
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
InverseFloodFill(IMagickColor<byte>, int, int, IMagickColor<byte>)
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<byte> color, int x, int y, IMagickColor<byte> target)
Parameters
color
IMagickColor<byte>The color to use.
x
intThe X coordinate.
y
intThe Y coordinate.
target
IMagickColor<byte>The target color.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
InverseFloodFill(IMagickImage<byte>, 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<byte> image, int x, int y)
Parameters
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
InverseFloodFill(IMagickImage<byte>, int, int, IMagickColor<byte>)
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<byte> image, int x, int y, IMagickColor<byte> target)
Parameters
image
IMagickImage<byte>The image to use.
x
intThe X coordinate.
y
intThe Y coordinate.
target
IMagickColor<byte>The target color.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
InverseFloodFill(byte, int, int)
Floodfill pixels not matching color (within fuzz factor) of target pixel(x,y) with replacement alpha value using method.
public void InverseFloodFill(byte 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(byte, byte)
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(byte blackPoint, byte whitePoint)
Parameters
blackPoint
byteThe darkest color in the image. Colors darker are set to zero.
whitePoint
byteThe 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(byte, byte, 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(byte blackPoint, byte whitePoint, Channels channels)
Parameters
blackPoint
byteThe darkest color in the image. Colors darker are set to zero.
whitePoint
byteThe 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(byte, byte, 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(byte blackPoint, byte whitePoint, double gamma)
Parameters
blackPoint
byteThe darkest color in the image. Colors darker are set to zero.
whitePoint
byteThe 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(byte, byte, 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(byte blackPoint, byte whitePoint, double gamma, Channels channels)
Parameters
blackPoint
byteThe darkest color in the image. Colors darker are set to zero.
whitePoint
byteThe 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<byte>, IMagickColor<byte>)
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<byte> blackColor, IMagickColor<byte> whiteColor)
Parameters
blackColor
IMagickColor<byte>The color to map black to/from.
whiteColor
IMagickColor<byte>The color to map white to/from.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
InverseLevelColors(IMagickColor<byte>, IMagickColor<byte>, 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<byte> blackColor, IMagickColor<byte> whiteColor, Channels channels)
Parameters
blackColor
IMagickColor<byte>The color to map black to/from.
whiteColor
IMagickColor<byte>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<byte>, IMagickColor<byte>)
Changes any pixel that does not match the target with the color defined by fill.
public void InverseOpaque(IMagickColor<byte> target, IMagickColor<byte> fill)
Parameters
target
IMagickColor<byte>The color to replace.
fill
IMagickColor<byte>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<byte>)
Add alpha channel to image, setting pixels that don't match the specified color to transparent.
public void InverseTransparent(IMagickColor<byte> color)
Parameters
color
IMagickColor<byte>The color that should not be made transparent.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
InverseTransparentChroma(IMagickColor<byte>, IMagickColor<byte>)
Add alpha channel to image, setting pixels that don't lie in between the given two colors to transparent.
public void InverseTransparentChroma(IMagickColor<byte> colorLow, IMagickColor<byte> colorHigh)
Parameters
colorLow
IMagickColor<byte>The low target color.
colorHigh
IMagickColor<byte>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(byte, byte)
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(byte blackPoint, byte whitePoint)
Parameters
blackPoint
byteThe darkest color in the image. Colors darker are set to zero.
whitePoint
byteThe 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(byte, byte, 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(byte blackPoint, byte whitePoint, Channels channels)
Parameters
blackPoint
byteThe darkest color in the image. Colors darker are set to zero.
whitePoint
byteThe 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(byte, byte, 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(byte blackPoint, byte whitePoint, double gamma)
Parameters
blackPoint
byteThe darkest color in the image. Colors darker are set to zero.
whitePoint
byteThe 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(byte, byte, 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(byte blackPoint, byte whitePoint, double gamma, Channels channels)
Parameters
blackPoint
byteThe darkest color in the image. Colors darker are set to zero.
whitePoint
byteThe 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<byte>, IMagickColor<byte>)
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<byte> blackColor, IMagickColor<byte> whiteColor)
Parameters
blackColor
IMagickColor<byte>The color to map black to/from.
whiteColor
IMagickColor<byte>The color to map white to/from.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
LevelColors(IMagickColor<byte>, IMagickColor<byte>, 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<byte> blackColor, IMagickColor<byte> whiteColor, Channels channels)
Parameters
blackColor
IMagickColor<byte>The color to map black to/from.
whiteColor
IMagickColor<byte>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(uint, uint)
Rescales image with seam carving.
public void LiquidRescale(uint width, uint height)
Parameters
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
LiquidRescale(uint, uint, double, double)
Rescales image with seam carving.
public void LiquidRescale(uint width, uint height, double deltaX, double rigidity)
Parameters
width
uintThe new width.
height
uintThe 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(uint)
Lower image (darken the edges of an image to give a 3-D lowered effect).
public void Lower(uint size)
Parameters
size
uintThe 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.
MeanShift(uint)
Delineate arbitrarily shaped clusters in the image.
public void MeanShift(uint size)
Parameters
size
uintThe width and height of the pixels neighborhood.
MeanShift(uint, Percentage)
Delineate arbitrarily shaped clusters in the image.
public void MeanShift(uint size, Percentage colorDistance)
Parameters
size
uintThe width and height of the pixels neighborhood.
colorDistance
PercentageThe color distance.
MeanShift(uint, uint)
Delineate arbitrarily shaped clusters in the image.
public void MeanShift(uint width, uint height)
Parameters
MeanShift(uint, uint, Percentage)
Delineate arbitrarily shaped clusters in the image.
public void MeanShift(uint width, uint height, Percentage colorDistance)
Parameters
width
uintThe width of the pixels neighborhood.
height
uintThe 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(uint)
Filter image by replacing each pixel component with the median color in a circular neighborhood.
public void MedianFilter(uint radius)
Parameters
radius
uintThe 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.
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<byte>, IMagickColor<byte>)
Changes any pixel that matches target with the color defined by fill.
public void Opaque(IMagickColor<byte> target, IMagickColor<byte> fill)
Parameters
target
IMagickColor<byte>The color to replace.
fill
IMagickColor<byte>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.XyY and ImageMagick.ColorSpace.HSB.
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(ReadOnlySequence<byte>)
Reads only metadata and not the pixel data.
public void Ping(ReadOnlySequence<byte> data)
Parameters
data
ReadOnlySequence<byte>The sequence of bytes to read the information from.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Ping(ReadOnlySequence<byte>, IMagickReadSettings<byte>?)
Reads only metadata and not the pixel data.
public void Ping(ReadOnlySequence<byte> data, IMagickReadSettings<byte>? readSettings)
Parameters
data
ReadOnlySequence<byte>The sequence of bytes to read the information from.
readSettings
IMagickReadSettings<byte>The settings to use when reading the 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<byte>?)
Reads only metadata and not the pixel data.
public void Ping(byte[] data, IMagickReadSettings<byte>? readSettings)
Parameters
data
byte[]The byte array to read the information from.
readSettings
IMagickReadSettings<byte>The settings to use when reading the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Ping(byte[], uint, uint)
Reads only metadata and not the pixel data.
public void Ping(byte[] data, uint offset, uint count)
Parameters
data
byte[]The byte array to read the image data from.
offset
uintThe offset at which to begin reading data.
count
uintThe maximum number of bytes to read.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Ping(byte[], uint, uint, IMagickReadSettings<byte>?)
Reads only metadata and not the pixel data.
public void Ping(byte[] data, uint offset, uint count, IMagickReadSettings<byte>? readSettings)
Parameters
data
byte[]The byte array to read the image data from.
offset
uintThe offset at which to begin reading data.
count
uintThe maximum number of bytes to read.
readSettings
IMagickReadSettings<byte>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<byte>?)
Reads only metadata and not the pixel data.
public void Ping(FileInfo file, IMagickReadSettings<byte>? readSettings)
Parameters
file
FileInfoThe file to read the image from.
readSettings
IMagickReadSettings<byte>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<byte>?)
Reads only metadata and not the pixel data.
public void Ping(Stream stream, IMagickReadSettings<byte>? readSettings)
Parameters
stream
StreamThe stream to read the image data from.
readSettings
IMagickReadSettings<byte>The settings to use when reading the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Ping(ReadOnlySpan<byte>)
Reads only metadata and not the pixel data.
public void Ping(ReadOnlySpan<byte> data)
Parameters
data
ReadOnlySpan<byte>The span of bytes to read the information from.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Ping(ReadOnlySpan<byte>, IMagickReadSettings<byte>?)
Reads only metadata and not the pixel data.
public void Ping(ReadOnlySpan<byte> data, IMagickReadSettings<byte>? readSettings)
Parameters
data
ReadOnlySpan<byte>The span of bytes to read the information from.
readSettings
IMagickReadSettings<byte>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<byte>?)
Reads only metadata and not the pixel data.
public void Ping(string fileName, IMagickReadSettings<byte>? readSettings)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
readSettings
IMagickReadSettings<byte>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(byte, byte)
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(byte low, byte high)
Parameters
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
RandomThreshold(byte, byte, 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(byte low, byte high, Channels channels)
Parameters
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(byte, byte, byte, byte)
Applies soft and hard thresholding.
public void RangeThreshold(byte lowBlack, byte lowWhite, byte highWhite, byte highBlack)
Parameters
lowBlack
byteDefines the minimum black threshold value.
lowWhite
byteDefines the minimum white threshold value.
highWhite
byteDefines the maximum white threshold value.
highBlack
byteDefines the maximum black threshold value.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Read(IMagickColor<byte>, uint, uint)
Read single image frame.
public void Read(IMagickColor<byte> color, uint width, uint height)
Parameters
color
IMagickColor<byte>The color to fill the image with.
width
uintThe width.
height
uintThe height.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Read(ReadOnlySequence<byte>)
Read single image frame.
public void Read(ReadOnlySequence<byte> data)
Parameters
data
ReadOnlySequence<byte>The sequence of bytes to read the information from.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Read(ReadOnlySequence<byte>, IMagickReadSettings<byte>?)
Read single image frame.
public void Read(ReadOnlySequence<byte> data, IMagickReadSettings<byte>? readSettings)
Parameters
data
ReadOnlySequence<byte>The sequence of bytes to read the image data from.
readSettings
IMagickReadSettings<byte>The settings to use when reading the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Read(ReadOnlySequence<byte>, MagickFormat)
Read single image frame.
public void Read(ReadOnlySequence<byte> data, MagickFormat format)
Parameters
data
ReadOnlySequence<byte>The sequence of bytes to read the information from.
format
MagickFormatThe format to use.
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<byte>?)
Read single image frame.
public void Read(byte[] data, IMagickReadSettings<byte>? readSettings)
Parameters
data
byte[]The byte array to read the image data from.
readSettings
IMagickReadSettings<byte>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[], uint, uint)
Read single image frame.
public void Read(byte[] data, uint offset, uint count)
Parameters
data
byte[]The byte array to read the image data from.
offset
uintThe offset at which to begin reading data.
count
uintThe maximum number of bytes to read.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Read(byte[], uint, uint, IMagickReadSettings<byte>?)
Read single image frame.
public void Read(byte[] data, uint offset, uint count, IMagickReadSettings<byte>? readSettings)
Parameters
data
byte[]The byte array to read the image data from.
offset
uintThe offset at which to begin reading data.
count
uintThe maximum number of bytes to read.
readSettings
IMagickReadSettings<byte>The settings to use when reading the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Read(byte[], uint, uint, MagickFormat)
Read single image frame.
public void Read(byte[] data, uint offset, uint count, MagickFormat format)
Parameters
data
byte[]The byte array to read the image data from.
offset
uintThe offset at which to begin reading data.
count
uintThe 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<byte>?)
Read single image frame.
public void Read(FileInfo file, IMagickReadSettings<byte>? readSettings)
Parameters
file
FileInfoThe file to read the image from.
readSettings
IMagickReadSettings<byte>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, uint, uint)
Read single image frame.
public void Read(FileInfo file, uint width, uint 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<byte>?)
Read single image frame.
public void Read(Stream stream, IMagickReadSettings<byte>? readSettings)
Parameters
stream
StreamThe stream to read the image data from.
readSettings
IMagickReadSettings<byte>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(ReadOnlySpan<byte>)
Read single image frame.
public void Read(ReadOnlySpan<byte> data)
Parameters
data
ReadOnlySpan<byte>The span of bytes to read the image data from.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Read(ReadOnlySpan<byte>, IMagickReadSettings<byte>?)
Read single image frame.
public void Read(ReadOnlySpan<byte> data, IMagickReadSettings<byte>? readSettings)
Parameters
data
ReadOnlySpan<byte>The span of bytes to read the image data from.
readSettings
IMagickReadSettings<byte>The settings to use when reading the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Read(ReadOnlySpan<byte>, MagickFormat)
Read single image frame.
public void Read(ReadOnlySpan<byte> data, MagickFormat format)
Parameters
data
ReadOnlySpan<byte>The span of bytes 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<byte>?)
Read single image frame.
public void Read(string fileName, IMagickReadSettings<byte>? readSettings)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
readSettings
IMagickReadSettings<byte>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, uint, uint)
Read single image frame.
public void Read(string fileName, uint width, uint height)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
width
uintThe width.
height
uintThe 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<byte>?)
Read single image frame.
public Task ReadAsync(FileInfo file, IMagickReadSettings<byte>? readSettings)
Parameters
file
FileInfoThe file to read the image from.
readSettings
IMagickReadSettings<byte>The settings to use when reading the image.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ReadAsync(FileInfo, IMagickReadSettings<byte>?, CancellationToken)
Read single image frame.
public Task ReadAsync(FileInfo file, IMagickReadSettings<byte>? readSettings, CancellationToken cancellationToken)
Parameters
file
FileInfoThe file to read the image from.
readSettings
IMagickReadSettings<byte>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<byte>?)
Read single image frame.
public Task ReadAsync(Stream stream, IMagickReadSettings<byte>? readSettings)
Parameters
stream
StreamThe stream to read the image data from.
readSettings
IMagickReadSettings<byte>The settings to use when reading the image.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ReadAsync(Stream, IMagickReadSettings<byte>?, CancellationToken)
Read single image frame.
public Task ReadAsync(Stream stream, IMagickReadSettings<byte>? readSettings, CancellationToken cancellationToken)
Parameters
stream
StreamThe stream to read the image data from.
readSettings
IMagickReadSettings<byte>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<byte>?)
Read single image frame.
public Task ReadAsync(string fileName, IMagickReadSettings<byte>? readSettings)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
readSettings
IMagickReadSettings<byte>The settings to use when reading the image.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ReadAsync(string, IMagickReadSettings<byte>?, CancellationToken)
Read single image frame.
public Task ReadAsync(string fileName, IMagickReadSettings<byte>? readSettings, CancellationToken cancellationToken)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
readSettings
IMagickReadSettings<byte>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<byte>)
Read single image frame from pixel data.
public void ReadPixels(byte[] data, IPixelReadSettings<byte> settings)
Parameters
data
byte[]The byte array to read the image data from.
settings
IPixelReadSettings<byte>The pixel settings to use when reading the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ReadPixels(byte[], uint, uint, IPixelReadSettings<byte>)
Read single image frame from pixel data.
public void ReadPixels(byte[] data, uint offset, uint count, IPixelReadSettings<byte> settings)
Parameters
data
byte[]The byte array to read the image data from.
offset
uintThe offset at which to begin reading data.
count
uintThe maximum number of bytes to read.
settings
IPixelReadSettings<byte>The pixel settings to use when reading the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ReadPixels(FileInfo, IPixelReadSettings<byte>)
Read single image frame from pixel data.
public void ReadPixels(FileInfo file, IPixelReadSettings<byte> settings)
Parameters
file
FileInfoThe file to read the image from.
settings
IPixelReadSettings<byte>The pixel settings to use when reading the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ReadPixels(Stream, IPixelReadSettings<byte>)
Read single image frame from pixel data.
public void ReadPixels(Stream stream, IPixelReadSettings<byte> settings)
Parameters
stream
StreamThe stream to read the image data from.
settings
IPixelReadSettings<byte>The pixel settings to use when reading the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ReadPixels(ReadOnlySpan<byte>, IPixelReadSettings<byte>)
Read single image frame.
public void ReadPixels(ReadOnlySpan<byte> data, IPixelReadSettings<byte> settings)
Parameters
data
ReadOnlySpan<byte>The span of bytes to read the image data from.
settings
IPixelReadSettings<byte>The pixel settings to use when reading the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ReadPixels(string, IPixelReadSettings<byte>)
Read single image frame from pixel data.
public void ReadPixels(string fileName, IPixelReadSettings<byte> settings)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
settings
IPixelReadSettings<byte>The pixel settings to use when reading the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ReadPixelsAsync(FileInfo, IPixelReadSettings<byte>)
Read single image frame from pixel data.
public Task ReadPixelsAsync(FileInfo file, IPixelReadSettings<byte> settings)
Parameters
file
FileInfoThe file to read the image from.
settings
IPixelReadSettings<byte>The pixel settings to use when reading the image.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ReadPixelsAsync(FileInfo, IPixelReadSettings<byte>, CancellationToken)
Read single image frame from pixel data.
public Task ReadPixelsAsync(FileInfo file, IPixelReadSettings<byte> settings, CancellationToken cancellationToken)
Parameters
file
FileInfoThe file to read the image from.
settings
IPixelReadSettings<byte>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<byte>)
Read single image frame from pixel data.
public Task ReadPixelsAsync(Stream stream, IPixelReadSettings<byte> settings)
Parameters
stream
StreamThe stream to read the image data from.
settings
IPixelReadSettings<byte>The pixel settings to use when reading the image.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ReadPixelsAsync(Stream, IPixelReadSettings<byte>, CancellationToken)
Read single image frame from pixel data.
public Task ReadPixelsAsync(Stream stream, IPixelReadSettings<byte> settings, CancellationToken cancellationToken)
Parameters
stream
StreamThe stream to read the image data from.
settings
IPixelReadSettings<byte>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<byte>)
Read single image frame from pixel data.
public Task ReadPixelsAsync(string fileName, IPixelReadSettings<byte> settings)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
settings
IPixelReadSettings<byte>The pixel settings to use when reading the image.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
ReadPixelsAsync(string, IPixelReadSettings<byte>, CancellationToken)
Read single image frame from pixel data.
public Task ReadPixelsAsync(string fileName, IPixelReadSettings<byte> settings, CancellationToken cancellationToken)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
settings
IPixelReadSettings<byte>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(uint)
Reduce noise in image using a noise peak elimination filter.
public void ReduceNoise(uint order)
Parameters
order
uintThe 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.
Remap(IMagickImage)
Remap image colors with closest color from reference image.
public IMagickErrorInfo Remap(IMagickImage image)
Parameters
image
IMagickImageThe image to use.
Returns
- IMagickErrorInfo
The error informaton.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Remap(IMagickImage, IQuantizeSettings)
Remap image colors with closest color from reference image.
public IMagickErrorInfo Remap(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.
Remap(IEnumerable<IMagickColor<byte>>)
Remap image colors with closest color from the specified colors.
public IMagickErrorInfo Remap(IEnumerable<IMagickColor<byte>> colors)
Parameters
colors
IEnumerable<IMagickColor<byte>>The colors to use.
Returns
- IMagickErrorInfo
The error informaton.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Remap(IEnumerable<IMagickColor<byte>>, IQuantizeSettings)
Remap image colors with closest color from the specified colors.
public IMagickErrorInfo Remap(IEnumerable<IMagickColor<byte>> colors, IQuantizeSettings settings)
Parameters
colors
IEnumerable<IMagickColor<byte>>The colors to use.
settings
IQuantizeSettingsQuantize settings.
Returns
- IMagickErrorInfo
The error informaton.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
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.
ResetPage()
Resets the page property of this image.
public void ResetPage()
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(uint, uint)
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(uint width, uint 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(uint, uint)
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(uint width, uint 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(uint, uint)
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(uint width, uint 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 IReadOnlyList<IMagickImage<byte>> Separate()
Returns
- IReadOnlyList<IMagickImage<byte>>
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 IReadOnlyList<IMagickImage<byte>> Separate(Channels channels)
Parameters
channels
ChannelsThe channel(s) to separates.
Returns
- IReadOnlyList<IMagickImage<byte>>
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(uint)
Set the bit depth (bits allocated to red/green/blue components).
public void SetBitDepth(uint value)
Parameters
value
uintThe depth.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
SetBitDepth(uint, Channels)
Set the bit depth (bits allocated to red/green/blue components) of the specified channel.
public void SetBitDepth(uint value, Channels channels)
Parameters
value
uintThe 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<byte>)
Set color at colormap position index.
public void SetColormapColor(int index, IMagickColor<byte> 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<byte>)
Simulate an image shadow.
public void Shadow(IMagickColor<byte> color)
Parameters
color
IMagickColor<byte>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<byte>)
Simulate an image shadow.
public void Shadow(int x, int y, double sigma, Percentage alpha, IMagickColor<byte> color)
Parameters
x
inty
intthe shadow y-offset.
sigma
doubleThe standard deviation of the Gaussian, in pixels.
alpha
PercentageTransparency percentage.
color
IMagickColor<byte>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(uint)
Shave pixels from image edges.
public void Shave(uint size)
Parameters
size
uintThe size of to shave of the image.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Shave(uint, uint)
Shave pixels from image edges.
public void Shave(uint leftRight, uint topBottom)
Parameters
leftRight
uintThe number of pixels to shave left and right.
topBottom
uintThe 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<byte>[])
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<byte>[] args)
Parameters
channels
ChannelsThe channel(s) to use.
method
SparseColorMethodThe sparse color method to use.
args
ISparseColorArg<byte>[]The sparse color arguments.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
SparseColor(Channels, SparseColorMethod, IEnumerable<ISparseColorArg<byte>>)
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<byte>> args)
Parameters
channels
ChannelsThe channel(s) to use.
method
SparseColorMethodThe sparse color method to use.
args
IEnumerable<ISparseColorArg<byte>>The sparse color arguments.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
SparseColor(SparseColorMethod, params ISparseColorArg<byte>[])
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<byte>[] args)
Parameters
method
SparseColorMethodThe sparse color method to use.
args
ISparseColorArg<byte>[]The sparse color arguments.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
SparseColor(SparseColorMethod, IEnumerable<ISparseColorArg<byte>>)
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<byte>> args)
Parameters
method
SparseColorMethodThe sparse color method to use.
args
IEnumerable<ISparseColorArg<byte>>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, uint, uint)
Makes each pixel the min / max / median / mode / etc. of the neighborhood of the specified width and height.
public void Statistic(StatisticType type, uint width, uint height)
Parameters
type
StatisticTypeThe statistic type.
width
uintThe width of the pixel neighborhood.
height
uintThe 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<byte>)
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<byte>? SubImageSearch(IMagickImage<byte> image)
Parameters
image
IMagickImage<byte>The image to search for.
Returns
- IMagickSearchResult<byte>
The result of the search action.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
SubImageSearch(IMagickImage<byte>, 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<byte>? SubImageSearch(IMagickImage<byte> image, ErrorMetric metric)
Parameters
image
IMagickImage<byte>The image to search for.
metric
ErrorMetricThe metric to use.
Returns
- IMagickSearchResult<byte>
The result of the search action.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
SubImageSearch(IMagickImage<byte>, 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<byte>? SubImageSearch(IMagickImage<byte> image, ErrorMetric metric, double similarityThreshold)
Parameters
image
IMagickImage<byte>The image to search for.
metric
ErrorMetricThe metric to use.
similarityThreshold
doubleMinimum distortion for (sub)image match.
Returns
- IMagickSearchResult<byte>
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(uint, uint)
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(uint width, uint 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<byte>)
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<byte> color)
Parameters
opacity
IMagickGeometryAn opacity value used for tinting.
color
IMagickColor<byte>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<byte>)
Add alpha channel to image, setting pixels matching color to transparent.
public void Transparent(IMagickColor<byte> color)
Parameters
color
IMagickColor<byte>The color to make transparent.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
TransparentChroma(IMagickColor<byte>, IMagickColor<byte>)
Add alpha channel to image, setting pixels that lie in between the given two colors to transparent.
public void TransparentChroma(IMagickColor<byte> colorLow, IMagickColor<byte> colorHigh)
Parameters
colorLow
IMagickColor<byte>The low target color.
colorHigh
IMagickColor<byte>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<byte> UniqueColors()
Returns
- IMagickImage<byte>
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(byte)
Removes noise from the image using a wavelet transform.
public void WaveletDenoise(byte threshold)
Parameters
threshold
byteThe threshold for smoothing.
WaveletDenoise(byte, double)
Removes noise from the image using a wavelet transform.
public void WaveletDenoise(byte 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(IBufferWriter<byte>)
Writes the image to the specified file.
public void Write(IBufferWriter<byte> bufferWriter)
Parameters
bufferWriter
IBufferWriter<byte>The buffer writer to write the image to.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Write(IBufferWriter<byte>, IWriteDefines)
Writes the image to the specified file.
public void Write(IBufferWriter<byte> bufferWriter, IWriteDefines defines)
Parameters
bufferWriter
IBufferWriter<byte>The buffer writer to write the image to.
defines
IWriteDefinesThe defines to set.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Write(IBufferWriter<byte>, MagickFormat)
Writes the image to the specified file.
public void Write(IBufferWriter<byte> bufferWriter, MagickFormat format)
Parameters
bufferWriter
IBufferWriter<byte>The buffer writer to write the image to.
format
MagickFormatThe format to use.
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.