From efb5c51c1267b76a55981241e139bed571da27b8 Mon Sep 17 00:00:00 2001 From: Tilman Hausherr Date: Mon, 20 Jan 2025 18:09:58 +0000 Subject: [PATCH] PDFBOX-5937: avoid 0 dimension git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1923275 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/pdfbox/debugger/streampane/StreamImageView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/StreamImageView.java b/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/StreamImageView.java index a2d6c423a7c..807b306b175 100644 --- a/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/StreamImageView.java +++ b/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/StreamImageView.java @@ -99,8 +99,8 @@ JComponent getView() private Image zoomImage(BufferedImage origin, float scale, int rotation) { BufferedImage rotatedImage = ImageUtil.getRotatedImage(origin, rotation); - int resizedWidth = (int) (rotatedImage.getWidth() * scale); - int resizedHeight = (int) (rotatedImage.getHeight() * scale); + int resizedWidth = (int) Math.ceil(rotatedImage.getWidth() * scale); + int resizedHeight = (int) Math.ceil(rotatedImage.getHeight() * scale); return rotatedImage.getScaledInstance(resizedWidth, resizedHeight, Image.SCALE_SMOOTH); }