Draft: plug-ins: bmp import - color profiles
1st draft for loading color profiles from Windows BMPs. Only the last commit in this MR is relevant.
The code to create/apply icc profiles is largely taken from the png plugin.
I know very little about color management and color spaces, and cannot judge if what I did is correct or not.
Similar to PNGs, BMPs can have embedded icc profiles or a set of gamma values and 'endpoint' XYZ values. I haven't found anything meaningful on 'endpoints'. They seem to be chromaticities/primaries and whitepoint all-in-one? Are they simply the XYZ-coordinates of RGB(1,0,0), RGB(0,1,0), RGB(0,0,1)? Is it ok to just convert the XYZ values to xyY for cmsCreateRGBProfile()
?
The embedded-profile case is straight-forward enough (I just left the grayscale stuff out for now to keep it simpler)