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

Elle Stone l.elle.stone at gmail.com
Thu May 31 19:43:51 BST 2012


Hmm, my apologies, now I'm not sure what you really want to do.
digiKam doesn't use exiftool at all. digiKam has had a problem with
orientation tag for a while now. It's been reported as a bug by
several people. 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. That way there was no way that digiKam could get confused.

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. These offsets are used as pointers to reference tag values and
structures within the metadata, and errors like this may lead to
missing or incorrect values for some makernote tags. In many cases,
ExifTool will detect this type of problem and issue a warning like
this:  . . .  If this warning occurs, you can use the -F option to
attempt to fix the problem. If no value is specified with -F, the
suggested fix is applied (ie. in this example a value of "-340" is
suggested, so here -F would be equivalent to -F-340). See the -F
option documentation for details."

Anyway, if I've misled you, I apologize. And obviously if you shoot
raw, you can't rotate the embedded raw file preview, at least I don't
think you can. I don't let digiKam handle my raw files, only the
extracted jpeg previews. So probably you should ignore everything I've
said.

Elle, crawling back under a rock.




On 5/31/12, jdd <jdd at dodin.org> wrote:
> Le 31/05/2012 17:21, Elle Stone a écrit :
>
>> Test, test, and retest in a test directory on a small sample of images
>
> command line tools are invaluable in that they report errors.
>
> The ùessage below says there is somewhere an error. However, most kde
> tool *know* the image orientation, so may be the error is not the one
> given here?
>
> for example, dolphin displays by default the images with the right
> orientation (that is vertical images are displayed vertical,
> acknowledging the tag). Genview display the image and the tag value
> correctly.
>
> Digikam?? I don't know what digikam do. I use the 2.6RC, now. Whatever
> I try to do, the image is correctly displayed (vertical images are
> displayed vertically), but the exif tag is never changed (kept right,
> top when is should be top, left.
>
> do digikam try to use the very same exif command line as below??
>
> any idea of solution?
> thanks
> jdd
>
> exiftool -n -r -overwrite_original -if '$Orientation ne 1'
> -Orientation=1 .
> Error: [minor] Bad MakerNotes offset for tag 0x0 - ./2012-05-29
> 18.33.12.jpg
> Error: [minor] Bad MakerNotes offset for tag 0x0 - ./2012-05-29
> 18.35.14.jpg
> Error: [minor] Bad MakerNotes offset for tag 0x0 - ./2012-05-29
> 18.35.36.jpg
> Error: [minor] Bad MakerNotes offset for tag 0x0 - ./2012-05-29
> 18.37.33.jpg
> Error: [minor] Bad MakerNotes offset for tag 0x0 - ./2012-05-29
> 18.40.00.jpg
> Error: [minor] Bad MakerNotes offset for tag 0x0 - ./2012-05-29
> 18.41.47.jpg
> Error: [minor] Bad MakerNotes offset for tag 0x0 - ./2012-05-29
> 18.42.02.jpg
> Error: [minor] Bad MakerNotes offset for tag 0x0 - ./2012-05-29
> 18.53.37.jpg
>      1 directories scanned
>     33 files failed condition
>      0 image files updated
>      8 files weren't updated due to errors
>
> _______________________________________________
> Digikam-users mailing list
> Digikam-users at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-users
>


-- 
Elle Stone
http://ninedegreesbelow.com



More information about the Digikam-users mailing list