Bug 124801

Summary: exif-based rotated jpeg loaded incorrectly
Product: [Applications] krita Reporter: Thomas Zander <zander>
Component: File formatsAssignee: Cyrille Berger <cberger>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: The image that does not load properly; canvas and pixels are rotated from each other.
non-rotated image; for comparison.

Description Thomas Zander 2006-04-03 03:00:28 UTC
Version:           1.5 rc1 (using KDE 3.5.2, compiled sources)
Compiler:          Target: x86_64-linux-gnu
OS:                Linux (x86_64) release 2.6.13.2

If I take a picture and use an application to rotate that picture (from my camera) by altering nothing but the exif data applications like kuickshow show it correctly, but krita loads it incorrectly.

I'll attach an image to show the problem.
Comment 1 Thomas Zander 2006-04-03 03:02:06 UTC
Created attachment 15431 [details]
The image that does not load properly; canvas and pixels are rotated from each other.
Comment 2 Thomas Zander 2006-04-03 03:04:01 UTC
Created attachment 15432 [details]
non-rotated image; for comparison.

To make clear what I meant with exif-rotated do a 'xdelta' diff on this file
and the rotated.jpg to find out there is only a 200bytes diff. I.e. the pixels
are not touched.
Comment 3 Halla Rempt 2006-04-03 09:17:18 UTC
I though Cyrille had fixed this in svn?

SVN commit 523052 by berger:

fix interpretation of exif orientation


 M  +2 -2      kis_jpeg_converter.cc  


--- branches/koffice/1.5/koffice/filters/krita/jpeg/kis_jpeg_converter.cc 
#523051:523052
@@ -247,6 +247,8 @@
         }
     }
     
+    m_img->addLayer(layer.data(), m_img->rootLayer(), 0);
+    
     // Read exif informations
 
     kdDebug(41008) << "Looking for exif information" << endl;
@@ -305,8 +307,6 @@
         break;
     }
 
-    m_img->addLayer(layer.data(), m_img->rootLayer(), 0);
-
     // Finish decompression
     jpeg_finish_decompress(&cinfo);
     jpeg_destroy_decompress(&cinfo);
Comment 4 Halla Rempt 2006-04-03 11:51:46 UTC
No, this isn't fixed in the current. 1.5 tree. Assigning to Cyrille.
Comment 5 Thomas Zander 2006-06-02 18:43:52 UTC
Fixed by upgrading my libjpeg