Accelerate thumnailgenerator when loading RAW files

Authored by tommo on May 24 2019, 3:48 PM.

Description

Accelerate thumnailgenerator when loading RAW files

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.

Reviewers: Gwenview, ngraham

Reviewed By: Gwenview, ngraham

Subscribers: ngraham, Gwenview

Tags: Gwenview

Differential Revision: https://phabricator.kde.org/D21284

Details

Committed
ngrahamMay 24 2019, 3:51 PM
Reviewer
Gwenview
Differential Revision
D21284: Accelerate thumnailgenerator when loading RAW files
Parents
R260:53105ea9938d: Remove redundant QImage::loadFromData()
Branches
Unknown
Tags
Unknown