Some file formats (TIFF, PSD, EXR) support bitmap channels/components beyond the standard RGB(A), and it very unfortunate this information is so far lost when loading the image.
This patch adds support for unlimited \"extra\" channels to the FIBITMAP structure.
The task is handled by a new helper class called DibList which manges a list of dibs and their memory.
A pointer to instance of this class is stored inside the FREEIMAGEHEADER, much like the internal metadata structure, which enables any dib to have infinite number of \"channel\" dibs attached to it. They will be automatically released when dib is unloaded.
A simple interface for adding/removing extra channels to a dib is supplied. This interface also filters the type of dibs that can be added.
A test file TestDibList.cpp is supplied also, which tests the above.
Second, the patch implements full loading for EXR and partial for PSD (only 8bit images). The new flag LOAD_EXTRA_CHANNELS enables this load mode.
A test file TestExtraChannels and test image files* are supplied.