From a993e57f0d2ea7d9f46fad7c2f25cce3977b5065 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Sun, 5 Jan 2020 19:15:59 +0200 Subject: [PATCH] Use jpeg as thumbnail extension except for gif-s. --- .../meviz/htmlindexer/metadata/fileTypes/Picture.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/fileTypes/Picture.java b/src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/fileTypes/Picture.java index 3761024..6f74473 100755 --- a/src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/fileTypes/Picture.java +++ b/src/main/java/eu/svjatoslav/meviz/htmlindexer/metadata/fileTypes/Picture.java @@ -236,8 +236,10 @@ public class Picture extends AbstractFile { * relative to designated thumbnails directory within parent directory. */ public String getRelativeThumbnailFileName(final Dimension targetDimension) { + String thumbnailExtension = "gif".equalsIgnoreCase(getFileExtension()) ? "gif" : "jpeg"; + return FilePathParser.getFileNameWithoutExtension(fileName) + " (" - + computeThumbnailHash(targetDimension) + ")." + getFileExtension(); + + computeThumbnailHash(targetDimension) + ")." + thumbnailExtension; } @Override -- 2.20.1