From dea854b684fdcd37d2aa6f59709369f07ac0320c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Sto=CC=88hr?= Date: Tue, 17 May 2022 13:57:41 +0200 Subject: [PATCH] Fix blurry derivatives caused by using wrong subfile --- .../main/java/org/kitodo/imagemanagement/ImageConverter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Kitodo-ImageManagement/src/main/java/org/kitodo/imagemanagement/ImageConverter.java b/Kitodo-ImageManagement/src/main/java/org/kitodo/imagemanagement/ImageConverter.java index 1f8ad0f3409..d7318d04dc7 100644 --- a/Kitodo-ImageManagement/src/main/java/org/kitodo/imagemanagement/ImageConverter.java +++ b/Kitodo-ImageManagement/src/main/java/org/kitodo/imagemanagement/ImageConverter.java @@ -74,7 +74,9 @@ class ImageConverter { * source image to convert */ ImageConverter(URI imageFileUri) { - source = uriToPath(imageFileUri); + // Add "[0]" to the path to make sure ImageMagick only uses the "main" image and ignores other, potential subfiles like embedded thumbnails. + // Especially relevant for TIFF files. + source = uriToPath(imageFileUri) + "[0]"; } /**