[Development] Rotating JPEG images by default

Konstantin Ritt ritt.ks at gmail.com
Mon Apr 20 06:37:57 CEST 2015


I failed to find an official announcing for the EXIF-based auto-rotation of
QImage-s (correct me if I'm wrong), so it looks just like a behavioral
regression to me, nothing more.
IMO, we should revert the behavior to pre 5.4 and give the control over the
image aspects to the user, not to an arbitrary image loader.
I mean https://codereview.qt-project.org/#/c/110685/ and
https://codereview.qt-project.org/#/c/101084/ could co-operate quite nicely
to make the user think: "why my photo gets loaded rotated 90 degrees? ah,
img.sourceOrientation() == QImage::Rotated90 -->
img.transform(img.sourceOrientation())")

P.S. Also not the sample image in QTBUG-37946
<https://bugreports.qt.io/browse/QTBUG-37946> isn't auto-rotated in your
web browser (well, at least in my web browser).


Regards,
Konstantin

2015-04-17 16:23 GMT+04:00 Rainer Keller <rainer.keller at theqtcompany.com>:

> > I would like to mention one extra relevant detail. While this was
> implemented
> > for 5.4, it was not working in 5.4.0, and was only fixed for 5.4.1. So
> sofar
> > only 5.4.1 has had EXIF orientation automatically applied on JPEGs. This
> also
> > raises the question about what to do for 5.4.2?
> I actually worked, theoretically. There was a bug with the endianess
> when reading the data field. It worked when data was generated on little
> endian machines but all photo cameras are big endian.
> This means only photos taken on x86 machines would have been rotated.
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150420/0ff5cf0e/attachment.html>


More information about the Development mailing list