Available in the LEADTOOLS Imaging toolkit. |
Implementing PhotoCD and FlashPix Features
A Kodak PhotoCD or FlashPix file can contain more than one copy of the same image, each at a different physical resolution (width and height in pixels). For PhotoCD files, the resolutions are based on fixed sizes. As a result, all PhotoCD files have the same aspect ratio. For FlashPix files, the aspect ratio can vary; so there is not a list of fixed sizes.
For PhotoCD files, which LEADTOOLS can read but not write, you can use the InfoPCDRes property to examine which of the fixed sizes are available in a file. You can then use the PCDRes property to specify which of the fixed sizes to load.
LEADTOOLS can read and write FlashPix files.
When loading FlashPix files, there are some newer methods and properties, which can also be used with the PhotoCD files. You can use the following method and properties to examine which sizes are available in a file:
You can then use the following method to specify which size to load:
The following method gets the last width and height values that were set with the SetLoadResolution method:
Special considerations when saving FlashPix files:
LEADTOOLS does not support the multi-resolution update features of the FlashPix format. The LEADTOOLS save functions always create a new file from the current bitmap, and the highest resolution in the new FlashPix file has the dimensions of the current bitmap. Therefore, if you overwrite an existing FlashPix file, you can lose any resolutions with larger dimensions than the current bitmap.
The format constant that you specify when saving a FlashPix file determines the type of compression. The following are the possible choices:
Format Constant Meaning
FILE_FPX FlashPix, with no compression
FILE_FPX_SINGLE_COLOR FlashPix, compressed with the single color method, which is a FlashPix-specific compression method
FILE_FPX_JPEG FlashPix, compressed with JPEG, using the FlashPix default Q factor
FILE_FPX_JPEG_QFACTOR FlashPix, compressed with JPEG, using the specified Q factor
The compression is done by the Kodak support DLLs (LFKODAK.DLL and LFFPX7.DLL). You can use the same Q factors as with LEAD's JPEG engine (setting a value from 2 to 255, where 2 is the highest quality and 255 is the most compression), but the compression engine is not the same as LEAD's. You cannot use the InfoCompress property to determine the compression method in a FlashPix file.
Other considerations for PhotoCD and FlashPix files:
LEADTOOLS can only read PhotoCD and FlashPix files directly from disk files. Therefore, the methods for loading files from memory and saving files to memory are not applicable.
The FlashPix format requires OLE support. Therefore, you may need to include OLE support files, such as MSVCRT40.DLL, MFC40.DLL, and OLEPRO32.DLL, with your application.