Class MagickImageFactory
- Namespace
- ImageMagick
- Assembly
- Magick.NET-Q16-AnyCPU.dll
Class that can be used to create ImageMagick.IMagickImage<> instances.
public sealed class MagickImageFactory : IMagickImageFactory<ushort>
- Inheritance
-
MagickImageFactory
- Implements
-
IMagickImageFactory<ushort>
- Inherited Members
Constructors
MagickImageFactory()
public MagickImageFactory()
Methods
Create()
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public IMagickImage<ushort> Create()
Returns
- IMagickImage<ushort>
A new ImageMagick.IMagickImage<> instance.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Create(IMagickColor<ushort>, int, int)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public IMagickImage<ushort> Create(IMagickColor<ushort> color, int width, int height)
Parameters
color
IMagickColor<ushort>The color to fill the image with.
width
intThe width.
height
intThe height.
Returns
- IMagickImage<ushort>
A new ImageMagick.IMagickImage<> instance.
Create(byte[])
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public IMagickImage<ushort> Create(byte[] data)
Parameters
data
byte[]The byte array to read the image data from.
Returns
- IMagickImage<ushort>
A new ImageMagick.IMagickImage<> instance.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Create(byte[], IMagickReadSettings<ushort>)
Initializes a new instance of the ImageMagick.IMagickImage<> class.
public IMagickImage<ushort> Create(byte[] data, IMagickReadSettings<ushort> readSettings)
Parameters
data
byte[]The byte array to read the image data from.
readSettings
IMagickReadSettings<ushort>The settings to use when reading the image.
Returns
- IMagickImage<ushort>
A new ImageMagick.IMagickImage<> instance.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Create(byte[], int, int)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public IMagickImage<ushort> Create(byte[] data, int offset, int count)
Parameters
data
byte[]The byte array to read the image data from.
offset
intThe offset at which to begin reading data.
count
intThe maximum number of bytes to read.
Returns
- IMagickImage<ushort>
A new ImageMagick.IMagickImage<> instance.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Create(byte[], int, int, IMagickReadSettings<ushort>)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public IMagickImage<ushort> Create(byte[] data, int offset, int count, IMagickReadSettings<ushort> readSettings)
Parameters
data
byte[]The byte array to read the image data from.
offset
intThe offset at which to begin reading data.
count
intThe maximum number of bytes to read.
readSettings
IMagickReadSettings<ushort>The settings to use when reading the image.
Returns
- IMagickImage<ushort>
A new ImageMagick.IMagickImage<> instance.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Create(FileInfo)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public IMagickImage<ushort> Create(FileInfo file)
Parameters
file
FileInfoThe file to read the image from.
Returns
- IMagickImage<ushort>
A new MagickImage instance.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Create(FileInfo, IMagickReadSettings<ushort>)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public IMagickImage<ushort> Create(FileInfo file, IMagickReadSettings<ushort> readSettings)
Parameters
file
FileInfoThe file to read the image from.
readSettings
IMagickReadSettings<ushort>The settings to use when reading the image.
Returns
- IMagickImage<ushort>
A new ImageMagick.IMagickImage<> instance.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Create(Stream)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public IMagickImage<ushort> Create(Stream stream)
Parameters
stream
StreamThe stream to read the image data from.
Returns
- IMagickImage<ushort>
A new ImageMagick.IMagickImage<> instance.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Create(Stream, IMagickReadSettings<ushort>)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public IMagickImage<ushort> Create(Stream stream, IMagickReadSettings<ushort> readSettings)
Parameters
stream
StreamThe stream to read the image data from.
readSettings
IMagickReadSettings<ushort>The settings to use when reading the image.
Returns
- IMagickImage<ushort>
A new ImageMagick.IMagickImage<> instance.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Create(string)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public IMagickImage<ushort> Create(string fileName)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
Returns
- IMagickImage<ushort>
A new ImageMagick.IMagickImage<> instance.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Create(string, IMagickReadSettings<ushort>)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public IMagickImage<ushort> Create(string fileName, IMagickReadSettings<ushort> readSettings)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
readSettings
IMagickReadSettings<ushort>The settings to use when reading the image.
Returns
- IMagickImage<ushort>
A new ImageMagick.IMagickImage<> instance.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
Create(string, int, int)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public IMagickImage<ushort> Create(string fileName, int width, int height)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
width
intThe width.
height
intThe height.
Returns
- IMagickImage<ushort>
A new ImageMagick.IMagickImage<> instance.
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CreateAsync(FileInfo)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(FileInfo file)
Parameters
file
FileInfoThe file to read the image from.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CreateAsync(FileInfo, IMagickReadSettings<ushort>)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(FileInfo file, IMagickReadSettings<ushort> readSettings)
Parameters
file
FileInfoThe file to read the image from.
readSettings
IMagickReadSettings<ushort>The settings to use when reading the image.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CreateAsync(FileInfo, IMagickReadSettings<ushort>, CancellationToken)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(FileInfo file, IMagickReadSettings<ushort> readSettings, CancellationToken cancellationToken)
Parameters
file
FileInfoThe file to read the image from.
readSettings
IMagickReadSettings<ushort>The settings to use when reading the image.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CreateAsync(FileInfo, IPixelReadSettings<ushort>)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(FileInfo file, IPixelReadSettings<ushort> settings)
Parameters
file
FileInfoThe file to read the image from.
settings
IPixelReadSettings<ushort>The pixel settings to use when reading the image.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CreateAsync(FileInfo, IPixelReadSettings<ushort>, CancellationToken)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(FileInfo file, IPixelReadSettings<ushort> settings, CancellationToken cancellationToken)
Parameters
file
FileInfoThe file to read the image from.
settings
IPixelReadSettings<ushort>The pixel settings to use when reading the image.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CreateAsync(FileInfo, CancellationToken)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(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.
CreateAsync(Stream)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(Stream stream)
Parameters
stream
StreamThe stream to read the image data from.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CreateAsync(Stream, IMagickReadSettings<ushort>)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(Stream stream, IMagickReadSettings<ushort> readSettings)
Parameters
stream
StreamThe stream to read the image data from.
readSettings
IMagickReadSettings<ushort>The settings to use when reading the image.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CreateAsync(Stream, IMagickReadSettings<ushort>, CancellationToken)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(Stream stream, IMagickReadSettings<ushort> readSettings, CancellationToken cancellationToken)
Parameters
stream
StreamThe stream to read the image data from.
readSettings
IMagickReadSettings<ushort>The settings to use when reading the image.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CreateAsync(Stream, IPixelReadSettings<ushort>)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(Stream stream, IPixelReadSettings<ushort> settings)
Parameters
stream
StreamThe stream to read the image data from.
settings
IPixelReadSettings<ushort>The pixel settings to use when reading the image.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CreateAsync(Stream, IPixelReadSettings<ushort>, CancellationToken)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(Stream stream, IPixelReadSettings<ushort> settings, CancellationToken cancellationToken)
Parameters
stream
StreamThe stream to read the image data from.
settings
IPixelReadSettings<ushort>The pixel settings to use when reading the image.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CreateAsync(Stream, CancellationToken)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(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.
CreateAsync(string)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(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.
CreateAsync(string, IMagickReadSettings<ushort>)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(string fileName, IMagickReadSettings<ushort> readSettings)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
readSettings
IMagickReadSettings<ushort>The settings to use when reading the image.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CreateAsync(string, IMagickReadSettings<ushort>, CancellationToken)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(string fileName, IMagickReadSettings<ushort> readSettings, CancellationToken cancellationToken)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
readSettings
IMagickReadSettings<ushort>The settings to use when reading the image.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CreateAsync(string, IPixelReadSettings<ushort>)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(string fileName, IPixelReadSettings<ushort> settings)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
settings
IPixelReadSettings<ushort>The pixel settings to use when reading the image.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CreateAsync(string, IPixelReadSettings<ushort>, CancellationToken)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(string fileName, IPixelReadSettings<ushort> settings, CancellationToken cancellationToken)
Parameters
fileName
stringThe fully qualified name of the image file, or the relative image file name.
settings
IPixelReadSettings<ushort>The pixel settings to use when reading the image.
cancellationToken
CancellationTokenThe token to monitor for cancellation requests.
Returns
Exceptions
- ImageMagick.MagickException
Thrown when an error is raised by ImageMagick.
CreateAsync(string, CancellationToken)
Initializes a new instance that implements ImageMagick.IMagickImage<>.
public Task<IMagickImage<ushort>> CreateAsync(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.