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



commit c009de14acc06362f06c7829bfc659d2ee633202
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.
    
    (cherry picked from commit 062195117c7fa5f738f7cf2a15aac45c5f1d2ae7)

 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 8581725e92..1f0c8400d0 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;
@@ -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;


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