[gthumb] Fixed JPEG lossless rotation



commit ad1ca3465fad47f441c61a37df06a6d81f6bf89d
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Feb 24 11:53:32 2019 +0100

    Fixed JPEG lossless rotation
    
    Fixes: https://gitlab.gnome.org/GNOME/gthumb/issues/22

 extensions/jpeg_utils/jpegtran.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/extensions/jpeg_utils/jpegtran.c b/extensions/jpeg_utils/jpegtran.c
index 5aefcfaf..c303758c 100644
--- a/extensions/jpeg_utils/jpegtran.c
+++ b/extensions/jpeg_utils/jpegtran.c
@@ -186,10 +186,18 @@ jpegtran_internal (struct jpeg_decompress_struct  *srcinfo,
        }
 
        transformoption.transform = transform;
+       transformoption.perfect = (mcu_action == JPEG_MCU_ACTION_ABORT);
        transformoption.trim = (mcu_action == JPEG_MCU_ACTION_TRIM);
        transformoption.force_grayscale = FALSE;
 #if JPEG_LIB_VERSION >= 80
-       transformoption.crop = 0;
+       transformoption.crop = FALSE;
+       transformoption.crop_width_set = FALSE;
+       transformoption.crop_height_set = FALSE;
+       transformoption.crop_xoffset_set = FALSE;
+       transformoption.crop_yoffset_set = FALSE;
+#endif
+#ifdef LIBJPEG_TURBO_VERSION
+       transformoption.slow_hflip = FALSE;
 #endif
 
        /* Enable saving of extra markers that we want to copy */
@@ -207,7 +215,7 @@ jpegtran_internal (struct jpeg_decompress_struct  *srcinfo,
                                               transform))
        {
                if (error != NULL)
-                       g_set_error (error, JPEG_ERROR, JPEG_ERROR_MCU, "MCU Error");
+                       g_set_error (error, JPEG_ERROR, JPEG_ERROR_MCU, "MCU Error");
                return FALSE;
        }
 


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