Saving a Bitmap to a File
Use one of the following methods to save the bitmap in a file:
If you are saving a progressive JPEG or CMP file, set the following property to specify the number of passes in the file:
If you are saving a GIF file, set the following property to specify whether it is saved as an interlaced file:
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.
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:
JBIG2ImageTemplateType property
JBIG2TextDifThreshold property
JBIG2TextMaxSymHeight property
JBIG2TextMinSymHeight property
JBIG2TextTemplateType 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.