From 233f87475bac6b505dcd19adaef4598803cafa29 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Fri, 24 Apr 2015 08:46:48 +0200 Subject: Always remove the alpha channel when signing PDF-A1/b dokuments from signatureimage --- .../src/main/java/at/gv/egiz/pdfas/common/utils/ImageUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pdf-as-common/src') diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/ImageUtils.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/ImageUtils.java index ab087f2c..39ebd3e0 100644 --- a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/ImageUtils.java +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/utils/ImageUtils.java @@ -57,7 +57,7 @@ public class ImageUtils { .getLogger(ImageUtils.class); public static BufferedImage removeAlphaChannel(BufferedImage src) { - if (src.getColorModel().hasAlpha()) { + //if (src.getColorModel().hasAlpha()) { BufferedImage image = new BufferedImage(src.getWidth(), src.getHeight(), BufferedImage.TYPE_INT_RGB); Graphics2D g = image.createGraphics(); @@ -65,8 +65,8 @@ public class ImageUtils { g.drawImage(src, 0, 0, null); g.dispose(); return image; - } - return src; + //} + //return src; /* * BufferedImage rgbImage = new BufferedImage(src.getWidth(), * src.getHeight(), BufferedImage.TYPE_3BYTE_BGR); for (int x = 0; x < -- cgit v1.2.3