From 678a9bc4636a2589e7fc32a7d23d08c852b391c0 Mon Sep 17 00:00:00 2001 From: "stirlingbot[bot]" <195170888+stirlingbot[bot]@users.noreply.github.com> Date: Fri, 8 Aug 2025 15:53:45 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20format=20everything=20with=20pre?= =?UTF-8?q?-commit=20by=20stirlingbot=20(#4150)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Auto-generated by [create-pull-request][1] with **stirlingbot** [1]: https://github.com/peter-evans/create-pull-request Signed-off-by: stirlingbot[bot] Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com> --- .../software/common/util/ImageProcessingUtils.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/common/src/main/java/stirling/software/common/util/ImageProcessingUtils.java b/app/common/src/main/java/stirling/software/common/util/ImageProcessingUtils.java index fd4091d4c..7140b3cc2 100644 --- a/app/common/src/main/java/stirling/software/common/util/ImageProcessingUtils.java +++ b/app/common/src/main/java/stirling/software/common/util/ImageProcessingUtils.java @@ -120,7 +120,7 @@ public class ImageProcessingUtils { throws IOException { BufferedImage image = null; String filename = file.getOriginalFilename(); - + if (filename != null && filename.toLowerCase().endsWith(".psd")) { // For PSD files, try explicit ImageReader Iterator readers = ImageIO.getImageReadersByFormatName("PSD"); @@ -134,18 +134,20 @@ public class ImageProcessingUtils { } } if (image == null) { - throw new IOException("Unable to read image from file: " + filename + - ". Supported PSD formats: RGB/CMYK/Gray 8-32 bit, RLE/ZIP compression"); + throw new IOException( + "Unable to read image from file: " + + filename + + ". Supported PSD formats: RGB/CMYK/Gray 8-32 bit, RLE/ZIP compression"); } } else { // For non-PSD files, use standard ImageIO image = ImageIO.read(file.getInputStream()); } - + if (image == null) { throw new IOException("Unable to read image from file: " + filename); } - + double orientation = extractImageOrientation(file.getInputStream()); return applyOrientation(image, orientation); }