Browse Source

Bugzilla#48696 version 4: Bugfix for color model in IOCA IDE structure parameter for 4- and 8-bit grayscale images.


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1175808 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-1_1rc1old
Peter Hancock 12 years ago
parent
commit
eebad9b8a3

+ 3
- 1
src/java/org/apache/fop/afp/AFPDataObjectFactory.java View File

break; break;
case 4: case 4:
case 8: case 8:
//A grayscale image
ideStruct = content.needIDEStructureParameter(); ideStruct = content.needIDEStructureParameter();
ideStruct.setBitsPerComponent(new int[] {bitsPerPixel}); ideStruct.setBitsPerComponent(new int[] {bitsPerPixel});
ideStruct.setColorModel(IDEStructureParameter.COLOR_MODEL_YCBCR);
break; break;
case 24: case 24:
ideStruct = content.needIDEStructureParameter(); ideStruct = content.needIDEStructureParameter();
throw new IllegalArgumentException("Unsupported number of bits per pixel: " throw new IllegalArgumentException("Unsupported number of bits per pixel: "
+ bitsPerPixel); + bitsPerPixel);
} }
if (imageObjectInfo.isSubtractive()) {
if (bitsPerPixel > 1 && imageObjectInfo.isSubtractive()) {
ideStruct = content.needIDEStructureParameter(); ideStruct = content.needIDEStructureParameter();
ideStruct.setSubtractive(imageObjectInfo.isSubtractive()); ideStruct.setSubtractive(imageObjectInfo.isSubtractive());
} }

+ 1
- 1
src/java/org/apache/fop/afp/ioca/IDEStructureParameter.java View File

private boolean grayCoding = false; private boolean grayCoding = false;


/** the image color model */ /** 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 */ /** the array with the number of bits/IDE for each component */
private byte[] bitsPerIDE = new byte[] {(byte)1}; //1-bit by default private byte[] bitsPerIDE = new byte[] {(byte)1}; //1-bit by default

+ 4
- 0
status.xml View File

documents. Example: the fix of marks layering will be such a case when it's done. documents. Example: the fix of marks layering will be such a case when it's done.
--> -->
<release version="FOP Trunk" date="TBD"> <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"> <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 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 level 3, the image is stored as an embedded file which has no length limit. Previously it

Loading…
Cancel
Save