Re: [gthumb-list] The Exif Orientation tag, again



On Mon, Jun 21, 2010 at 2:03 AM, Dr. Michael J. Chudobiak
<mjc avtechpulse com> wrote:

Looking at the code and behavior of the latest gthumb, we reset the
Exif orientation tag during lossless rotations. I think it's wrong and

I don't think it is wrong :-)

I think so instead. Suppose you have a picture of a tree, that is
portrait but is physically encoded as landscape, with the tree
pointing to the right and the orientation tag set to "bottom left"
(-90°). Suppose you want then to rotate the picture to have the tree
visually pointing to the left, so 90° counterclockwise.

You can do it in two different ways.

1) Not changing the picture, but updating the orientation tag, that in
this case would mean setting it to -180°.
2) Rotating the physical picture, so having the tree pointing to the
top, and keeping the orientation tag as it is (-90°).

Doing both will lead to a tree pointing to the top, that is not what
was intended.

Another option is to take into account the current orientation tag
before applying the transformation, and correcting it as needed.

this has the effect of not applying some transformations or applying
them twice.

That would definitely be a bug. Can you document a reproducible example
where a transformation leads to an incorrectly displayed image?

Yes, I can definitely reproduce it.

If I can suggest a general policy to handle the Orientation tag:

Roughly speaking, the orientation tag is compensated for when loading an
image into a pixbuf.

I agree that if a picture is read into a pixbuf then should lose any
kind of orientation information when saved, as should be saved as it's
rendered.

Lossless rotation is a little different because it doesn't work on pixbufs.
It works directly on files. But the basic idea is the same: compensate for
orientation on the input, use a standard orientation on the output.

That's the point. Lossless rotation is different. It doesn't take into
account the initial orientation tag, if set, so it doesn't work as it
should.

Stefano



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]