mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
libgimpwidgets: support cairo formats in gimp_color_profile_get_format()
so color profile transforms can write directly to cairo-RGB24 and cairo-ARGB32 surfaces.
This commit is contained in:
parent
df24d3d025
commit
608f254b33
1 changed files with 20 additions and 0 deletions
|
@ -965,8 +965,28 @@ gimp_color_profile_get_format (const Babl *format,
|
|||
{
|
||||
linear = FALSE;
|
||||
}
|
||||
else if (format == babl_format ("cairo-RGB24"))
|
||||
{
|
||||
*lcms_format = TYPE_RGB_8;
|
||||
|
||||
return babl_format ("R'G'B' u8");
|
||||
}
|
||||
else if (format == babl_format ("cairo-ARGB32"))
|
||||
{
|
||||
*lcms_format = TYPE_RGBA_8;
|
||||
|
||||
return babl_format ("R'G'B'A u8");
|
||||
}
|
||||
else
|
||||
{
|
||||
g_printerr ("format: %s\n"
|
||||
"has_alpha = %s\n"
|
||||
"type = %s\n"
|
||||
"model = %s\n",
|
||||
babl_get_name (format),
|
||||
has_alpha ? "TRUE" : "FALSE",
|
||||
babl_get_name (type),
|
||||
babl_get_name (model));
|
||||
g_return_val_if_reached (NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue