diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2009-11-23 11:55:04 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2009-11-23 11:55:04 +0000 |
commit | 62581cef4223490f296b3fae8dd3693aed146389 (patch) | |
tree | 469a4a82c1aa63520cf23930bd3f8b846219719e | |
parent | c161b98d6d5e129705cd51e28ac912508771076e (diff) | |
download | xmlgraphics-fop-62581cef4223490f296b3fae8dd3693aed146389.tar.gz xmlgraphics-fop-62581cef4223490f296b3fae8dd3693aed146389.zip |
Bugzilla #48185: rounding error when computing the CMYK components of a color, in the AFP output.
Patch submitted by Harald G. Henne (initially in Bugzilla #48167)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@883314 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java | 2 | ||||
-rw-r--r-- | status.xml | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java b/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java index 40adb5ed8..e583b81e6 100644 --- a/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java +++ b/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java @@ -329,7 +329,7 @@ public abstract class PtocaBuilder implements PtocaConstants { float[] comps = col.getColorComponents(null); assert comps.length == 4; for (int i = 0; i < 4; i++) { - int component = Math.round(comps[i] * 256); + int component = Math.round(comps[i] * 255); writeByte(component); } } else { diff --git a/status.xml b/status.xml index 9ca9b0c01..6cdef021f 100644 --- a/status.xml +++ b/status.xml @@ -58,6 +58,9 @@ documents. Example: the fix of marks layering will be such a case when it's done. --> <release version="FOP Trunk" date="TBD"> + <action context="Renderers" dev="VH" type="fix" fixes-bug="48185" due-to="Harald G. Henne"> + Bugfix in AFP output: rounding error when computing the CMYK components of a color. + </action> <action context="Code" dev="VH" type="fix" fixes-bug="48167" due-to="Venkat Reddy"> Bugfix: when #CMYK pseudo-profile was used in the rgb-icc() function, always the fallback RGB colors were used instead. |