The image is saved as raw data.
[Visual Basic] Public Function SaveImageToRawData(Val As Newtone.ImageKit.SaveFileType, Image As Image) As Boolean
[C#] public bool SaveImageToRawData(Newtone.ImageKit.SaveFileType Val, Image Image) ;

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.


Below is a list of other properties that should be set when saving files in the these formats...

FPX The Comment property should be set. If the Val parameter is SaveFPXJpeg then the JpegQuality property should also be set.
GIF The Comment  property should be set.
JPEG The Comment, JpegQuality, and JpegSubsamp properties should be set.
JPEG Progress The Comment, JpegQuality, and JpegSubsamp properties should be set.
JPEG2000 The Comment, JPEG2000CodeBlockHeight, JPEG2000CodeBlockWidth, JPEG2000NumResLevel, JPEG2000PrecinctHeight, JPEG2000PrecinctWidth, JPEG2000Reversible, JPEG2000Size, JPEG2000TileHeight, and JPEG2000TileWidth properties should be set.
PNG The Comment property should be set.
TIFF To manipulate multipage tiff files, use one of the following methods: AppendTiffImage, DeletePageFromMultipageTiff, or InsertPageIntoMultipageTiff

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,32 (Does not include 16 bit grayscale)
BMP(Compressed): 4,8
JPEG(Standard DCT): 8 bit grayscale, 24 (Without the ImageKit.NET3 Win32 Plugin files, images of other bitcounts can be saved but they will be saved as 24 bit color)
JPEG(Progressive DCT): 8 bit grayscale,24
GIF: 1,4,8 (these will be saved in 8 bit)
TIFF(Uncompressed): 1,4,8,16,24,32 (Does not include 16 bit grayscale)
TIFF(GROUP3-1D): 1
TIFF(GROUP4): 1
TIFF(PACKBITS): 1
TIFF(LZW): 1, 4, 8, 16, 24, 32 (Does not include 16 bit grayscale)
PNG: 1, 4, 8, 24
FPX(Uncompressed): 8 bit grayscale, 24
FPX(Single Color Compressed): 8 bit grayscale, 24
FPX(JPEG Compression): 8 bit grayscale, 24
JPEG2000(Part1): 8 bit grayscale, 24
JPEG2000(Code Stream): 8 bit grayscale, 24

Note: The following image formats require the ImageKit.NET3 Plugin dll files in order to be saved: BMP(Compressed), JpegProgress, JPEG2000, FPX.

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 Members | Newtone.ImageKit.Web.ImageKit

 

The ImageKit.NET3 is created by Newtone Corporation