peircej / jbrout

Automatically exported from code.google.com/p/jbrout
0 stars 0 forks source link

Exif Orientation Flag not reset during rotation in the import phase #116

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Dear Jbrout developers,

I have the problem that when trying to "refresh" my album folders, most of
my vertical pictures are extra (wrongly) rotated.

I've checked in the source : jbrout is using jpegtran for the rotation
operations. But jpegtran does not update the orientation tag
(http://sylvana.net/jpegcrop/exif_orientation.html), and therefore the
orientation tag stays untouched. If we try to refresh or import again the
folder, then all the pictures with an orientation tag 6 are rotated
clockwise and the orientation tag is still 6.

I thought I could improve this behaviour by writing something like this :
if sens=="auto":
    self.__info[Exif.Image.Orientation]='1'
    self.__info.writeMetadata()
after the lines :
# rebuild the exif thumb, because jpegtran doesn't do it on windows
self.rebuildExifTB()

in the "transform" function of class PhotoCmd (file tools.py), but
apparently it doesn't work, so I'm probably writing something wrong.

I'm using Jbrout 0.3.211 under Windows XP Pro SP2. And I've attached a file
on which you can try to repeat this issue.

Thanks a lot for your help,

Pierre-Emmanuel

Original issue reported on code.google.com by pelar...@gmail.com on 7 Aug 2009 at 12:23

Attachments:

GoogleCodeExporter commented 8 years ago
The fix suggested above wont work as the sens variable is converted to the
transformation that should actually be performed via a look-up table in the 
following
line:
sens = autoTrans[int(self.__info['Exif.Image.Orientation'])][0]

This is not a problem however as any manual transformation should also reset 
the EXIF
orientation variable to 1 as it is no-longer correct/relevant.  

Original comment by r...@wallace.gen.nz on 9 Aug 2009 at 12:15

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r259.

Original comment by r...@wallace.gen.nz on 9 Aug 2009 at 12:36

GoogleCodeExporter commented 8 years ago
Fixed in r259

Original comment by r...@wallace.gen.nz on 9 Aug 2009 at 12:36