[OpenJDK 2D-Dev] RFR: 8263622: The java.awt.color.ICC_Profile#setData invert the order of bytes for the "head" tag
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)))
> 46: #define SigHead TagIdConst('h','e','a','d')
The logic of this method is the same as _cmsAdjustEndianess32 from the "lcms2_plugin.h"
More information about the 2d-dev