[Bug 147260] New: digikam image view does not rotate images in album view, thumbs are correct

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] New: digikam image view does not rotate images in album view, thumbs are correct

Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         
           Summary: digikam image view does not rotate images in album view,
                    thumbs are correct
           Product: digikam
           Version: unspecified
          Platform: SuSE RPMs
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Preview
        AssignedTo: digikam-devel kde org
        ReportedBy: rfkd fietze-home de


Version:            (using KDE KDE 3.5.7)
Installed from:    SuSE RPMs

As of digikam 0.9.2-final digikam does not rotate images, neither JPEGs nor CR2s, when beiing viewed using the image pop up menu->View. The thumbnails are rotated correctly, exiftool also displays the correct Orientation tag.

When I remember it correctly this worked before.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Andrew Dodd
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From atd7 cornell edu  2007-07-01 05:15 -------
Same occurs for the following in 0.9.2 final:
PEF files (Pentax K10D RAW files)
DNGs generated by running Adobe DNG Converter 4.1 on RAW files generated by a Panasonic Lumix DMC-LX1

It does not occur for the original RAW files generated by the DMC-LX1.

I can provide examples of all three formats upon request.  I am assuming they are too large to attach (8-10MB for PEF, 16MB for Lumix RAW, 7-8MB for Lumix "DNG from RAW"), but will attempt in a second comment.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Andrew Dodd
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From atd7 cornell edu  2007-07-01 18:05 -------
Created an attachment (id=21003)
 --> (http://bugs.kde.org/attachment.cgi?id=21003&action=view)
output of dcraw -i -v run on a sample K10D image
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Andrew Dodd
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From atd7 cornell edu  2007-07-01 18:05 -------
Created an attachment (id=21004)
 --> (http://bugs.kde.org/attachment.cgi?id=21004&action=view)
output of exiv2 -p t run on a sample K10D image
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Andrew Dodd
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From atd7 cornell edu  2007-07-01 18:06 -------
Created an attachment (id=21005)
 --> (http://bugs.kde.org/attachment.cgi?id=21005&action=view)
output of dcraw -i -v on a DMC-LX1RAW converted to DNG

Conversion was done by Adobe DNG Converter 4.1 running in WINE
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Andrew Dodd
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From atd7 cornell edu  2007-07-01 18:07 -------
Created an attachment (id=21006)
 --> (http://bugs.kde.org/attachment.cgi?id=21006&action=view)
output of exiv2 -p t on a DMC-LX1RAW converted to DNG
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Andrew Dodd
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From atd7 cornell edu  2007-07-01 18:07 -------
Created an attachment (id=21007)
 --> (http://bugs.kde.org/attachment.cgi?id=21007&action=view)
output of dcraw -i -v on a DMC-LX1 RAW image
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Andrew Dodd
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From atd7 cornell edu  2007-07-01 18:12 -------
exiv2 -p t when run on an unconverted DMC-LX1 RAW results in the following error in stderr and no output to stdout:

Exiv2 exception in print action for file P1000317.raw:
P1000317.raw: The file contains data of an unknown image type

These files are rotated correctly in digikam.  My suspicion is that if EXIF rotation information is present in the raw image, rotation is applied twice.  (Once when converted by dcraw, once more by digikam when it sees EXIF rotation information.)

I do not remember the camera orientation for the above samples, but will attempt a test to see if the problem is double rotation (resulting in a total 180 degree rotation) or no rotation later today.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Andrew Dodd
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From atd7 cornell edu  2007-07-01 19:09 -------
It is not double rotation.  A test image taken with the K10D's grip (right side of camera when oriented normally) oriented upwards results in digikam displaying the "top" of the image at the right side in "view" mode, indicating that either no rotation is being applied, or the net effect of all rotations is that no rotation is applied.

Also, opening the image with "Edit..." results in correct orientation.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Andrew Dodd
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From atd7 cornell edu  2007-07-01 21:39 -------
Temporary workaround:

In the "Albums" section of "Configure digiKam...", select "Embedded preview load full image size", this will cause RAW images to be rotated correctly, but will slow down browsing through albums significantly.

It appears that within exifRotate in loadsavethread.cpp, if an image is RAW it is not rotated.  For actual images converted with dcraw, this is the correct behavior.

For embedded previews extracted via kdcraw -e, this is not the correct behavior - the embedded preview is an unrotated JPEG that contains an EXIF orientation tag.

The reason the Panasonic DMC-LX1 unconverted-to-DNG raw images behaved correctly was not that they were missing EXIF data, but that they were missing embedded previews.  The Pentax PEFs and LX1 converted-to-DNG images both had embedded previews.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Marcel Wiesweg
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From marcel.wiesweg gmx de  2007-07-02 18:48 -------
SVN commit 682425 by mwiesweg:

Handle raw embedded preview differently than raw images loaded by dcraw
(either in full or half size mode).
Thanks to Andrew Dodd for bug hunting.

CCBUG: 147260


 M  +2 -1      loadsavethread.cpp  
 M  +23 -9     previewtask.cpp  


--- branches/extragear/kde3/graphics/digikam/libs/threadimageio/loadsavethread.cpp #682424:682425
 @ -211,7 +211,8  @
     // Raw files are already rotated properlly by dcraw. Only perform auto-rotation with JPEG/PNG/TIFF file.
     // We don't have a feedback from dcraw about auto-rotated RAW file during decoding. Return true anyway.
 
-    if (DImg::fileFormat(filePath) == DImg::RAW)
+    attribute = image.attribute("fromRawEmbeddedPreview");
+    if (DImg::fileFormat(filePath) == DImg::RAW && !(attribute.isValid() && attribute.toBool()) )
     {
         return true;
     }
--- branches/extragear/kde3/graphics/digikam/libs/threadimageio/previewtask.cpp #682424:682425
 @ -138,34 +138,48  @
 
     DImg img;
     QImage qimage;
+    bool fromEmbeddedPreview = false;
 
     // -- Get the image preview --------------------------------
 
     // First the QImage-dependent loading methods
     // Trying to load with dcraw: RAW files.
-    if ( !KDcrawIface::KDcraw::loadDcrawPreview(qimage, m_loadingDescription.filePath) )
+    if (KDcrawIface::KDcraw::loadEmbeddedPreview(qimage, m_loadingDescription.filePath))
+        fromEmbeddedPreview = true;
+
+    if (qimage.isNull())
     {
-        // Try to extract Exif/Iptc preview.
-        loadImagePreview(qimage, m_loadingDescription.filePath);
+        //TODO: Use DImg based loader instead?
+        KDcrawIface::KDcraw::loadEmbeddedPreview(qimage, m_loadingDescription.filePath);
     }
 
-    // DImg-dependent loading methods
+    // Try to extract Exif/Iptc preview.
     if (qimage.isNull())
     {
-        // Set a hint to try to load a JPEG with the fast scale-before-decoding method
-        img.setAttribute("jpegScaledLoadingSize", size);
-        img.load(m_loadingDescription.filePath, this, m_loadingDescription.rawDecodingSettings);
+        loadImagePreview(qimage, m_loadingDescription.filePath);
     }
-    else
+
+    if (!qimage.isNull())
     {
         // convert from QImage
         img = DImg(qimage);
+        // mark as embedded preview (for exif rotation)
+        if (fromEmbeddedPreview)
+            img.setAttribute("fromRawEmbeddedPreview", true);
         // free memory
-        qimage.reset();
+        qimage = QImage();
     }
 
+    // DImg-dependent loading methods
     if (img.isNull())
     {
+        // Set a hint to try to load a JPEG with the fast scale-before-decoding method
+        img.setAttribute("jpegScaledLoadingSize", size);
+        img.load(m_loadingDescription.filePath, this, m_loadingDescription.rawDecodingSettings);
+    }
+
+    if (img.isNull())
+    {
         DWarning() << "Cannot extract preview for " << m_loadingDescription.filePath << endl;
     }
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Marcel Wiesweg
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From marcel.wiesweg gmx de  2007-07-02 18:51 -------
This works now for all raw test images that I have available here.
It's pretty difficult to get it all right...

Note: I cannot confirm the problem of #0, JPEGs are rotated correctly here.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Bugzilla from rfkd@fietze-home.de
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From rfkd fietze-home de  2007-07-02 19:33 -------
The JPEGs are of course rotated. This was a fatal bug in module brain of unit Roman. :)

I will check the digikam updates as soon as I have time and will close it if CR2s are rotated.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Arnd Baecker
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From arnd.baecker web de  2007-09-01 01:42 -------
Roman, could you give an update on this bug,
does it still persist with current svn?

Many thanks in advance, Arnd
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Arnd Baecker
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From arnd.baecker web de  2007-09-24 22:39 -------
Roman, could you give an update on this bug,
it would be nice if we could close this bug before 0.9.3.
is released.

Many thanks in advance, Arnd
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Bugzilla from rfkd@fietze-home.de
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From rfkd fietze-home de  2007-09-24 23:02 -------
Sorry for the delay, but we had been "off shore" during the last school holidays.

I have the problem that I normally do not keep the SVN version of KDE on my system, compiling all the libs and e.g. digikam just takes too long on my old 2x500, so I currently just use the OpenSUSE 10.2 repositories.

I will try to compile KDE+digikam on my companies box at night time. 0.9.3 is planned for september, maybe I can do it.

Another solution would be to send you (or attach) a landscape Canon CR2 so you can test that on your system.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Bugzilla from rfkd@fietze-home.de
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From rfkd fietze-home de  2007-09-24 23:03 -------
I wrote

> Another solution would be to send you (or attach) a landscape ...

I meant portrait of course, landscape isn't a problem at all.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Arnd Baecker
In reply to this post by Bugzilla from rfkd@fietze-home.de
just a remark:

you don't have to compile KDE itself, just the relevant libs
as described on the homepage.

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Arnd Baecker
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         




------- Additional Comments From arnd.baecker web de  2007-09-24 23:08 -------
just a remark:

you don't have to compile KDE itself, just the relevant libs
as described on the homepage.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 147260] digikam image view does not rotate images in album view, thumbs are correct

Bugzilla from rfkd@fietze-home.de
In reply to this post by Bugzilla from rfkd@fietze-home.de
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=147260         
rfkd fietze-home de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WORKSFORME



------- Additional Comments From rfkd fietze-home de  2007-09-27 23:23 -------
Due to problems compiling just the digikam libs I took the following approach:

- digikam SUSE SRPMs: digikam-0.9.2-29.4 for OpenSUSE 10.2
- create RPMs with your two modifications in threadimageio
- install RPMs

And it works, the CR2 previews are rotated
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
12