[Development] Rotating JPEG images by default

André Somers andre at familiesomers.nl
Wed Apr 22 08:39:36 CEST 2015


Alberto Mardegan schreef op 21-4-2015 om 17:24:
> On 04/17/2015 11:48 AM, Allan Sandfeld Jensen wrote:
>> If we go with the QImageReader level, it could be an QImageIOHandler::Option,
>> and possibly be set different between JPEG and TIFF by default. The real
>> problem is what we decide the default for JPEG should be now.
> IMHO, QImageReader default behaviour should be that of providing a
> rendered image that looks as visually correct as possible. Whether the
> orientation is encoded in the image bits or as an EXIF tag is rather
> irrelevant: the result should be that the QImage contains the image
> shown with the proper orientation.
> So, I'm very happy that this bug has been fixed.
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. 
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.

> On the other hand, since we had applications which had already
> implemented workarounds for this, we should have a way to let them know
> whether they are using a new Qt image plugin which contains this fix or not.
> Adding an orientation option to QImageIOHandler::ImageOption would be a
> possibility.
>
Yeah, but do it the other way around: make applying a rotation encoded 
in the meta data of an image optional, and make it a symetric interface 
(also provide a setter).

André




More information about the Development mailing list