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 1/2] 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]"; } /** From c219cf084af9647ba9be6b0737199822fa165877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6hr?= Date: Mon, 18 Mar 2024 16:15:58 +0100 Subject: [PATCH 2/2] Fix comment line length --- .../main/java/org/kitodo/imagemanagement/ImageConverter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 d7318d04dc7..702621e5f84 100644 --- a/Kitodo-ImageManagement/src/main/java/org/kitodo/imagemanagement/ImageConverter.java +++ b/Kitodo-ImageManagement/src/main/java/org/kitodo/imagemanagement/ImageConverter.java @@ -74,8 +74,8 @@ class ImageConverter { * source image to convert */ ImageConverter(URI 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. + // 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]"; }