[Development] Rotating JPEG images by default

Alberto Mardegan mardy at users.sourceforge.net
Wed Apr 22 13:32:51 CEST 2015


On 04/22/2015 09:39 AM, André Somers wrote:
> I'm with Konstatin on this one: it seems like a regression to me. It
> would be a useful feature to add, but then add it in such a way that it
> is actually clear what it does, the user can control it, and it does not
> break applications. I think it _is_ relevant how the image is encoded.

It may be that we disagree because we have a different view of what is 
the goal of QImage and friends. To me, what matters is not the pixel 
data, but how the image looks like when I blit it.
I'm writing an image viewer using QML, and I just expect that

   Image {
     source: "file.jpg"
   }

will show me the file as it's intended to be viewed. I don't think that 
it's acceptable to require the developer to play with flags in order to 
see the image with the correct rotation.

> If the camera really wanted to put the image in the right side up, it
> should have just rotated the actual image. By default, I would expect to
> load the image as-is.

We disagree on what "as-is" means. :-) For me, EXIF information is an 
integral part of the image.
Also, sometimes the camera guesses the orientation wrong (especially 
when you shoot at the sky or at the ground), and the best way to correct 
that is to do it in a lossless way, using the EXIF rotation flag; there 
are several image viewers that allow you to do this.

Ciao,
   Alberto



More information about the Development mailing list