diff --git a/pom.xml b/pom.xml index e8af8dc..f425fd0 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.orsonpdf orsonpdf 1.8 - jar + bundle OrsonPDF http://www.object-refinery.com/orsonpdf @@ -64,6 +64,14 @@ ${project.build.sourceEncoding} + + org.apache.felix + maven-bundle-plugin + 3.3.0 + true + + + diff --git a/src/main/java/com/orsonpdf/PDFGraphics2D.java b/src/main/java/com/orsonpdf/PDFGraphics2D.java index 797dad3..ebd1793 100644 --- a/src/main/java/com/orsonpdf/PDFGraphics2D.java +++ b/src/main/java/com/orsonpdf/PDFGraphics2D.java @@ -1234,8 +1234,13 @@ public boolean drawImage(Image img, AffineTransform xform, */ @Override public void drawImage(BufferedImage img, BufferedImageOp op, int x, int y) { - BufferedImage imageToDraw = op.filter(img, null); - drawImage(imageToDraw, new AffineTransform(1f, 0f, 0f, 1f, x, y), null); + BufferedImage imageToDraw; + if (op != null) + imageToDraw = op.filter(img, null); + else + imageToDraw = img; + + drawImage(imageToDraw, new AffineTransform(1f, 0f, 0f, 1f, x, y), null); } /**