2007.04.25 13:23 "[Tiff] orientations 5-8 not handled correctly", by Dr. Michael J. Chudobiak

2007.04.25 13:56 "Re: [Tiff] orientations 5-8 not handled correctly", by Frank Warmerdam

libtiff correctly flips images with orientation tag values of 1-4, but it does not handle orientations 5-8 correctly. 5-8 require rotations rather than horiz/vert mirroring (see http://sylvana.net/jpegcrop/exif_orientation.html).

Specifically, libtiff/tif_getimage.c: setorientation has code like:

         switch (img->orientation) {
                 case ORIENTATION_TOPLEFT:
                 case ORIENTATION_LEFTTOP:
                        bla bla bla....

The code treats ORIENTATION_TOPLEFT the same as ORIENTATION_LEFTTOP, but obviously they are not the same.

Is this deliberate?

This has come up in the gnome bugzilla, see http://bugzilla.gnome.org/show_bug.cgi?id=428725#c52.

We need to fix it either in the gnome tiff pixbuf loader, or in libtiff.



Please file the details in the libtiff bugzilla, and we should be able to resolve this.

Best regards,

I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam

and watch the world go round - Rush    | President OSGeo, http://osgeo.org