pcdtojpeg incorporates a separate PCD decoder library, which can easily be incorporated into other software that needs to decode PCD files.
The library is known as pcdDecode, and the entire library is contained in only a single C++ source file (pcdDecode.cpp) and its associated include file (pcdDecode.h).
pcdDecode is written to provide a PCD decoder library that is:
-
•Easy to use, with a clear API, and human readable messages.
-
•Suited to modern multi-core processors; so multithreaded where applicable.
-
•Multi-platform - OS X, Windows, *nix, little- or big-endian
-
•Minimum dependencies - pcdDecode will use pthreads if available, but is otherwise standalone (other than for normal C++ libraries).
-
•Correctly converts all forms of PCD files, including all classes of Huffman encoding (classes 1-4).
-
•Converts all PCD resolutions, including 64Base images.
-
•Correct and predictable color space handling (no blown highlights, no color casts); RGB data can be returned in a choice of well specified color spaces.
-
•Full support for "Kodak standard" bilinear interpolation of chroma.
-
•Extracts PCD file metadata information.
-
•Transparently recovers from many data errors.
-
•GPL licensed.
pcdDecode is also available is non-GPL version that adds AHD style interpolation; this offers lower image noise and better edge performance.
Compiling the software from source
Compiling: pcdDecode should compile without modification on most systems. It has been tested on OS X (XCode), MS Windows (Visual C++) and linux (GCC), on both big- and little-endian CPUs. The only thing to do is to define "mNoPThreads" if you don't have (or don't want) pthreads. This is done automagically for Visual C++, so you shouldn't have to do so. Here’s what you need know to use the pcdDecode library:
-
1.All of the documentation for individual API functions is in the pcdDecode.h file.
-
2.pcdtojpeg exercises most functions of pcdDecode, and thus forms an excellent tutorial for the various API functions.
-
3.pcdtojpeg was built under VC Express 2008 for Windows, and XCode 3.1 for the Mac. The respective project files are included.
-
4.Under Linux, G++ was used to compile pcdDecode - instructions are on the Installation page.