After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 619731 - Orientation tag not reset while importing pictures
Orientation tag not reset while importing pictures
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
2.11.x
Other Linux
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2010-05-26 15:38 UTC by Matthias Hawran
Modified: 2010-10-29 12:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Hawran 2010-05-26 15:38:39 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?
Comment 1 Paolo Bacchilega 2010-05-26 17:20:02 UTC
> 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.
Comment 2 Michael Chudobiak 2010-05-26 17:24:09 UTC
Can we grey out the "Rotate image physically" choice if the exiv2 extension is not present?
Comment 3 Paolo Bacchilega 2010-05-26 18:12:08 UTC
(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.
Comment 4 Matthias Hawran 2010-05-26 21:10:13 UTC
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.
Comment 5 Matthias Hawran 2010-05-26 22:09:04 UTC
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
Comment 6 Michael Chudobiak 2010-05-29 13:56:39 UTC
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
Comment 7 Paolo Bacchilega 2010-08-04 23:28:40 UTC
this should be fixed with this commit: http://git.gnome.org/browse/gthumb/commit/?id=0c5f71f298c8df65d4a3e8de998f47256e7394ca
Comment 8 Matthias Hawran 2010-08-05 07:16:50 UTC
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.
Comment 9 Matthias Hawran 2010-10-29 12:22:33 UTC
Finally got to test it (in 2.12) and it's fixed.
Thanks !