Class ImageDataFactory
public sealed class ImageDataFactory
- Inheritance
-
ImageDataFactory
- Inherited Members
Methods
Create(byte[])
Create an ImageData instance representing the image from the image bytes.
public static ImageData Create(byte[] bytes)
Parameters
bytes
byte[]byte representation of the image.
Returns
- ImageData
The created ImageData object.
Create(byte[], bool)
Create an ImageData instance representing the image from the image bytes.
public static ImageData Create(byte[] bytes, bool recoverImage)
Parameters
bytes
byte[]byte representation of the image.
recoverImage
boolwhether to recover from a image error (for TIFF-images)
Returns
- ImageData
The created ImageData object.
Create(int, int, bool, int, int, byte[], int[])
Create an ImageData instance from the passed parameters.
public static ImageData Create(int width, int height, bool reverseBits, int typeCCITT, int parameters, byte[] data, int[] transparency)
Parameters
width
intwidth of the image in pixels
height
intheight of the image in pixels
reverseBits
boolwhether to reverse the bits stored in data (TIFF images).
typeCCITT
intType of CCITT encoding
parameters
intcolour space parameters
data
byte[]array containing raw image data
transparency
int[]array containing transparency information
Returns
- ImageData
created ImageData object.
Create(int, int, int, int, byte[], int[])
Create an ImageData instance from the passed parameters.
public static ImageData Create(int width, int height, int components, int bpc, byte[] data, int[] transparency)
Parameters
width
intwidth of the image in pixels
height
intheight of the image in pixels
components
intcolour space components
bpc
intbits per colour.
data
byte[]array containing raw image data
transparency
int[]array containing transparency information
Returns
- ImageData
created ImageData object.
Create(string)
Create an ImageData instance representing the image from the specified file.
public static ImageData Create(string filename)
Parameters
filename
stringfilename of the file containing the image
Returns
- ImageData
The created ImageData object.
Create(string, bool)
Create an ImageData instance representing the image from the specified file.
public static ImageData Create(string filename, bool recoverImage)
Parameters
filename
stringfilename of the file containing the image
recoverImage
boolwhether to recover from a image error (for TIFF-images)
Returns
- ImageData
The created ImageData object.
Create(Uri)
Create an ImageData instance representing the image from the file located at the specified url.
public static ImageData Create(Uri url)
Parameters
url
Urilocation of the image
Returns
- ImageData
The created ImageData object.
Create(Uri, bool)
Create an ImageData instance representing the image from the file located at the specified url.
public static ImageData Create(Uri url, bool recoverImage)
Parameters
url
Urilocation of the image
recoverImage
boolwhether to recover from a image error (for TIFF-images)
Returns
- ImageData
The created ImageData object.
CreateBmp(byte[], bool)
Get a bitmap ImageData instance from the provided bytes.
public static ImageData CreateBmp(byte[] bytes, bool noHeader)
Parameters
Returns
- ImageData
created ImageData
CreateBmp(Uri, bool)
Get a bitmap ImageData instance from the specified url.
public static ImageData CreateBmp(Uri url, bool noHeader)
Parameters
url
Urilocation of the image.
noHeader
boolWhether the image contains a header.
Returns
- ImageData
created ImageData
CreateGif(byte[])
Return a GifImage object.
public static GifImageData CreateGif(byte[] bytes)
Parameters
bytes
byte[]array containing the raw image data
Returns
- GifImageData
GifImageData instance.
Remarks
Return a GifImage object. This object cannot be added to a document
CreateGifFrame(byte[], int)
Returns a specified frame of the gif image
public static ImageData CreateGifFrame(byte[] bytes, int frame)
Parameters
Returns
- ImageData
GifImageData instance
CreateGifFrame(Uri, int)
Returns a specified frame of the gif image
public static ImageData CreateGifFrame(Uri url, int frame)
Parameters
url
Uriurl of gif image
frame
intnumber of frame to be returned, 1-based
Returns
- ImageData
GifImageData instance.
CreateGifFrames(byte[])
Returns List
of gif image frames
public static IList<ImageData> CreateGifFrames(byte[] bytes)
Parameters
bytes
byte[]byte array of gif image
Returns
CreateGifFrames(byte[], int[])
Returns List
of gif image frames
public static IList<ImageData> CreateGifFrames(byte[] bytes, int[] frameNumbers)
Parameters
bytes
byte[]byte array of gif image
frameNumbers
int[]array of frame numbers of gif image, 1-based
Returns
CreateGifFrames(Uri)
Returns List
of gif image frames
public static IList<ImageData> CreateGifFrames(Uri url)
Parameters
url
Uriurl of gif image
Returns
CreateGifFrames(Uri, int[])
Returns List
of gif image frames
public static IList<ImageData> CreateGifFrames(Uri url, int[] frameNumbers)
Parameters
url
Uriurl of gif image
frameNumbers
int[]array of frame numbers of gif image, 1-based
Returns
CreateJbig2(byte[], int)
public static ImageData CreateJbig2(byte[] bytes, int page)
Parameters
Returns
CreateJbig2(Uri, int)
public static ImageData CreateJbig2(Uri url, int page)
Parameters
url
Uripage
int
Returns
CreateJpeg(byte[])
public static ImageData CreateJpeg(byte[] bytes)
Parameters
bytes
byte[]
Returns
CreateJpeg(Uri)
Create an ImageData instance from a Jpeg image url
public static ImageData CreateJpeg(Uri url)
Parameters
url
UriURL
Returns
- ImageData
the created JPEG image
CreateJpeg2000(byte[])
public static ImageData CreateJpeg2000(byte[] bytes)
Parameters
bytes
byte[]
Returns
CreateJpeg2000(Uri)
public static ImageData CreateJpeg2000(Uri url)
Parameters
url
Uri
Returns
CreatePng(byte[])
public static ImageData CreatePng(byte[] bytes)
Parameters
bytes
byte[]
Returns
CreatePng(Uri)
public static ImageData CreatePng(Uri url)
Parameters
url
Uri
Returns
CreateRawImage(byte[])
public static ImageData CreateRawImage(byte[] bytes)
Parameters
bytes
byte[]
Returns
CreateTiff(byte[], bool, int, bool)
public static ImageData CreateTiff(byte[] bytes, bool recoverFromImageError, int page, bool direct)
Parameters
Returns
CreateTiff(Uri, bool, int, bool)
public static ImageData CreateTiff(Uri url, bool recoverFromImageError, int page, bool direct)
Parameters
Returns
IsSupportedType(byte[])
Checks if the type of image (based on first 8 bytes) is supported by factory.
public static bool IsSupportedType(byte[] source)
Parameters
source
byte[]image raw bytes
Returns
Remarks
Checks if the type of image (based on first 8 bytes) is supported by factory.
Note: if this method returns
true
it doesn't means that
Create(byte[])
won't throw exception
IsSupportedType(Uri)
Checks if the type of image (based on first 8 bytes) is supported by factory.
public static bool IsSupportedType(Uri source)
Parameters
source
Uriimage URL
Returns
Remarks
Checks if the type of image (based on first 8 bytes) is supported by factory.
Note: if this method returns
true
it doesn't means that
Create(byte[])
won't throw exception
IsSupportedType(ImageType)
Checks if the type of image is supported by factory.
public static bool IsSupportedType(ImageType imageType)
Parameters
imageType
ImageTypeimage type
Returns
Remarks
Checks if the type of image is supported by factory.
Note: if this method returns
true
it doesn't means that
Create(byte[])
won't throw exception