Save method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

int Save (System::AnsiString fileName, int iFormat, int iBitsPerPixel, int iQuality, int iModify);

Delphi Syntax

Save (fileName:String; iFormat, iBitsPerPixel, iQuality, iModify: Integer): Integer;

Overview

Refer to Saving a Bitmap to a File.

Remarks

Saves the bitmap to a file in any of the supported compressed or uncompressed formats.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits .

If the bitmap is 8 bits per pixel or greater, use the LEAD CMP format or one of the JPEG (JTIF or JFIF) formats to save disk space. You can set the ProgressivePasses property if you want to save a CMP or JFIF file as a progressive file.

If the bitmap is 1-bit per pixel, use the LEAD 1-bit format or a CCITT Group 3 or 4 format to save disk space.

For CCITT Group 3 and 4 formats, the first RGBQUAD structure in the bitmap's palette determines the white component of the image. If the rgbRed field is 0, then all 0 bits in the image are assumed to be black. Otherwise, all zero (0) bits in the image are assumed white.

If you save an animated GIF file, all bitmaps in the bitmap list are saved. Also, the following properties update global fields in the file:

AnimationPalette property

AnimationBackColor property

AnimationHeight property

AnimationWidth property

AnimationLoop property

This method supports signed data images, but only DICOM and TIFF formats support signed data. This method will return an error code if you attempt to save a signed image to a format other than DICOM or TIFF.

If the bitmap has a region, the region stored in the bitmap will be saved, if the image is saved as one of the TIFF file formats.

See Also

Elements:

SaveWithStamp method, SaveMemory method

Topics:

Raster Images: Saving Files

 

Raster Images: Creating and Maintaining Lists of Images