[Digikam-devel] [Bug 117115] Automatically rotate/flip using camera-provided information (EXIF) modifies image contents

Roger Larsson roger.larsson at norran.net
Thu Feb 9 22:32:25 GMT 2006


------- 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=117115         




------- Additional Comments From roger.larsson norran net  2006-02-09 23:32 -------
I do not really think I need to test. I will explain why

Digikam::exifRotate - the name of this function indicates that the image is
rotated by modifying the rotation exif information tag.

Decompressing one such image happens in two steps.
1) Identical code is decompressed to the same image matrix
2) The image matrix is rotated to the direction indicated by the exif tag.
The first step is identical for ALL rotation directions, compare with negative
film. The second step will not destroy any image data.

What Digikam does/did when downloading is/was the following.
(When finding rotation)
1) Decompress to image matrix
2) Roatate to direction indicated by exif tag
3) Reencode this new image matrix
4) Save this reencoded image
5) Optionally reset the exif tag - should never have been an option. If the
   image is rotated to the correct direction, exif have to be reset.
Trying to use Digikam::exifRotate will fail. Why? Jpeg from camera indicates
that camera was rotated right 90 degrees when taking the picture.
Rotating the picture right by using exifRotate will only result in an exif indicating rotated right by 180 degrees.
When viewed from a viewer that uses exif the picture will be upside down and
when viewed from a viewer that does not use exif it will look like no rotation
at all (as the camera sees it).

Having a destructive rotate by exif has some uses (but it should never EVER be
a hidden default!)
* If you do not care about the possible quality loss (you will never get it
  back)
* If your tools do not support exif
* If you use your tools in batch mode (many images at the same time, if only
  one image at the time it is easy to use that tools image rotate)
The only tools that I run into with this problem is the Windows explorer and
image viewer (but I am sure they will be fixed) and Digicam icon view...



More information about the Digikam-devel mailing list