Colour mapping for 1-bit, 2-bit, 4-bit, 8-bit colour is currently being handled by the raw and Apple Graphics (SMC) codecs - a better solution would be to move the colour mapping to the library and convert it to a different colour model there.
Also some converting for 16-bit to 24-bit is being done in codecs - this could also be moved to the library - providing that there are suitable conversions available for 16-bit -> XXX