aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/afp/modca/ImageObject.java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2009-02-03 16:28:21 +0000
committerJeremias Maerki <jeremias@apache.org>2009-02-03 16:28:21 +0000
commit46334ec875bcbbd0fba0370a62c8446c2a038f12 (patch)
tree3c93767c51188ce2f3c7b680607288f9d4abeb6a /src/java/org/apache/fop/afp/modca/ImageObject.java
parent68c5f3f3247622b7ea102f42cdeaf481a33579d7 (diff)
parent34856199208b84891a449d0d97fd11e0803f8e8f (diff)
downloadxmlgraphics-fop-46334ec875bcbbd0fba0370a62c8446c2a038f12.tar.gz
xmlgraphics-fop-46334ec875bcbbd0fba0370a62c8446c2a038f12.zip
Merge from Trunk revisions 735029 - 740275.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@740340 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/afp/modca/ImageObject.java')
-rw-r--r--src/java/org/apache/fop/afp/modca/ImageObject.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/afp/modca/ImageObject.java b/src/java/org/apache/fop/afp/modca/ImageObject.java
index b11d478cc..bbbc25bea 100644
--- a/src/java/org/apache/fop/afp/modca/ImageObject.java
+++ b/src/java/org/apache/fop/afp/modca/ImageObject.java
@@ -28,13 +28,14 @@ import org.apache.fop.afp.AFPDataObjectInfo;
import org.apache.fop.afp.AFPImageObjectInfo;
import org.apache.fop.afp.Factory;
import org.apache.fop.afp.ioca.ImageSegment;
+import org.apache.fop.afp.modca.triplets.MappingOptionTriplet;
/**
* An IOCA Image Data Object
*/
public class ImageObject extends AbstractDataObject {
- private static final int MAX_DATA_LEN = 32759;
+ private static final int MAX_DATA_LEN = 8192;
/** the image segment */
private ImageSegment imageSegment = null;
@@ -73,7 +74,12 @@ public class ImageObject extends AbstractDataObject {
int dataHeightRes = imageObjectInfo.getDataWidthRes();
ImageDataDescriptor imageDataDescriptor
= factory.createImageDataDescriptor(dataWidth, dataHeight, dataWidthRes, dataHeightRes);
+ if (imageObjectInfo.getBitsPerPixel() == 1) {
+ imageDataDescriptor.setFunctionSet(ImageDataDescriptor.FUNCTION_SET_FS10);
+ }
getObjectEnvironmentGroup().setDataDescriptor(imageDataDescriptor);
+ getObjectEnvironmentGroup().setMapImageObject(
+ new MapImageObject(MappingOptionTriplet.SCALE_TO_FILL));
getImageSegment().setImageSize(dataWidth, dataHeight, dataWidthRes, dataHeightRes);
}