From: Svjatoslav Agejenko Date: Sun, 5 Jan 2020 17:15:59 +0000 (+0200) Subject: Use jpeg as thumbnail extension except for gif-s. X-Git-Tag: meviz-1.2~12 X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=a993e57f0d2ea7d9f46fad7c2f25cce3977b5065;p=meviz.git Use jpeg as thumbnail extension except for gif-s. --- 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