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