From 25dc4762b419a6b09d17d9055b1f75e4b531458a Mon Sep 17 00:00:00 2001 From: Phil Race Date: Thu, 7 Dec 2023 23:33:56 +0000 Subject: [PATCH] 8286827: BogusColorSpace methods return wrong array Reviewed-by: bpb, serb --- .../com/sun/imageio/plugins/common/BogusColorSpace.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java.desktop/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java b/src/java.desktop/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java index a62008dfbd4..5a064f4f4c5 100644 --- a/src/java.desktop/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java +++ b/src/java.desktop/share/classes/com/sun/imageio/plugins/common/BogusColorSpace.java @@ -90,7 +90,7 @@ public class BogusColorSpace extends ColorSpace { System.arraycopy(colorvalue, 0, rgbvalue, 0, Math.min(3, getNumComponents())); - return colorvalue; + return rgbvalue; } public float[] fromRGB(float[] rgbvalue) { @@ -104,7 +104,7 @@ public class BogusColorSpace extends ColorSpace { System.arraycopy(rgbvalue, 0, colorvalue, 0, Math.min(3, colorvalue.length)); - return rgbvalue; + return colorvalue; } public float[] toCIEXYZ(float[] colorvalue) { @@ -118,7 +118,7 @@ public class BogusColorSpace extends ColorSpace { System.arraycopy(colorvalue, 0, xyzvalue, 0, Math.min(3, getNumComponents())); - return colorvalue; + return xyzvalue; } public float[] fromCIEXYZ(float[] xyzvalue) { @@ -132,6 +132,6 @@ public class BogusColorSpace extends ColorSpace { System.arraycopy(xyzvalue, 0, colorvalue, 0, Math.min(3, colorvalue.length)); - return xyzvalue; + return colorvalue; } }