mirror of https://github.com/GNOME/gimp.git
libgimpcolor: handle palette formats in gimp_color_profile_get_format()
Return "R'G'B'[A] u8" and "TYPE_RGB[A]_8" and babl and lcms formats. I'm not sure which code triggered the warning about an unhandled format, but now it handles indexed images too.
This commit is contained in:
parent
3a34a2b54c
commit
52af9145d7
|
@ -1482,6 +1482,21 @@ gimp_color_profile_get_format (const Babl *format,
|
|||
gray = TRUE;
|
||||
linear = FALSE;
|
||||
}
|
||||
else if (babl_format_is_palette (format))
|
||||
{
|
||||
if (has_alpha)
|
||||
{
|
||||
*lcms_format = TYPE_RGBA_8;
|
||||
|
||||
return babl_format ("R'G'B'A u8");
|
||||
}
|
||||
else
|
||||
{
|
||||
*lcms_format = TYPE_RGB_8;
|
||||
|
||||
return babl_format ("R'G'B' u8");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
g_printerr ("format: %s\n"
|
||||
|
|
Loading…
Reference in New Issue