plug-ins: Make sure CMYK profile is exported for TIFF

Unlike PSD and JPEG, our TIFF plug-in's color profile export
code only ran if the user had enabled the Save Color Profile
option. The CMYK option alone did not trigger the profile code,
so it was possible to accidently export a CMYK TIFF without
including its color profile. Since this is rarely desired, the CMYK
boolean was added to the profile export conditional code, so that
it runs if either option is selected.
This commit is contained in:
Alx Sa 2025-04-25 21:02:18 +00:00
parent 2ccc4be050
commit 1d640b3e47

View file

@ -669,7 +669,7 @@ save_layer (TIFF *tif,
} }
#ifdef TIFFTAG_ICCPROFILE #ifdef TIFFTAG_ICCPROFILE
if (config_save_profile) if (config_save_profile || config_cmyk)
{ {
const guint8 *icc_data = NULL; const guint8 *icc_data = NULL;
gsize icc_length; gsize icc_length;
@ -1089,7 +1089,7 @@ export_image (GFile *file,
goto out; goto out;
} }
if (config_save_profile) if (config_save_profile || config_cmyk)
{ {
GimpColorProfile *profile; GimpColorProfile *profile;
GError *error = NULL; GError *error = NULL;