<table><tr><td style="">bruns added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D26648">View Revision</a></tr></table><br /><div><div><p>Having had a look at <a href="https://code.woboq.org/qt5/qtbase/src/plugins/imageformats/jpeg/qjpeghandler.cpp.html#_M/HIGH_QUALITY_THRESHOLD" class="remarkup-link" target="_blank" rel="noreferrer">https://code.woboq.org/qt5/qtbase/src/plugins/imageformats/jpeg/qjpeghandler.cpp.html#_M/HIGH_QUALITY_THRESHOLD</a>, the jpeg handler actually know two different quality settings, <tt style="background: #ebebeb; font-size: 13px;">< 50</tt> and <tt style="background: #ebebeb; font-size: 13px;">> 50</tt>, the default being 75, i.e. high.</p>

<p>High quality means floating point DCT and bilinear upsampling (Qt::SmoothTransformation), while low means IDCT and nearest neighbor upsampling.</p>

<p><a href="https://code.woboq.org/qt5/qtbase/src/plugins/imageformats/jpeg/qjpeghandler.cpp.html#337" class="remarkup-link" target="_blank" rel="noreferrer">https://code.woboq.org/qt5/qtbase/src/plugins/imageformats/jpeg/qjpeghandler.cpp.html#337</a><br />
<a href="https://code.woboq.org/qt5/qtbase/src/plugins/imageformats/jpeg/qjpeghandler.cpp.html#432" class="remarkup-link" target="_blank" rel="noreferrer">https://code.woboq.org/qt5/qtbase/src/plugins/imageformats/jpeg/qjpeghandler.cpp.html#432</a></p>

<p>In either case, it uses libjpeg's capability to reconstruct smaller versions of the image, only decoding it partially, up to DC components only (i.e. 1/8 scale). So for a 24MPixel (6000x4000), libjpeg returns a 750x500 Pixel image, which is then downscaled by Qimage to 256x171 Pixel. Using SmoothTransformation for this size should be not to heavy.</p>

<p><a href="https://code.woboq.org/qt5/qtbase/src/plugins/imageformats/jpeg/qjpeghandler.cpp.html#297" class="remarkup-link" target="_blank" rel="noreferrer">https://code.woboq.org/qt5/qtbase/src/plugins/imageformats/jpeg/qjpeghandler.cpp.html#297</a></p>

<p>I think best is to set the quality explicitly and mention in a comment what intended effect the setting has (so if the jpeghandler behavior changes, the code can be adjusted to have the wanted effect).</p></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D26648">https://phabricator.kde.org/D26648</a></div></div><br /><div><strong>To: </strong>chroniceel, broulik, Frameworks, VDG<br /><strong>Cc: </strong>meven, volkov, cfeck, bruns, ngraham, kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, LeGast00n, MrPepe, fbampaloukas, alexde, GB_2, Codezela, feverfew, michaelh, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov<br /></div>