Re: [Development] Rotating JPEG images by default

2015-04-23 Thread Allan Sandfeld Jensen
On Thursday 23 April 2015, Alberto Mardegan wrote: > On 04/23/2015 02:34 PM, André Somers wrote: > > What is the problem with using > > > > Image { > > > > source: "someImage.jpg" > > autorotate: true > > > > } > > > > Again: note that QImage != QML Image > > > > I don't like global

Re: [Development] Rotating JPEG images by default

2015-04-23 Thread Konstantin Ritt
Just FYI, http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/ http://webmasters.stackexchange.com/questions/16684/ipad-and-iphone-browser-rotating-images-on-site (note that OS from Apple is a bit "special") and the CSS3 working group discussion: http://lists.w3.or

Re: [Development] Rotating JPEG images by default

2015-04-23 Thread Konstantin Ritt
2015-04-23 16:04 GMT+04:00 Alberto Mardegan : > On 04/23/2015 02:34 PM, André Somers wrote: > > What is the problem with using > > > > Image { > > source: "someImage.jpg" > > autorotate: true > > } > > > > Again: note that QImage != QML Image > > > > I don't like globals if they can be

Re: [Development] Rotating JPEG images by default

2015-04-23 Thread Alberto Mardegan
On 04/23/2015 02:34 PM, André Somers wrote: > What is the problem with using > > Image { > source: "someImage.jpg" > autorotate: true > } > > Again: note that QImage != QML Image > > I don't like globals if they can be avoided. In this case, I think they can. I could certainly live with

Re: [Development] Rotating JPEG images by default

2015-04-23 Thread Gunnar Sletta
> On 23 Apr 2015, at 13:20, Alberto Mardegan > wrote: > > On 04/23/2015 01:36 PM, Gunnar Sletta wrote: >> I think we should strive to not introduce regressions on purpose. Hence: >> - Revert the behavioral change in 5.4 which adds rotation to JPEGs >> - Have opt-in rotation in QImageReader. >

Re: [Development] Rotating JPEG images by default

2015-04-23 Thread André Somers
Alberto Mardegan schreef op 23-4-2015 om 13:20: > On 04/23/2015 01:36 PM, Gunnar Sletta wrote: >> I think we should strive to not introduce regressions on purpose. Hence: >>- Revert the behavioral change in 5.4 which adds rotation to JPEGs >>- Have opt-in rotation in QImageReader. >>- K

Re: [Development] Rotating JPEG images by default

