Commit ea6c8c39 by Antti Tönkyrä

cutoff for h|w > 1024 when printing..

1 parent dc7c9993
...@@ -107,6 +107,9 @@ public class CardPrintBean implements CardPrintBeanLocal { ...@@ -107,6 +107,9 @@ public class CardPrintBean implements CardPrintBeanLocal {
.read(new ByteArrayInputStream(user.getCurrentImage() .read(new ByteArrayInputStream(user.getCurrentImage()
.getImageData())); .getImageData()));
if(faceBufferedImage.getWidth() > 1024 || faceBufferedImage.getHeight() > 1024) {
throw new Exception("Image dimensions too large, please take/upload smaller!");
}
int originalWidth = faceBufferedImage.getWidth(); int originalWidth = faceBufferedImage.getWidth();
int originalHeight = faceBufferedImage.getHeight(); int originalHeight = faceBufferedImage.getHeight();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!