plug-ins: Store CMYK profile in image on TIFF load

Now that images can contain their simulation profile,
we can use gimp_image_set_simulation_profile() to retain
the CMYK profile when a TIFF image is loaded.
It will then be accessible in GIMP's Image menu.
This commit is contained in:
Alx Sa 2022-07-14 03:29:12 +00:00 committed by Jehan
parent 12c7501552
commit 984586f623
1 changed files with 7 additions and 1 deletions

View File

@ -1014,7 +1014,6 @@ load_image (GFile *file,
space = gimp_color_profile_get_space (profile,
GIMP_COLOR_RENDERING_INTENT_RELATIVE_COLORIMETRIC,
error);
g_clear_object (&profile);
}
else
{
@ -1181,6 +1180,13 @@ load_image (GFile *file,
}
}
/* attach CMYK profile to GimpImage if applicable */
if (profile && gimp_color_profile_is_cmyk (profile))
{
gimp_image_set_simulation_profile (*image, profile);
g_clear_object (&profile);
}
/* attach non-CMYK color profile */
if (profile)
{