L_WriteFileStamp

#include "l_bitmap.h"

L_INT EXT_FUNCTION L_WriteFileStamp(pszFile, pBitmap, pSaveOptions)

L_TCHAR, L_FAR * pszFile;

/* file name*/

pBITMAPHANDLE pBitmap;

/* pointer to the target bitmap handle */

pSAVEFILEOPTION pSaveOptions;

/* pointer to optional extended save options */

Writes a stamp in an existing FlashPix file.

Parameter

Description

pszFile

Character string containing the FlashPix file name.

pBitmap

Pointer to the bitmap handle referencing the bitmap that will contain the thumbnail image.

pSaveOptions

Pointer to optional extended save options. Pass NULL to use the default save options.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The stamp will be written to the page designated in the SAVEFILEOPTION structure. If that page already has a stamp, it will be overwritten; if the page does not exist, the stamp will be written to the last page present in the file. If the file to which the stamp is being written does not exist, an error will be returned.

This function works for regular JPEG files and Exif JPEG files. For regular JPEG files, the stamp saved is always uncompressed and can be 8 or 24 bits per pixel. The stamp can be any width and height, but the stamp data and stamp header must completely fit in an APP0 marker. Therefore, the size must be less than 64k bytes (0xFFFF).

For Exif JPEG files, the stamps can be uncompressed or JPEG compressed and must be 24 bits per pixel. Exif JPEG stamps are supposed to be 160 x 120. However, LEADTOOLS can save and read Exif JPEG stamps of other dimensions. The stamp, along with other information such as the TIFF_HEADER, 0th IFD, 1st IFD, etc. must completely fit in an APP1 marker. Therefore, the size must be less than 64k bytes (0xFFFF).

Required DLLs and Libraries

LTFIL
File format DLLs

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Windows 95 / 98 / Me, Windows 2000 / XP, Windows CE.

See Also

Functions:

L_GetExtFileOption,

 

L_SetExtFileOption,

 

L_ReadFileStamp,

 

L_GetCompressFileStamp

 

L_CompressBitmapWithStamp

Topics:

Raster Image Functions: Saving Files,

 

Raster Image Functions: Loading and Saving Stamp Images,

 

Loading and Saving Images

 

For a list of functions that utilize the LOADFILEOPTION or SAVEFILEOPTION structures, refer to Functions Utilizing the LOADFILEOPTION or SAVEFILEOPTION structures.

Example

Puts a stamp, in an existing FlashPix file "TEST2.FPX".

BITMAPHANDLE StampBitmap;
L_WriteFileStamp
(TEXT("TEST2.FPX"), &StampBitmap, NULL);