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 means floating point DCT and bilinear upsampling 
(Qt::SmoothTransformation), while low means IDCT and nearest neighbor 
upsampling.
  
  
https://code.woboq.org/qt5/qtbase/src/plugins/imageformats/jpeg/qjpeghandler.cpp.html#337
  
https://code.woboq.org/qt5/qtbase/src/plugins/imageformats/jpeg/qjpeghandler.cpp.html#432
  
  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.
  
  
https://code.woboq.org/qt5/qtbase/src/plugins/imageformats/jpeg/qjpeghandler.cpp.html#297
  
  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).

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, 
Codezela, feverfew, michaelh, spoorun, navarromorales, firef, andrebarros, 
emmanuelp, mikesomov

Reply via email to