mm2 / Little-CMS

A free, open source, CMM engine. It provides fast transforms between ICC profiles.
https://www.littlecms.com
MIT License
572 stars 176 forks source link

cmsFLAGS_COPY_ALPHA does not copy alpha w/ fast float plugin enabled for "Apple Wide Color Sharing Profile" #343

Closed calkhaz closed 2 years ago

calkhaz commented 2 years ago

Hi there. We noticed the alpha will get 0'd out when the input profile is "Apple Wide Color Sharing Profile" and the fast float plugin is enabled.

We are going from TYPE_RGBA_FLT -> TYPE_RGBA_FLT and "Apple Wide Color Sharing Profile" -> linear if that helps.

Let me know if any other information is needed

mm2 commented 2 years ago

I am trying to reproduce this, but can't locate such profiles. I've Mac mini M1 with Ventura, a Mac mini with Catalina and iPhone 11 and 13, none of them have Apple Wide Color Sharing profile.icc Could type please told me a location where I could download those files? Thanks

calkhaz commented 2 years ago

Of course. Thanks for looking into this.

https://shopcounter.imgix.net/images/9a/e9/9ae9e5443a20dd1e1d7cd7fcb329e8e6002e144196895a0fe87bc84a0acc4c3c

mm2 commented 2 years ago

Thanks. I have checked a transform going from the profile that this image has embedded to linear Rec709 gamma 1.0 with TYPE_RGBA_FLT on both sides and using the fast float plug-in.

It works fine to me.

Things to check:

If all that fails, try to convert just one pixel with alpha != 0 and see if the value is correctly propagated to the output. You could use the debugger to trace inside the transform. Not too hard, once transform is calculated, the code that applies it is quite simple. It should take just one 3D interpolation to do the color matching.

calkhaz commented 2 years ago

We've been looking into this and it looks like the latest had not compiled in correctly, so we were running on an older version. This issue isn't present on 2.14.

I'll go ahead and close this issue. Appreciate your time!

mm2 commented 2 years ago

Great, glad you solved it!