summaryrefslogtreecommitdiffstats
path: root/core/qthelper.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-04-29 23:07:05 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-05-13 13:52:35 -0700
commit6618c9ebfc6a7cebbef687fcb3aa74c70f504ff2 (patch)
treefcb8930645e83c79236bb5a5a0b0a77bf0210f6e /core/qthelper.h
parentc0bca3ad04762a7178bda37be4c2ed87ae7e5f4e (diff)
downloadsubsurface-6618c9ebfc6a7cebbef687fcb3aa74c70f504ff2.tar.gz
Dive pictures: save thumbnails to individual files
The old code loaded all thumbnails into memory at once. This does not scale to logs with thousands of pictures. Therefore, save the pictures to individual files and only load the currently needed pictures. Currently, this will make changing switching between dives slower, because the thumbnails are loaded from disk. In the future, it is planned to do this in a background thread without blocking the user interface. A notable difference to the old code: Thumbnails are now indexed by the image-hash (i.e. the content of the raw image) and not by the filename of the image. Thus, different paths to the same image should only be saved once. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/qthelper.h')
-rw-r--r--core/qthelper.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/qthelper.h b/core/qthelper.h
index 4c0dcda66..ac1de4df8 100644
--- a/core/qthelper.h
+++ b/core/qthelper.h
@@ -30,6 +30,7 @@ void write_hashes();
void updateHash(struct picture *picture);
QByteArray hashFile(const QString &filename);
QString hashString(const char *filename);
+QString thumbnailFileName(const QString &filename);
void learnImages(const QDir dir, int max_recursions);
void add_hash(const QString &filename, const QByteArray &hash);
void hashPicture(struct picture *picture);