Skip to content

Commit

Permalink
PDFBOX-5937: avoid 0 dimension
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1923275 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Jan 20, 2025
1 parent 9c7b962 commit efb5c51
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit efb5c51

Please sign in to comment.