D26648: Improved quality of JPEG thumbnails

2020-01-16 Thread Nathaniel Graham
ngraham added a comment. Very nice first patch. May it be the first of many! :) REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D26648 To: chroniceel, broulik, #frameworks, #vdg, cfeck, ngraham Cc: meven, volkov, cfeck, bruns, ngraham, kde-frameworks-devel,

D26648: Improved quality of JPEG thumbnails

2020-01-16 Thread Nathaniel Graham
This revision was automatically updated to reflect the committed changes. Closed by commit R320:b18be2ed1a80: Improved quality of JPEG thumbnails (authored by chroniceel, committed by ngraham). REPOSITORY R320 KIO Extras CHANGES SINCE LAST UPDATE

D26648: Improved quality of JPEG thumbnails

2020-01-16 Thread Nathaniel Graham
ngraham added a comment. no in a comment is fine REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D26648 To: chroniceel, broulik, #frameworks, #vdg, cfeck, ngraham Cc: meven, volkov, cfeck, bruns, ngraham, kde-frameworks-devel, kfm-devel, pberestov, iasensio,

D26648: Improved quality of JPEG thumbnails

2020-01-16 Thread William Tradewell
chroniceel added a comment. wktradew...@gmail.com ... unless you wanted that in the summary? REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D26648 To: chroniceel, broulik, #frameworks, #vdg, cfeck, ngraham Cc: meven, volkov, cfeck, bruns, ngraham,

D26648: Improved quality of JPEG thumbnails

2020-01-16 Thread Nathaniel Graham
ngraham accepted this revision. ngraham added a comment. @chroniceel Can you provid an email address so we can land this patch with correct authorship information? REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D26648 To: chroniceel, broulik, #frameworks, #vdg,

D26648: Improved quality of JPEG thumbnails

2020-01-16 Thread Christoph Feck
cfeck accepted this revision. cfeck added a comment. This revision is now accepted and ready to land. Thanks for the detailed investigation, Stefan! REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D26648 To: chroniceel, broulik, #frameworks, #vdg, cfeck Cc: meven,

D26648: Improved quality of JPEG thumbnails

2020-01-16 Thread William Tradewell
chroniceel added a comment. Updated diff. It's setting the quality now, and added a brief comment. REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D26648 To: chroniceel, broulik, #frameworks, #vdg Cc: meven, volkov, cfeck, bruns, ngraham, kde-frameworks-devel,

D26648: Improved quality of JPEG thumbnails

2020-01-16 Thread William Tradewell
chroniceel updated this revision to Diff 73722. REPOSITORY R320 KIO Extras CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26648?vs=73480=73722 REVISION DETAIL https://phabricator.kde.org/D26648 AFFECTED FILES thumbnail/jpegcreator.cpp To: chroniceel, broulik, #frameworks, #vdg

D26648: Improved quality of JPEG thumbnails

2020-01-16 Thread Stefan Brüns
bruns added a comment. Having had a look at https://code.woboq.org/qt5/qtbase/src/plugins/imageformats/jpeg/qjpeghandler.cpp.html#_M/HIGH_QUALITY_THRESHOLD, the jpeg handler actually know two different quality settings, `< 50` and `> 50`, the default being 75, i.e. high. High quality

D26648: Improved quality of JPEG thumbnails

2020-01-16 Thread William Tradewell
chroniceel added a comment. Ping! I think this got buried. Unless someone else is testing this? REVISION DETAIL https://phabricator.kde.org/D26648 To: chroniceel, broulik, #frameworks, #vdg Cc: meven, volkov, cfeck, bruns, ngraham, kde-frameworks-devel, kfm-devel, pberestov, iasensio,

D26648: Improved quality of JPEG thumbnails

2020-01-14 Thread William Tradewell
chroniceel edited the summary of this revision. REVISION DETAIL https://phabricator.kde.org/D26648 To: chroniceel, broulik, #frameworks, #vdg Cc: meven, volkov, cfeck, bruns, ngraham, kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, LeGast00n, MrPepe, fbampaloukas, alexde, GB_2,

D26648: Improved quality of JPEG thumbnails

2020-01-14 Thread William Tradewell
chroniceel added a comment. It's not overly scientific, but with this little fix, it can gen ~10 thumbnails a second on my system (1.6 Ghz pentium, ~10MP). This seems on par with png files of a similar size. As far as I can tell, there is not a super huge performance decrease. Please note,

D26648: Improved quality of JPEG thumbnails

2020-01-14 Thread Stefan Brüns
bruns added a comment. In D26648#593895 , @volkov wrote: > But as I mentioned there, it doesn't really influence on the decoding speed, and it was only needed to preserve the old behavior as much as possible. Can we have some quick

