From 62581cef4223490f296b3fae8dd3693aed146389 Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Mon, 23 Nov 2009 11:55:04 +0000 Subject: [PATCH] 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 --- src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java | 2 +- status.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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. --> + + Bugfix in AFP output: rounding error when computing the CMYK components of a color. + Bugfix: when #CMYK pseudo-profile was used in the rgb-icc() function, always the fallback RGB colors were used instead. -- 2.39.5