mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
libgimp: formats with space are only for layers
gimp_drawable_get_format(): don't add the image's layer profile space to channel and mask formats, it's only for layers.
This commit is contained in:
parent
08d75d795e
commit
b41d60455f
1 changed files with 21 additions and 17 deletions
|
@ -427,28 +427,32 @@ gimp_drawable_get_format (gint32 drawable_ID)
|
||||||
|
|
||||||
if (format_str)
|
if (format_str)
|
||||||
{
|
{
|
||||||
gint32 image_ID = gimp_item_get_image (drawable_ID);
|
gint32 image_ID = gimp_item_get_image (drawable_ID);
|
||||||
GimpColorProfile *profile;
|
const Babl *space = NULL;
|
||||||
const Babl *space = NULL;
|
|
||||||
|
|
||||||
profile = gimp_image_get_color_profile (image_ID);
|
if (gimp_item_is_layer (drawable_ID))
|
||||||
|
|
||||||
if (profile)
|
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GimpColorProfile *profile = gimp_image_get_color_profile (image_ID);
|
||||||
|
|
||||||
space =
|
if (profile)
|
||||||
gimp_color_profile_get_space (profile,
|
|
||||||
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
|
|
||||||
&error);
|
|
||||||
if (! space)
|
|
||||||
{
|
{
|
||||||
g_printerr ("%s: failed to create Babl space from profile: %s\n",
|
GError *error = NULL;
|
||||||
G_STRFUNC, error->message);
|
|
||||||
g_clear_error (&error);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_object_unref (profile);
|
space = gimp_color_profile_get_space
|
||||||
|
(profile,
|
||||||
|
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
|
||||||
|
&error);
|
||||||
|
|
||||||
|
if (! space)
|
||||||
|
{
|
||||||
|
g_printerr ("%s: failed to create Babl space from "
|
||||||
|
"profile: %s\n",
|
||||||
|
G_STRFUNC, error->message);
|
||||||
|
g_clear_error (&error);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_object_unref (profile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gimp_drawable_is_indexed (drawable_ID))
|
if (gimp_drawable_is_indexed (drawable_ID))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue