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.
This commit is contained in:
@ -287,7 +287,6 @@ save_layer (TIFF *tif,
|
|||||||
gboolean alpha;
|
gboolean alpha;
|
||||||
gshort predictor;
|
gshort predictor;
|
||||||
gshort photometric;
|
gshort photometric;
|
||||||
GimpColorProfile *profile = NULL;
|
|
||||||
gboolean linear = FALSE;
|
gboolean linear = FALSE;
|
||||||
const Babl *format;
|
const Babl *format;
|
||||||
const Babl *type;
|
const Babl *type;
|
||||||
@ -342,7 +341,7 @@ save_layer (TIFF *tif,
|
|||||||
{
|
{
|
||||||
case GIMP_PRECISION_U8_LINEAR:
|
case GIMP_PRECISION_U8_LINEAR:
|
||||||
/* only keep 8 bit linear RGB if we also save a profile */
|
/* only keep 8 bit linear RGB if we also save a profile */
|
||||||
if (profile)
|
if (tsvals->save_profile)
|
||||||
{
|
{
|
||||||
bitspersample = 8;
|
bitspersample = 8;
|
||||||
sampleformat = SAMPLEFORMAT_UINT;
|
sampleformat = SAMPLEFORMAT_UINT;
|
||||||
@ -409,7 +408,7 @@ save_layer (TIFF *tif,
|
|||||||
/* save linear RGB only if we save a profile, or a loader won't
|
/* save linear RGB only if we save a profile, or a loader won't
|
||||||
* do the right thing
|
* do the right thing
|
||||||
*/
|
*/
|
||||||
if (profile)
|
if (tsvals->save_profile)
|
||||||
linear = TRUE;
|
linear = TRUE;
|
||||||
else
|
else
|
||||||
linear = FALSE;
|
linear = FALSE;
|
||||||
|
Reference in New Issue
Block a user