Looking at LUT conversion code, we are clearly only supporting
converting from "u8" (to "u16" or "float" respectively).
Conversions such as "YA half" to "R'G'B'A float" for instance would be
completely broken (it was trying to use only one byte of the "YA half",
assumed it was "u8" and transform it to "float"). This is why the sample
image in #85 was appearing on display as more transparent than it should
when converted to 16-bit floating point grayscale image.
&& ( ( source_bpp == 2
&& dest_bpp == 16)
- ||( source_bpp == 4
- && dest_bpp == 16
- && dest_type == babl_type_from_id (BABL_FLOAT)
+ ||( source_bpp == 4
+ && dest_bpp == 16
+ && source_type == babl_type_from_id (BABL_U8)
+ && dest_type == babl_type_from_id (BABL_FLOAT)
&& dest_not_associated)
||( source_bpp == 4
&& dest_type == source_type
&& dest_not_associated)
- ||( source_bpp == 4
- && dest_bpp == 8
- && dest_type == babl_type_from_id (BABL_U16)
+ ||( source_bpp == 4
+ && dest_bpp == 8
+ && source_type == babl_type_from_id (BABL_U8)
+ && dest_type == babl_type_from_id (BABL_U16)
&& dest_not_associated)
||( source_bpp == 3