[gimp] plug-ins: fix TIFF linear export.



commit 062195117c7fa5f738f7cf2a15aac45c5f1d2ae7
Author: Jehan <jehan girinstud io>
Date:   Thu Apr 25 14:28:55 2019 +0900

    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.

 plug-ins/file-tiff/file-tiff-save.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/file-tiff/file-tiff-save.c b/plug-ins/file-tiff/file-tiff-save.c
index 065bd5e6fa..ac42dc791b 100644
--- a/plug-ins/file-tiff/file-tiff-save.c
+++ b/plug-ins/file-tiff/file-tiff-save.c
@@ -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;
@@ -409,7 +408,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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]