Bug 221113 - RW2 images are not rotated anymore
Summary: RW2 images are not rotated anymore
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Thumbs-RAW (show other bugs)
Version: 1.0.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-03 15:10 UTC by S. Burmeister
Modified: 2017-07-27 11:00 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.1.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description S. Burmeister 2010-01-03 15:10:14 UTC
Version:           svn Rev: 1069274 (using KDE 4.3.4)
OS:                Linux
Installed from:    openSUSE RPMs

After 1.0.0 the rotation of RW2 files broke, i.e. if I process them in the  BQM with "convert to jpeg" they do not get rotated anymore although the RW2 files (thumbnails) are shown rotated in digikam's album view.
Comment 1 caulier.gilles 2010-01-03 15:25:52 UTC
Raw thumbnails are generated using JPEG embeded in Raw container. there are not relevant of Raw image data.

Rotation can be different for both. Yes, it's a shame, but there is not rotation information for jpeg _and_ raw. It's the same flags for both.

Gilles Caulier
Comment 2 Marcel Wiesweg 2010-01-03 16:33:22 UTC
Can you provide a sample picture?
Comment 3 Jens Mueller 2010-01-03 21:39:48 UTC
I can confirm this also for my NEF's. The results from BQM are:
convert to jpeg: rotated, but exif is the same as original (wrong)
convert to png: rotated, but exif is the same as original (wrong)
convert to tiff: rotated, exif set to normal (right)
Comment 4 Jens Mueller 2010-01-03 22:00:59 UTC
I think this one is caused by https://bugs.kde.org/show_bug.cgi?id=202278. Do convert tools need a setNeedResetExifOrientation(true) to?

Jens
Comment 5 Marcel Wiesweg 2010-01-07 22:15:37 UTC
RAW files are autorotated by dcraw already. Currently looking at dimginterface.cpp:351, where only for JPEG, PNG and TIFF the Exif flag is used at all. I'm not sure if that is correct, e.g. for JPEG2000 or PGF.

At least it seems that when having a fully loaded RAW (not a preview) and saving that in a different format, for which the exif flag is honoured, the metadata cannot just be copied, the flag must be reset.
Comment 6 caulier.gilles 2010-01-08 10:40:37 UTC
>I'm not sure if that is correct, e.g. for JPEG2000 or PGF.

Yes, it is for JP2 and PGF

Gilles
Comment 7 Marcel Wiesweg 2010-01-08 16:37:55 UTC
Sorry Gilles... ;-)
It is correct or it is not correct to ignore the Exif rotation flag for JPEG2000 and PGF?
Comment 8 caulier.gilles 2010-01-09 14:02:02 UTC
JPEG2000 support Exif and XMP offcially. You must check rotation flag here.

For PGF, Exif is supported through Exiv2 0.19 now, with my patch. Same way...

Gilles
Comment 9 Marcel Wiesweg 2010-01-09 16:10:55 UTC
SVN commit 1072176 by mwiesweg:

Rotate by exif orientation for all images except RAWs.
Previously, this was restricted to JPG/PNG/TIFF.

CCBUG: 221113

 M  +4 -17     dimginterface.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1072176
Comment 10 Marcel Wiesweg 2010-01-09 17:23:53 UTC
SVN commit 1072206 by mwiesweg:

Reset exif orientation, regardless if the tools requested that, if
the DImg was loaded from RAW.
(it's done similarly in the image editor, where a flag is set that the image
was rotated if it is RAW, and subsequently the orientation is reset)

CCBUG: 221113

 M  +1 -1      imageeditor/canvas/dimginterface.cpp  
 M  +6 -5      queuemanager/batchtool.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1072206
Comment 11 Marcel Wiesweg 2010-01-09 17:38:43 UTC
Everyone here, can you test if this is fixed now for your usecase?
Comment 12 Jens Mueller 2010-01-09 17:52:49 UTC
- converting RAW is fine for me (tested jpg & tiff & png)
- converting a jpg with exif-rotation flag set, the rotation flag is not preserved in tiff
Comment 13 Marcel Wiesweg 2010-01-09 21:17:05 UTC
TIFF is a different problem, metadata writing is disabled for now, bug 211758.
Comment 14 Jens Mueller 2010-01-09 21:20:55 UTC
ok, beside the tiff issue everthing is fine for me