[KPhotoAlbum] Patch: rotation of raw thumbnails

Michael J Gruber michaeljgruber+gmane at fastmail.fm
Tue Feb 20 11:11:25 GMT 2007


I did some further investigation on the issue of thumbnail rotation for
raw images. It turned out that portrait images were actually rotated
twice by KPA so that they were in landscape orientation again, rotated
by 180 degrees! The problem is the following:

If the original image is not rotated, then the thumbnail should be like
that, too. This is what KPA does when generating thumbnails for JPGs and
the like.

When KPA displays the thumbail it looks up the orientation info in EXIF
and rotates the thumbnail accordingly for display, but it's always saved
unrotated.

Alas, the thumbail generation code in KPA for raw images rotates
thumbails and saves them rotated. When they get displayed, the display
code looks up orientation info and rotates the thumbnail again.

I suspect that back when that code was written KPA wasn't able to look
up orientation for raw images, therefore things worked that way even
though it's not correct to save the thumbnails with a different
orientation than the original.

The attached patch simply removes the rotation code for thumbnail
generation.

NOTE: It is necessary to recreate the thumbails for raw images, or else
the patch will get only new thumbails correctly.

I tested with cr2's from a 350D, things work as expected. I have a
couple of raw files form other cameras, but they're all in landscape.
I'd be happy about pointers to raw files from other cameras in portrait
orientation.

The patch is against the devel branch but should apply to the stable as
well.

Cheers,
Michael

P.S.: Robert: You reported things worked before for your 20D. Could you
check with the patch or provide a 20D raw file in portrait o.?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rawrotation.patch
Type: text/x-patch
Size: 732 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kphotoalbum/attachments/20070220/f6c2820f/attachment.bin>


More information about the Kphotoalbum mailing list