diff options
Diffstat (limited to 'pdf-as-pdfbox')
-rw-r--r-- | pdf-as-pdfbox/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/pdfbox/PDFAsVisualSignatureBuilder.java | 3 |
1 files changed, 2 insertions, 1 deletions
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); |