Parameters
- Specifies the type of image format to save the image. This is a Newtone.ImageKit.SaveFileType value.
Return Value
Returns True if successful. Returns False if unsuccessful.
Explanation
This method saves the image as raw data. The image set in the Image parameter is saved into the RawData property.
When the Image parameter contains a valid image handle
The image set in the Image parameter will be saved in the location specified by the Url property.
Although there are some differences between saving an image to file and saving an image to raw data, essentially the process is the same as in the SaveImageToFile method. With certain raster image formats, it is only possible to save images of a particular bitcount. Errors can be generated if an image of an unsupported bitcount is saved in an particular image format. A good example of this is trying to save a 1 bit black and white image in JPEG format. (JPEG only supports 8 bit grayscale and 24 bit color.)
Below is a list of supported bitcounts for each type of
raster image.
Image File Format: Supported bitcounts when saving image
BMP(Uncompressed): 1, 4, 8, 16, 24,3 2 (Does not include 16 bit
grayscale)
JPEG(Standard DCT): 8 bit grayscale, 24 (All images will be saved
as 24 bit color)
GIF: 1, 4, 8
TIFF(Uncompressed): 1, 4, 8, 16, 24, 32 (Does not include 16 bit
grayscale)
TIFF(GROUP3-1D): 1
TIFF(GROUP4): 1
TIFF(PACKBITS): 1, 4, 8, 16, 24, 32 (Does not include 16 bit
grayscale)
TIFF(LZW): 1, 4, 8, 16, 24, 32 (Does not include 16 bit
grayscale)
TIFF(JPEG): 1, 4, 8, 16, 24, 32 (Does not include 16 bit grayscale)
(All images will be saved as 24 bit color)
PNG: 1, 4, 8, 24
TIFF(Uncompressed) 16 bit, TIFF(PACKBITS) 16 bit, TIFF(LZW) 16 bit
will be saved in 24 bit.
WMF and EMF images cannot ordinarily be loaded and displayed in
.NET but rather are converted to raster images when displayed.
For that reason, even though the file extension is .emf or .wmf,
the images can only be saved as raster images.
See Also
ImageKit.WPF.Web.ImageKit Members | Newtone.ImageKit.WPF.Web.ImageKit