Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make RAW image thumbnails much faster
Turns out that nearly all supported RAW image formats actually have embedded JPG thumbnails in them. Rather than decode to RAW then reencode, just load the thumbnail from it if it's there. Also, rotate the image based on the EXIF orientation in the thumbnail. Now creating a thumbnail from a supported RAW format takes avout 200ms instead of 10-15s. Refs #10185
- Loading branch information
Showing
10 changed files
with
169 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
#include <QImage> | ||
#include <QImageIOHandler> | ||
#include <QString> | ||
|
||
class DcrawHandler : public QImageIOHandler | ||
{ | ||
|
||
public: | ||
|
||
public: | ||
bool canRead() const; | ||
bool read(QImage *image); | ||
|
||
static int loadThumbnail(QImage *image, QString fileName); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ SOURCES += dcrawformats.cpp | |
SOURCES += dcrawhandler.cpp | ||
SOURCES += dcrawplugin.cpp | ||
|
||
QT += sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters