GNOME Bugzilla – Bug 619731
Orientation tag not reset while importing pictures
Last modified: 2010-10-29 12:22:33 UTC
Latest git master When I import a portait picture, if I Select "Rotate image physically", the exif orientation tag is not reset to "top left". (should be according to Mike, see ML) The image has been physically rotated however. My Camera is a Canon Ixus 850 IS I have jpeg pictures. If I run in gdb step by step, I'm entering jpegtran.c:jpegtran I've got JPEG_LIB_VERSION < 80 since I'm executing jcopy_markers_exif (jpegtran.c:234) I'm on Ubuntu Karmic 9.10 What else do you need for debug? Where is the exif tag suppose to be reset?
> Where is the exif tag suppose to be reset? in extensions/jpeg_utils/jpegtran.c:jpegtran() there is a "jpegtran-after" hook that is used by the exiv2 extension to reset the orientation tag in extensions/exiv2_tools/main.c:exiv2_jpeg_tran_cb() so you need the exiv2 extension to be enabled in order to reset the orientation tag.
Can we grey out the "Rotate image physically" choice if the exiv2 extension is not present?
(In reply to comment #2) > Can we grey out the "Rotate image physically" choice if the exiv2 extension is > not present? yes, with the gth_main_extension_is_active() function.
I only saw your comments now, bugzilla didn't send me the mails... :( FYI I have all extensions enabled (always) I'll do some more step debug and let you know. And true, the greying out is a good idea.
Well looks like the bug is in exiv2 when writing the tag. In extensions/exiv2_tools/exiv2-utils.cpp:exiv2_write_metadata_to_buffer returns FALSE, an exception is thrown during exiv2_write_metadata_private call I printed the exception using e.what() and get: "Multiple TIFF array element tags 1 in one directory" I'm trying step debug in exiv2_write_metadata_private now... I've got exiv2 version 0.18.2-1
I was able to find a camera with the orientation tag. It works OK for me, using Fedora 13 with exiv2-0.19-1.fc13.x86_64. - Mike
this should be fixed with this commit: http://git.gnome.org/browse/gthumb/commit/?id=0c5f71f298c8df65d4a3e8de998f47256e7394ca
Thanks for the fix. Unfortunately I didn't have any time to continue the debug. I tried to compile but I'm blocked since the recent gtk 2.20 requirement... so I need to upgrade my Ubuntu to get it. I'll let you know.
Finally got to test it (in 2.12) and it's fixed. Thanks !