D26648: Improved quality of JPEG thumbnails

2020-01-14 Thread Alexander Volkov
volkov added a comment. `imageReader.setQuality(0);` was added in https://phabricator.kde.org/R320:c249f8547f2d1913e0570d78a0240c5f8865c336 when I ported `JpegCreator` to `QImageReader`. But as I mentioned there, it doesn't really influence on the decoding speed, and it was only needed to

D26648: Improved quality of JPEG thumbnails

2020-01-14 Thread Christoph Feck
cfeck added a comment. @meven, this isn't about save quality, but load quality. REVISION DETAIL https://phabricator.kde.org/D26648 To: chroniceel, broulik, #frameworks, #vdg Cc: meven, volkov, cfeck, bruns, ngraham, kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, LeGast00n,

D26648: Improved quality of JPEG thumbnails

2020-01-14 Thread Méven Car
meven added subscribers: volkov, meven. meven added a comment. Nice first patch @chroniceel ! https://github.com/openwebos/qt/blob/master/src/gui/image/qimagereader.cpp#L1202 is the only use of quality in ImageReader, its default is -1 so it depends on its

D26648: Improved quality of JPEG thumbnails

2020-01-14 Thread Christoph Feck
cfeck added a comment. Did you time a performance difference? I think the idea was to get the downscaled result as fast as possible, by using integer IDCT instead of float IDCT, and by using only the DC coefficient instead of performing the IDCT at all for scale factors <= 1/8. REVISION

D26648: Improved quality of JPEG thumbnails

2020-01-13 Thread William Tradewell
chroniceel updated this revision to Diff 73480. chroniceel added a comment. Less is more, removing the line appears to be a solution as well. Assuming QImageReader uses sane defaults. CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26648?vs=73477=73480 REVISION DETAIL

D26648: Improved quality of JPEG thumbnails

2020-01-13 Thread William Tradewell
chroniceel added a comment. Okay, removing the line appears to have a similar effect to what I already did. I checked over on the imagecreator.cpp file, which appears to handle the thumbnailing of most other image types, and despite also using a QImageReader object, it does not call

D26648: Improved quality of JPEG thumbnails

2020-01-13 Thread William Tradewell
chroniceel edited the summary of this revision. REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D26648 To: chroniceel, broulik, #frameworks, #vdg Cc: bruns, ngraham, kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, LeGast00n, MrPepe, fbampaloukas,

D26648: Improved quality of JPEG thumbnails

2020-01-13 Thread William Tradewell
chroniceel added a comment. I'm going to delete that line and see what happens. REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D26648 To: chroniceel, broulik, #frameworks, #vdg Cc: bruns, ngraham, kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice,

D26648: Improved quality of JPEG thumbnails

2020-01-13 Thread William Tradewell
chroniceel added a comment. It appears to me that the setQuality() function is meant to, in this use case, to simply decide what downscaler to use. Higher values mean better quality downscaling. Sorry about the images, I did not realize I should have labelled them better. They are

D26648: Improved quality of JPEG thumbnails

2020-01-13 Thread William Tradewell
chroniceel added a comment. Excerpt from the QImageReader class documentation, for the function setQuality(): "In case of scaled image reading, the quality setting may also influence the tradeoff level between visual quality and execution speed of the scaling algorithm." A

D26648: Improved quality of JPEG thumbnails

2020-01-13 Thread Stefan Brüns
bruns added a comment. Unfortunately, the QImage**Reader** documentation is not very clear about the effect of `setQuality(..)`. There is a reference to `https://doc.qt.io/qt-5/qimagereader.html#setScaledSize`, and that in turn has a reference to `QImage::scale()` (which no longer exists in

D26648: Improved quality of JPEG thumbnails

2020-01-13 Thread William Tradewell
chroniceel added a comment. This does not affect the size of the created thumbnail, as all thumbnails are stored as png images regardless of source image type. This simply allows the thumbnailer to downscale the image without the artifacting displayed in the screenshots. I have checked and

D26648: Improved quality of JPEG thumbnails

2020-01-13 Thread Nathaniel Graham
ngraham added reviewers: broulik, Frameworks, VDG. ngraham added a comment. Presumably this was for space saving reasons; there's a big size difference between a 0 quality JPEG and 100 quality. Maybe set it to 80 as a compromise? These are only thumbnails, after all. We don't want to take up

D26648: Improved quality of JPEG thumbnails

2020-01-13 Thread William Tradewell
chroniceel created this revision. Herald added projects: Dolphin, Frameworks. Herald added subscribers: kfm-devel, kde-frameworks-devel. chroniceel requested review of this revision. REVISION SUMMARY BUG: 411262 Simple tweak to increase quality of JPEG thumbnails. For some reason the