SaveWithStamp method (ILEADRasterIO)

Visual Basic example

Visual C++ 5.0 example

Delphi 4 example

C++ Builder example

 

Syntax

short SaveWithStamp (ILEADRaster* pRaster, BSTR pszName, RasterFileConstants Format, short iBitsPerPixel, QFactorConstants Quality, float fStampWidth, float fStampHeight, short iStampBits);

Overview

Refer to Saving a Bitmap to a File.

Remarks

Saves the specified bitmap to create a JPEG or LEAD CMP output file that includes a thumbnail (stamp) image.

Neither the width nor the height of the stamp can exceed 255 pixels. In addition, the following overall size limitations apply:

image\sqrblit.gif If you save an 8-bit stamp, the following calculation cannot exceed 65,535: (width * height) + 778.

image\sqrblit.gif If you save a 24-bit stamp, the following calculation cannot exceed 65,535: (width * height * 3) + 10.

The method will return an error (ERROR_INV_RANGE) if you exceed any of these size limitations. Because the limitations are in pixels, it is best to work with the ScaleMode property set to pixels.

If you are working with compressed (JPEG) Exif files, the stamp size has been restricted to 160x120x24. When you call SaveWithStamp method and specify that you want to save a compressed Exif file, the StampWidth, StampHeight and StampBits parameters are ignored. They are assumed to be 160 (StampWidth), 120 (StampHeight) and 24 (StampBits). That limitation has been imposed in order to conform with the ExifR98 interoperability rules imposed by japanese digital camera manufacturers.

If you are working with uncompressed (TIFF) Exif files, the stamp size is (width x height x 24 bpp), with no limitations on width and height.

The stamp image can be retrieved by calling the LoadStamp method.

See Also

Elements:

LoadStamp method, SaveTileHeight property, SaveTileWidth property

Topics:

Raster Images: Saving Files

 

Raster Images: Loading and Saving Stamp Images