Skip to content

Commit

Permalink
Merge pull request #655 from esmero/ISSUE-593
Browse files Browse the repository at this point in the history
ISSUE-593: Fix Virtual Cropping detection condition to take both Y and X in account
  • Loading branch information
glenrobson authored Aug 14, 2024
2 parents 2bf4e4d + c2a9cb5 commit 605fbc1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public void write(BufferedImage image,
// Also, JPEG doesn't support alpha, so we have to remove that,
// otherwise readers will interpret as CMYK.
if (image.getRaster().getSampleModelTranslateX() < 0 ||
image.getRaster().getSampleModelTranslateX() < 0) {
image.getRaster().getSampleModelTranslateY() < 0) {
BufferedImage newImage = new BufferedImage(
image.getWidth(), image.getHeight(),
BufferedImage.TYPE_INT_RGB);
Expand Down

0 comments on commit 605fbc1

Please sign in to comment.