[gegl] Revert "Raw load (libraw): bounding box correction for rotated images"



commit d3e79f4a5060bac7c563f0b7c2d94ac157375ac6
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Dec 6 13:58:37 2017 +0100

    Revert "Raw load (libraw): bounding box correction for rotated images"
    
    Other source operations that decode image file formats, eg. JPEG, do
    not apply the embedded orientation. Having the RAW loader do so
    complicates things for applications that use gegl:load to load pixels
    from files into a GeglBuffer. If it is really necessary then it can be
    done, optionally, behind a boolean property.
    
    This is one of those things that will be addressed as part of a better
    codec API for GeglBuffer. Until then, at least ensure that the loaders
    consistent among themselves.
    
    Note that due to user_flip being disabled in commit 2ca38acae33fe9db,
    LibRaw wasn't actually orienting the pixels. So, the oriented bounding
    box didn't correspond to the unoriented contents of the GeglBuffer.
    
    This reverts commit 14d71e541270d0248f4307d3701c26759673205b.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770917

 operations/external/raw-load.c |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/operations/external/raw-load.c b/operations/external/raw-load.c
index e6c9d7a..e659d29 100644
--- a/operations/external/raw-load.c
+++ b/operations/external/raw-load.c
@@ -147,18 +147,8 @@ get_bounding_box (GeglOperation *operation)
   if (p->LibRaw != NULL &&
       (p->LibRaw->progress_flags & LIBRAW_PROGRESS_IDENTIFY)) 
     {
-      switch (p->LibRaw->sizes.flip)
-      {
-        case 5:
-        case 6:
-          result.width  = p->LibRaw->sizes.height;
-          result.height = p->LibRaw->sizes.width;
-          break;
-        default:
-          result.width  = p->LibRaw->sizes.width;
-          result.height = p->LibRaw->sizes.height;
-          break;
-      }
+      result.width  = p->LibRaw->sizes.width;
+      result.height = p->LibRaw->sizes.height;
       gegl_operation_set_format (operation, "output", babl_format ("R'G'B' u16"));
     }
 


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