plug-ins: fix TIFF linear export.

The export code was checking the existence of a profile variable which
was never set. In other words, it seems we were always converting TIFF
pixels to non-linear, even when we were also exporting a linear profile.

Note that is not useful anymore to check profile existence as we now use
the effective profile (which always exists). So we just have to check if
the "save profile" option is on.

(cherry picked from commit 062195117c)
This commit is contained in:
Jehan
2019-04-25 14:28:55 +09:00
parent dd2632bc85
commit c009de14ac

View File

@ -287,7 +287,6 @@ save_layer (TIFF *tif,
gboolean alpha;
gshort predictor;
gshort photometric;
GimpColorProfile *profile = NULL;
gboolean linear = FALSE;
const Babl *format;
const Babl *type;
@ -342,7 +341,7 @@ save_layer (TIFF *tif,
{
case GIMP_PRECISION_U8_LINEAR:
/* only keep 8 bit linear RGB if we also save a profile */
if (profile)
if (tsvals->save_profile)
{
bitspersample = 8;
sampleformat = SAMPLEFORMAT_UINT;
@ -403,7 +402,7 @@ save_layer (TIFF *tif,
/* save linear RGB only if we save a profile, or a loader won't
* do the right thing
*/
if (profile)
if (tsvals->save_profile)
linear = TRUE;
else
linear = FALSE;