On Thu, 6 Feb 2025 10:30:39 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>>> > Non-ICC intents are not something we'd support. I see absolutely no 
>>> > problem with that.
>>> > If a profile has an intent that is unknown to JDK APIs, it doesn't matter 
>>> > what LCMS might do with it
>>> > if you were programming directly to LCMS as a CMM.
>>> 
>>> non-cc intents in lcms are just examples of profiles in the wild that don't 
>>> violate the icc spec, currently such profiles can be loaded and used for 
>>> conversion, this patch will break that. Why we should apply this limit and 
>>> do that now?
>>> 
>>> Note that it is possible to use custom intents as well, and we will break 
>>> it:
>>> 
>>> > Little CMS plug-in architecture allows to implement user-defined intents
>>> 
>>> > Who knows how many things we'd have to do in order to support 'custom' 
>>> > ICC intents.
>>> 
>>> Then let's at least not break it intentionally. Then test and fix if it 
>>> does not work.
>> 
>> I am 100% for breaking it. We should never have allowed it.
>
>> I am 100% for breaking it. We should never have allowed it.
> 
> But why? It is allowed by the icc spec, such profiles do not break any rules.

@mrserb 
Thank you for taking time to review this PR. Your suggestions to move up the 
validation check logic in `.getInstance()` and to check deserialization path 
helped to make the fix better.

At this point, going with what is explicitly stated in ICC Spec seems to be a 
reasonable fix and the current fix will be integrated.

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

PR Comment: https://git.openjdk.org/jdk/pull/23044#issuecomment-2640645806

Reply via email to