RFR: 8288633: The ICC_ColorSpace.fromCIEXYZ method uses the wrong rendering intent [v2]
Phil Race
prr at openjdk.org
Sun Jul 17 23:25:06 UTC 2022
On Thu, 23 Jun 2022 06:12:37 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> The specification of the ICC_ColorSpace.fromCIEXYZ method [says](https://github.com/openjdk/jdk/blob/9d4b25e7888098a866ff980e37b8d16d456906d8/src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java#L428):
>>
>>> * This method transforms color values using relative colorimetry, as defined by the ICC Specification.
>>
>> The LCMS plugin implementation expects the rendering intent in the first part of transform:
>> https://github.com/openjdk/jdk/blob/9d4b25e7888098a866ff980e37b8d16d456906d8/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java#L116
>>
>> But the ICC_ColorSpace.fromCIEXYZ pass "ICC_Profile.icRelativeColorimetric" to the [second ](https://github.com/openjdk/jdk/blob/9d4b25e7888098a866ff980e37b8d16d456906d8/src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java#L534) part of transform.
>>
>> Note that ICC_ColorSpace.toCIEXYZ has a similar [specification ](https://github.com/openjdk/jdk/blob/9d4b25e7888098a866ff980e37b8d16d456906d8/src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java#L288)is implemented [properly](https://github.com/openjdk/jdk/blob/9d4b25e7888098a866ff980e37b8d16d456906d8/src/java.desktop/share/classes/java/awt/color/ICC_ColorSpace.java#L391).
>
> Sergey Bylokhov has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - Merge branch 'openjdk:master' into JDK-8288633
> - Update ICC_ColorSpace.java
> - 8288633: The ICC_ColorSpace.fromCIEXYZ method uses the wrong rendering intent
Marked as reviewed by prr (Reviewer).
test/jdk/java/awt/color/ICC_ColorSpace/ToFromCIEXYZRoundTrip.java line 3:
> 1: /*
> 2: * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
> 3: * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2022 ?
-------------
PR: https://git.openjdk.org/jdk/pull/9194
More information about the client-libs-dev
mailing list