2015-04-23 Thread Alberto Mardegan
On 04/23/2015 01:36 PM, Gunnar Sletta wrote: > I think we should strive to not introduce regressions on purpose. Hence: > - Revert the behavioral change in 5.4 which adds rotation to JPEGs > - Have opt-in rotation in QImageReader. > - Keep TIFF rotation as it is (and change it to the Qt-wide

Re: [Development] Rotating JPEG images by default

2015-04-23 Thread Gunnar Sletta
I think we should strive to not introduce regressions on purpose. Hence: - Revert the behavioral change in 5.4 which adds rotation to JPEGs - Have opt-in rotation in QImageReader. - Keep TIFF rotation as it is (and change it to the Qt-wide default for Qt 6) Anything else will cause us a lot of

Re: [Development] Rotating JPEG images by default

2015-04-23 Thread Allan Sandfeld Jensen
On Thursday 23 April 2015, Alberto Mardegan wrote: > On 04/23/2015 04:53 AM, Konstantin Ritt wrote: > > We already have a complete solution - > > https://codereview.qt-project.org/110685 > > That looks good. > > > All we need now is to fix the behavioral regression introduced in 5.4. > > But if

Re: [Development] Rotating JPEG images by default

2015-04-23 Thread Alberto Mardegan
On 04/23/2015 04:53 AM, Konstantin Ritt wrote: > We already have a complete solution - > https://codereview.qt-project.org/110685 That looks good. > All we need now is to fix the behavioral regression introduced in 5.4. But if I understand the code correctly, the fix above gives developers an o

Re: [Development] Rotating JPEG images by default

2015-04-22 Thread André Somers
Alberto Mardegan schreef op 22-4-2015 om 13:32: > > 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

Re: [Development] Rotating JPEG images by default

2015-04-22 Thread Konstantin Ritt
> > On Thursday, 23 April 2015 00:11:23 CEST, Alberto Mardegan wrote: > > as long as the behaviour was configurable with a single line > > change (a static method on QGuiApplication, maybe?). > Stop polluting QGuiApplication! Seriously. We already have a complete solution - https://codereview.qt-

Re: [Development] Rotating JPEG images by default

2015-04-22 Thread Jan Kundrát
On Thursday, 23 April 2015 00:11:23 CEST, Alberto Mardegan wrote: > as long as the behaviour was configurable with a single line > change (a static method on QGuiApplication, maybe?). That means that you will have to patch all libraries which care about this option and which you're using at the

Re: [Development] Rotating JPEG images by default

2015-04-22 Thread Alberto Mardegan
On 04/22/2015 09:54 PM, André Pönitz wrote: > However, we do have context here, namely existing behaviour in Qt 5.x, > as well as certain general promises given for changes between Qt 5.x and > Qt 5.(x+1). I see it as a long standing bug which finally got fixed. But the problem is that the behavi

Re: [Development] Rotating JPEG images by default

2015-04-22 Thread André Pönitz
On Wed, Apr 22, 2015 at 02:32:51PM +0300, Alberto Mardegan wrote: > On 04/22/2015 09:39 AM, André Somers wrote: > > I'm with Konstatin on this one: I am, too. > > 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

Re: [Development] Rotating JPEG images by default

2015-04-22 Thread Konstantin Ritt
Konstantin 2015-04-22 15:32 GMT+04:00 Alberto Mardegan : > 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

Re: [Development] Rotating JPEG images by default

2015-04-22 Thread Иван Комиссаров
I think, there should be an option in Image item to use autorotation or not 2015-04-22 14:32 GMT+03:00 Alberto Mardegan : > 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

Re: [Development] Rotating JPEG images by default

2015-04-22 Thread Alberto Mardegan
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 _i

Re: [Development] Rotating JPEG images by default

2015-04-21 Thread André Somers
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 defaul

Re: [Development] Rotating JPEG images by default

2015-04-21 Thread Alberto Mardegan
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

Re: [Development] Rotating JPEG images by default

2015-04-19 Thread Konstantin Ritt
And to be honest, I don't like the QImage::orientation() API addition w/o providing setOrientation() and a respective code code in the image writer to store orientation as metadata (when possible). `QImage img(sourcePath); img = img.scaled(img.width() / 2, mg.height() / 2); img.save(destPath);` sho

Re: [Development] Rotating JPEG images by default

2015-04-19 Thread Konstantin Ritt
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 arbitra

Re: [Development] Rotating JPEG images by default

2015-04-17 Thread Rainer Keller
> 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 actua

Re: [Development] Rotating JPEG images by default

2015-04-17 Thread Allan Sandfeld Jensen
On Friday 17 April 2015, Rainer Keller wrote: > Hi, > > there was a change to introduce handling of exif orientation when > loading JPEG images. > Two bugreports complaining Qt is not handling image orientation caused > me to fix this. But now we got bugreports claiming the opposite. > > In my op

Re: [Development] Rotating JPEG images by default

2015-04-17 Thread Rutledge Shawn
On 17 Apr 2015, at 12:10, Allan Sandfeld Jensen wrote: > On Friday 17 April 2015, Sorvig Morten wrote: >>> On 17 Apr 2015, at 10:48, Allan Sandfeld Jensen wrote: >>> >>> >>> Ideally the orientation could also be kept as metadata in QImage. >> >> I’d like to see general metadata support in QI

Re: [Development] Rotating JPEG images by default

2015-04-17 Thread Allan Sandfeld Jensen
On Friday 17 April 2015, Sorvig Morten wrote: > > On 17 Apr 2015, at 10:48, Allan Sandfeld Jensen wrote: > > > > > > Ideally the orientation could also be kept as metadata in QImage. > > I’d like to see general metadata support in QImage. The closest thing we > have seems to be QImage::text(),

Re: [Development] Rotating JPEG images by default

2015-04-17 Thread Olivier Goffart
On Friday 17. April 2015 11:37:52 Friedemann Kleint wrote: > Hi, > > >>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 no

Re: [Development] Rotating JPEG images by default

2015-04-17 Thread Sorvig Morten
> On 17 Apr 2015, at 10:48, Allan Sandfeld Jensen wrote: > > > Ideally the orientation could also be kept as metadata in QImage. I’d like to see general metadata support in QImage. The closest thing we have seems to be QImage::text(), which supports QString data only. My specific use case se

Re: [Development] Rotating JPEG images by default

2015-04-17 Thread Friedemann Kleint
Hi, >>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. Can we add an API making this settable until the beta? - I think autom

Re: [Development] Rotating JPEG images by default

2015-04-17 Thread Allan Sandfeld Jensen
On Friday 17 April 2015, Agocs Laszlo wrote: > The difference to formats like TIFF is unfortunate. Ideally none of the > image plugins should apply such smartness automatically (there can be > other use cases where we want the pixels as in the file, not everything is > a photo viewer application).

Re: [Development] Rotating JPEG images by default

2015-04-17 Thread Rainer Keller
> Which bug reports are we talking about? https://bugreports.qt.io/browse/QTBUG-37946 https://bugreports.qt.io/browse/QTBUG-45552 ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development

Re: [Development] Rotating JPEG images by default

2015-04-17 Thread Agocs Laszlo
aszlo From: development-bounces+laszlo.agocs=theqtcompany@qt-project.org on behalf of Rainer Keller Sent: Friday, April 17, 2015 9:10 AM To: development@qt-project.org Subject: [Development] Rotating JPEG images by default Hi, there was a chan

[Development] Rotating JPEG images by default

2015-04-17 Thread Rainer Keller
Hi, there was a change to introduce handling of exif orientation when loading JPEG images. Two bugreports complaining Qt is not handling image orientation caused me to fix this. But now we got bugreports claiming the opposite. In my opinion the orientation information is an essential part of the