[KPhotoAlbum] Patch: rotation of raw thumbnails

Risto H. Kurppa risto at kurppa.fi
Tue Feb 20 11:39:50 GMT 2007


Great job!

It'd be really great to make this work!

You can find a portrait Nikon D70 NEF at
http://rhk.homelinux.net/temp/dsc_7687.nef (5Mb or so..)

Please report if it works! Also please let me know if .nef preview is
handled the same way your cr2:s (a really low resolution preview).


Thanks!

(I never learned to patch so I'm looking forward to see this patch in SVN..)

r


2007/2/20, Michael J Gruber <michaeljgruber+gmane at fastmail.fm>:
> 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.?
>
> _______________________________________________
> KPhotoAlbum mailing list
> KPhotoAlbum at kdab.net
> http://mail.kdab.net/mailman/listinfo/kphotoalbum
>
>
>


-- 
rhk

| risto h. kurppa
| risto at kurppa.fi
| http://risto.kurppa.fi



More information about the Kphotoalbum mailing list