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 LFileSettings::GetPCDResolution function to examine which of the fixed sizes are available in a file. You can then use the LFileSettings::SetPCDResolution function to specify which of the fixed sizes to load.

LEADTOOLS can read and write FlashPix files.

When loading FlashPix files, there are some newer functions, which can also be used with the PhotoCD files. You can use the LFile::ReadLoadResolutions function to examine which sizes are available in a file. You can then use the LFileSettings::SetLoadResolution function to specify which size to load. (The LFileSettings::GetLoadResolution function only gets the last width and height values that were set with the LFileSettings::SetLoadResolution function.)

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

[80] FlashPix, with no compression

FILE_FPX_SINGLE_COLOR

[81] FlashPix, compressed with the single color method, which is a FlashPix-specific compression method

FILE_FPX_JPEG

[82] FlashPix, compressed with JPEG, using the FlashPix default Q factor

FILE_FPX_JPEG_QFACTOR

[83] 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 LFile::GetInfo function 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 functions for loading files from memory and saving files to memory are not applicable. Also, you cannot use LBaseFile::EnableRedirectIO or LFile::FeedLoad to load one of these files.

Although you can load PhotoCD files on WIN32 systems, you cannot load them with the WIN32 toolkit on a WIN32s system (which implements 32-bit applications on a 16-bit system).

When working with FlashPix files, the first page may be replaced, but do not delete the first page. LEADTOOLS can read multiple pages in FlashPix files, but other products cannot. Deleting the first page of a FlashPix file may cause other products to return an error.

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.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C++ Class Library Help