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

Jean-François Rabasse jean-francois.rabasse at wanadoo.fr
Fri Jun 1 18:21:08 BST 2012


On Fri, 1 Jun 2012, jdd wrote:

>> Should try to copy your image under a different fresh new name, and
>> rstart Digikam to let it get « new image »...
>
> no change (close digikam, change name, open again digikam, no change)
>
> but I could rotate the image in digikam and get it right, with no change in 
> exifs (I have the options "write changes in exifs on!"
>
> pretty hard to understand

There's one thing you can do, to be sure of the processing, is to produce
images, large, normal, thumbnail, without any metadata information.
   convert -auto-orient -resize ... -strip <source> <destination>

The -strip option rebuilds a JPEG with only the image related sections,
DQT, DHT, SOF, SOS, ..., without any COM, JFIF, EXIF, APPn sections.

With such images, no viewing software can be influenced by a residual
orientation flag and will display pixels according to the scanlines order.
If your images shows correctly oriented, that means the whole raster is
correct.

Jean-François

PS: I personaly always use that -strip option to build images sets for
web albums, because I don't see the need for EXIF sections in my online
images. Should probably be a matter of personal taste.
(At least for thumbnail images, removing the EXIF section decreases the
file size by over 60%).

PPS: another useful convert option, for web images, is to produce
progressive JPEGs.
Option to add is:  -interlace plane
For large images, and/or visitors having a slow internet connexion, the
visual effect is more pleasant. IMHO


More information about the Digikam-users mailing list