The FlashPix file format was developed through the combined efforts of Eastman Kodak Company, Microsoft Corporation, Hewlett-Packard Company and Live Picture, Inc. It combines the best features of existing image formats with the benefits associated with object orientation to make using digital color images easier.
The format of a FlashPix file is based on compound object storage, which allows storage of various kinds of data. A FlashPix file may consist of several "pages" where each "page" has storage for a source image, non-image data in the form of comments, transform data, and a stamp or thumbnail. Each image is stored as an entire multi-resolution hierarchy where each resolution in the hierarchy differs from the next highest resolution by a factor of 2 in the x dimension and in the y dimension. LEADTOOLS treats the non-image data stored in FlashPix files as comments. Comments are used to store information pertaining to the image, not actual pixel data. This information may include image title, image subject, camera manufacturer, scan software version number, and so forth. In addition to the image itself, FlashPix files store transform information, such as rotation, shearing, and color manipulation, among others. This data indicates transformations which may be performed on the source image. By storing the transforms, the source image stays in its original state and is transformed, using the stored transforms, at your discretion, only when the file is loaded. A stamp, or thumbnail, provides a small bitmap representation of a FlashPix image. By default, LEADTOOLS saves a stamp of size 96 x 96. This is the largest stamp allowed, even if the user sets larger dimensions.
The FlashPix extended support extends the input/output functionality in LEADTOOLS by providing increased versatility in the handling of color and grayscale images by taking advantage of the complete FlashPix file structure. FlashPix is a newly emerging file format sponsored by Kodak, Microsoft, Hewlett-Packard, and many other industry leaders. LEAD has been asked by this industry group to add the format to LEADTOOLS, and to join the group in supporting this new image format technology. Features of the extended support include "Working with non-image data" and "Working with thumbnail images in a FlashPix file" and are discussed in more detail below.
For more information about required files, refer to Files To Be Included With Your Application.
Further details of the new extended FlashPix features are given below:
Working with non-image data
LEADTOOLS treats non-image data as comments. These comments store a variety of information concerning an image. You set comments in a FlashPix file one at a time, using Comments. Once all comments are set, the comments are saved using any function which saves files, such as Save when creating a new file, or WriteComment when changing a comment in an existing file. Comments, by itself, does not write a comment to a file, it prepares the values for the next save.
Comments are read directly from the file, without having to load the image. With the LEADTOOLS FlashPix extended support you have the ability to read a group of comments such as the "Summary Information Group" (CMNT_FPXSUMMARYINFORMATION), multiple groups of comments such as the "File Source Group" and the "Film Description Group" (CMNT_FPXFILESOURCEGROUP | CMNT_FPXFILMDESCRIPTIONGROUP), or all comments (CMNT_ALL). More information concerning comments and groups of comments may be found in FlashPix File Comments.
Retrieving one or more groups of comments is acheived through the use of ReadComment, which retrieve the size, in bytes, of the desired comments, and read the comments, respectively. An example of this can be seen under "Example" in the ReadComment topic.
Working with thumbnail images in a FlashPix file
A thumbnail, or stamp, is a small bitmap representation of a FlashPix image. Reading a thumbnail image stored in a FlashPix file and loading it into a bitmap may be performed using ReadStamp. To save a stamp into an already existing FlashPix file, use SaveStamp. The stamp will be written to the page specified in the firstSavePageNumber parameter. 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 exception will be thrown.