Accelerate thumnailgenerator when loading RAW files
ClosedPublic

Authored by tommo on May 19 2019, 8:32 AM.

Details

Summary

This removes a useless call to QImage::loadFromData() that speeds up the thumbnail generation for RAW files. Its only purpose was to look up the size of the embedded preview image which is useless because

  • RAWs have an embedded thumbnail which will be preferred to the embedded preview image (provided the thumb is available and big enough), and
  • if the embedded thumbnail cannot be used, QImageReader::read() will decode the embedded preview image again, check its size, scale it, etc..

Also removes a redundant comparison against MIN_PREV_SIZE as this is already assured with pixelSize.

Diff Detail

Repository
R260 Gwenview
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
tommo requested review of this revision.May 19 2019, 8:32 AM
tommo created this revision.
tommo edited the summary of this revision. (Show Details)
tommo edited the summary of this revision. (Show Details)
tommo edited the summary of this revision. (Show Details)May 19 2019, 8:36 AM
tommo edited the summary of this revision. (Show Details)May 23 2019, 6:49 AM
ngraham accepted this revision.May 24 2019, 3:51 PM
This revision is now accepted and ready to land.May 24 2019, 3:51 PM
This revision was automatically updated to reflect the committed changes.