Saving a Bitmap to a File

Use one of the following methods to save the bitmap in a file:

Save method

SaveWithStamp method

If you are saving a progressive JPEG or CMP file, set the following property to specify the number of passes in the file:

ProgressivePasses property

If you are saving a GIF file, set the following property to specify whether it is saved as an interlaced file:

SaveInterlaced property

If you are saving an animated GIF file, information specified in the animation playback properties is saved in the file. For details, refer to the description of the Save method.

When saving a TIFF 1-bit image, you can save it least significant bit first or most significant bit first by setting the SaveLSB property.

TIF files can be saved in strips or they may be saved in tiles. The SaveTileWidth property determines whether a TIF files will be saved in strips or tiles. If it is set to 0, TIF files will be saved in strips. If the SaveTileWidth property is greater than the bitmap width, the TIF file will be saved in strips. If the SaveTileWidth property is less than the bitmap width, the TIF file will be saved in tiles and the SaveTileHeight property will determine the height of the tiles.

When saving a page to a multipage file, the new page either replaces an existing page or is inserted before an existing page. Set the following property to determine which page to replace, or where to insert the new page.

SavePage property

The SaveOffset method saves a bitmap to a file, starting at a specified offset. This enables you to embed an image file in another file. After calling the SaveOffset method, the FileSizeWritten property is updated with the length of the file written, in bytes.

When saving RAW uncompressed data, the SavePad4 property can be used to determine whether or not to pad each line so the length is a multiple of four bytes. For more information on saving RAW uncompressed data, refer to Working with the RAW File Filter.

For FlashPix files, additional considerations are described in Implementing PhotoCD and FlashPix Features.

Please note that the Mixed Raster Content functionality (Document/Medical) has been removed from this help file and is presented in the new LEADTOOLS Mixed Raster Content VCL object help file for the LEADMrc Control. For information on the new version 14 of the LEADTOOLS Mixed Raster Content VCL object, refer to the LEADTOOLS Mixed Raster Content VCL Object Help File.

When saving JBIG2 file, you can use the following properties to get or change the values for the control options used by LEADTOOLS:

JBIG2Flags property

JBIG2ImageFlags property

JBIG2ImageGBATX1 property

JBIG2ImageGBATX2 property

JBIG2ImageGBATX3 property

JBIG2ImageGBATX4 property

JBIG2ImageGBATY1 property

JBIG2ImageGBATY2 property

JBIG2ImageGBATY3 property

JBIG2ImageGBATY4 property

JBIG2ImageQFactor property

JBIG2ImageTemplateType property

JBIG2TextDifThreshold property

JBIG2TextFlags property

JBIG2TextGBATX1 property

JBIG2TextGBATX2 property

JBIG2TextGBATX3 property

JBIG2TextGBATX4 property

JBIG2TextGBATY1 property

JBIG2TextGBATY2 property

JBIG2TextGBATY3 property

JBIG2TextGBATY4 property

JBIG2TextMaxSymArea property

JBIG2TextMaxSymHeight property

JBIG2TextMaxSymWidth property

JBIG2TextMinSymArea property

JBIG2TextMinSymHeight property

JBIG2TextMinSymWidth property

JBIG2TextQFactor property

JBIG2TextTemplateType property

JBIG2XResolution property

JBIG2YResolution property

JTIF images (FILE_TIF_JPEG, FILE_TIF_JPEG_422, or FILE_TIF_JPEG_411) enables writing JTIF files style when saving. To enable writing old JTIF files style when saving JTIF images, set the SaveOldJTIF property value to TRUE before calling the Save method. The TIFF files will be saved with Compression Tag set to 6. Also, the JTIF files will save the Q, AC and DC tables in TIFF markers.

To disable writing old JTIF files style when saving JTIF images, set the SaveOldJTIF property value to FALSE before calling the Save method. The TIFF files will be saved with Compression Tag set to 7. Also, the JTIF files will save the Q, AC and DC tables inside the embedded JPEG stream.