From d1a9624a16d8ba5e6ef393c4a984790e44797c59 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Fri, 24 Oct 2014 14:20:54 +0200 Subject: enable Alpha Channel images --- .../pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pdf-as-pdfbox/src/main/java/at') diff --git a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java index 2b587d72..927469b1 100644 --- a/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java +++ b/pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java @@ -596,7 +596,8 @@ public class PDFAsVisualSignatureBuilder extends PDVisibleSigBuilder { logger.debug("Scaling image to: " + iwidth + " x " + iheight); - if (img.getColorModel().hasAlpha()) { + if (img.getAlphaRaster() == null && + img.getColorModel().hasAlpha()) { img = ImageUtils.removeAlphaChannel(img); } //img = ImageUtils.convertRGBAToIndexed(img); -- cgit v1.2.3