Re: [Lcms-user] LCMS 2.16: CMMException: LCMS error 13: Mismatched alpha channels
An ICC-based CMM for color management
Brought to you by:
mm2
From: <mar...@li...> - 2024-01-04 11:49:04
|
Hi Phil, The reason was to prevent using this flag when the output has alpha channel and there is no source alpha. Other examples are different number of alpha channels. It is not clear what to do with the alpha in such cases. Should lcms initialize the excess with zero? Some folks began to have ideas of adding a new interface to init spare alpha channels so I just applied Occam’s razor. I am open to changes as long as they make sense. The actual implementation complains if the request cannot be accomplished, user specify to copy alpha and there is no alpha or the number of channels is different, an error is triggered. I guess you don’t like this being reported as an error. Ignoring the request seems also not right because user may think it is being performed whilst is really not. What should I do? Regards Marti Maria The LittleCMS Project <https://www.littlecms.com> https://www.littlecms.com From: Philip Race <phi...@or...> Sent: Wednesday, January 3, 2024 9:00 PM To: Lcm...@li... Subject: [Lcms-user] LCMS 2.16: CMMException: LCMS error 13: Mismatched alpha channels JDK is using the flag cmsFLAGS_COPY_ALPHA. It is specified in a few cases including if the source has alpha but the destination is opaque, expecting that the alpha channel will be ignored. Here's where JDK started using the flag https://github.com/openjdk/jdk/commit/16acfafb#diff-eed6ddb15e9c5bdab9fc3b3930d5d959966165d9622ddd293e8572489adea98b But in LCMS 2.16 there's a new check that this is running afoul of. https://github.com/mm2/Little-CMS/commit/e55b6fa4d3c5b7e08d9e4bc8c803a79ca908b5a4#diff-3627f903d37617a227e71f0ee1[…]2629b5ee838707e3fcd7dcb46e762f4e It seems to me that likely we could just drop specifying cmsFLAGS_COPY_ALPHA in this case, but I can't find any background information on the reason for the change in LCMS, or awareness that it might be a compatibility issue. Thoughts / comments ? -phil. |