RFR: 8282577: ICC_Profile.setData(int, byte[]) invalidates the profile [v3]

Sergey Bylokhov serb at openjdk.java.net
Wed Mar 9 22:41:44 UTC 2022


On Wed, 9 Mar 2022 22:19:53 GMT, Phil Race <prr at openjdk.org> wrote:

> One way to "save" the test is that after doing the validation which calls cmsReadTag() and get an "OK" we discard this profile and create ANOTHER copy which we return to the app. Since nothing will have cooked that new profile data it will get back what it set. Unless something else cooks it or LittleCMS behaviour changes.
> 
> I'm up for doing that here and then the test will pass again without changes.

Based on the link below, I guess it is not possible to do:
https://github.com/mm2/Little-CMS/issues/275#issuecomment-907041554
> so writting a tag as raw and then reading it as cooked without serializing does result into an error.

If we will create a new profile it will not be possible to use it by the ColorTransform, because the LCMS will call cmsReadTag under the hood. But even if it will work the content of the tag will be changed.

But we can try for sure.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7668



More information about the client-libs-dev mailing list