aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java')
-rw-r--r--src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java b/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java
index b956d8264..66915ec2d 100644
--- a/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java
+++ b/src/java/org/apache/fop/render/afp/AFPImageHandlerRenderedImage.java
@@ -105,13 +105,15 @@ public class AFPImageHandlerRenderedImage extends AFPImageHandler {
if (BitmapImageUtil.getColorIndexSize(renderedImage) > 2) {
directEncode = false; //Lookup tables are not implemented, yet
}
- if (BitmapImageUtil.isMonochromeImage(renderedImage)
- && BitmapImageUtil.isZeroBlack(renderedImage)) {
- directEncode = false; //Passing additive/subtractive info not implemented, yet
- }
if (directEncode) {
log.debug("Encoding image directly...");
imageObjectInfo.setBitsPerPixel(encodedColorModel.getPixelSize());
+ if (BitmapImageUtil.isMonochromeImage(renderedImage)
+ && !BitmapImageUtil.isZeroBlack(renderedImage)) {
+ log.trace("set subtractive mode");
+ imageObjectInfo.setSubtractive(true);
+ }
+
helper.encode(baos);
imageData = baos.toByteArray();
}