You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ph...@apache.org on 2011/09/26 13:43:38 UTC

svn commit: r1175808 - in /xmlgraphics/fop/trunk: src/java/org/apache/fop/afp/AFPDataObjectFactory.java src/java/org/apache/fop/afp/ioca/IDEStructureParameter.java status.xml

Author: phancock
Date: Mon Sep 26 11:43:38 2011
New Revision: 1175808

URL: http://svn.apache.org/viewvc?rev=1175808&view=rev
Log:
Bugzilla#48696 version 4: Bugfix for color model in IOCA IDE structure parameter for 4- and 8-bit grayscale images.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPDataObjectFactory.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ioca/IDEStructureParameter.java
    xmlgraphics/fop/trunk/status.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPDataObjectFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPDataObjectFactory.java?rev=1175808&r1=1175807&r2=1175808&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPDataObjectFactory.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPDataObjectFactory.java Mon Sep 26 11:43:38 2011
@@ -124,8 +124,10 @@ public class AFPDataObjectFactory {
             break;
         case 4:
         case 8:
+            //A grayscale image
             ideStruct = content.needIDEStructureParameter();
             ideStruct.setBitsPerComponent(new int[] {bitsPerPixel});
+            ideStruct.setColorModel(IDEStructureParameter.COLOR_MODEL_YCBCR);
             break;
         case 24:
             ideStruct = content.needIDEStructureParameter();
@@ -139,7 +141,7 @@ public class AFPDataObjectFactory {
             throw new IllegalArgumentException("Unsupported number of bits per pixel: "
                     + bitsPerPixel);
         }
-        if (imageObjectInfo.isSubtractive()) {
+        if (bitsPerPixel > 1 && imageObjectInfo.isSubtractive()) {
             ideStruct = content.needIDEStructureParameter();
             ideStruct.setSubtractive(imageObjectInfo.isSubtractive());
         }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ioca/IDEStructureParameter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ioca/IDEStructureParameter.java?rev=1175808&r1=1175807&r2=1175808&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ioca/IDEStructureParameter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ioca/IDEStructureParameter.java Mon Sep 26 11:43:38 2011
@@ -46,7 +46,7 @@ public class IDEStructureParameter imple
     private boolean grayCoding = false;
 
     /** the image color model */
-    private byte colorModel = COLOR_MODEL_YCRCB;
+    private byte colorModel = COLOR_MODEL_RGB;
 
     /** the array with the number of bits/IDE for each component */
     private byte[] bitsPerIDE = new byte[] {(byte)1}; //1-bit by default

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=1175808&r1=1175807&r2=1175808&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Mon Sep 26 11:43:38 2011
@@ -60,6 +60,10 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     -->
     <release version="FOP Trunk" date="TBD">
+      <action context="Fonts" dev="PH" type="fix" fixes-bug="48696">
+        Bugfix for color model in IOCA IDE structure parameter for 4- and 8-bit grayscale images.
+        Revision 4.
+      </action>
       <action context="Fonts" dev="PH" type="fix" fixes-bug="51760" due-to="Mehdi Houshmand">
         Changes the way PostScript handles Graphics2D images such that if the language is set to
         level 3, the image is stored as an embedded file which has no length limit.  Previously it



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org