On Mon, 13 Jan 2025 21:14:31 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>>> @mrserb Non-header data are updated using cooked approach (and validated by 
>>> LCMS) whereas header data are updated using raw LCMS APIs hence require 
>>> additional validation before setData() is called (On native side it is 
>>> handled here: setTagDataNative() in 
>>> [LCMS.c](https://github.com/openjdk/jdk/blob/63eb4853f6782f350f67b6bcf25d83bc4480be71/src/java.desktop/share/native/liblcms/LCMS.c#L445)).
>>> 
>> Then probably we can use approach similar to 8282577: 
>> https://github.com/openjdk/jdk/commit/f66070b00d4311c6e3a6fbf38956fa2d5da5fada
>>  and try to rely on lcms for validation.
>
>> The ICC spec. defines only these 4 intents, so I don't see a problem here.
> 
> our own profiles do not strictly follow these specification, so if lcms 
> ignores that we can do the same, especially since we fallback to the 
> "Perceptual intent" 
> https://github.com/openjdk/jdk/blob/13a1775718f329b02cdeb82f9d3f7d878ac5e771/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java#L75

"our own profiles do not strictly follow these specification"

What you are pointing to isn't a profile. It is code that accepts a requested 
rendering intent. I don't see how it is related.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23044#discussion_r1913895960

Reply via email to