[OpenJDK 2D-Dev] RFR: 8263622: The java.awt.color.ICC_Profile#setData invert the order of bytes for the "head" tag
Sergey Bylokhov
serb at openjdk.java.net
Tue Mar 16 21:44:28 UTC 2021
On Tue, 16 Mar 2021 20:08:59 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
> The root cause is using the wrong endian, the ICC profile uses big-endian notation. We even have special methods to convert the data, but for some reason, their usage was dropped in the JDK-6523398.
src/java.desktop/share/native/liblcms/LCMS.c line 46:
> 44: ((int) SigMake ((a), (b), (c), (d)))
> 45:
> 46: #define SigHead TagIdConst('h','e','a','d')
The logic of this method is the same as _cmsAdjustEndianess32 from the "lcms2_plugin.h"
https://github.com/openjdk/jdk/blob/9cb9af68659eaa60c9523c23a85ea37af57a5280/src/java.desktop/share/native/liblcms/cmsplugin.c#L87
-------------
PR: https://git.openjdk.java.net/jdk/pull/3037
More information about the 2d-dev
mailing list