[Digikam-users] command line tool to normalize exif orientation flag

Jean-François Rabasse jean-francois.rabasse at wanadoo.fr
Fri Jun 1 10:32:00 BST 2012


Hello,

On Thu, 31 May 2012, Elle Stone wrote:

> ...
> My solution was to use exiftool to set the orientation flag to normal 
> and also rotate the image by hand so it really was normal.
> ...

As a possible alternative, the `convert' program (from ImageMagik 
package), has an auto-orient command that looks close to what you do
by hand :

-- (Copy/paste from the convert man page)

   -auto-orient
    Automagically orient (rotate) an image created by a digital camera.

    This operator reads and resets the EXIF image profile setting
    'Orientation' and then performs the appropriate 90 degree rotation on
    the image to orient the image, for correct viewing. 
--



* The following is a bit off topic, just a personal comment about
some metadata edition problems (both with exiftool or exiv2).

> ...
> Here's what the exiftool documentation says about bad makernotes:
>
> http://www.sno.phy.queensu.ca/~phil/exiftool/faq.html  See faq 15,
> which says in part:
> 15. "I get MakerNote warnings or errors when reading or writing information"
>
>    "Problems like this may be caused by image editing software which
> doesn't properly update offsets in the MakerNotes when rewriting an
> image.
> ...

This is a nightmare. Phil Harvey is right when saying "may be caused by 
image editing software", but not only. Problems may also be caused by
not perfectly supported makernotes.
I have both problems with one of my cameras (Nikon D3100 with v1.01 
firmware).
Even with original images (e.g. out of camera JPEGs), I get warnings
  "Suspicious MakerNotes offset ..."
and after image edition, using The GIMP, I sometime get read errors
  "Bad MakerNotses offset ..."
that prevent rewriting the file with edited metadata.

So, clearly, the editing software doesn't agree with exiftool.
But exiftool doesn't agree neither with the camera firmware producing 
the original EXIF section.

Who's right ? I don't know.
Who's stuck ? Me :-)

I live with that, but it requires to do editions in the proper order,
EXIF data edition - if any - first, then image edition after.
If I forget the rule and do some GIMP work first, I can't do anything
with exiftool after that.

Regards,

Jean-François


More information about the Digikam-users mailing list