gtaylor / python-colormath

A python module that abstracts common color math operations. For example, converting from CIE L*a*b to XYZ, or from RGB to CMYK
python-colormath.readthedocs.org
BSD 3-Clause "New" or "Revised" License
456 stars 83 forks source link

Implement UPLab from Bruce Lindbloom? #109

Closed swamidass closed 3 years ago

swamidass commented 3 years ago

How difficult it is it to add a UPLab color? The ICC profile is attached here. Alternatively, an approach to add custom colorspaces based on an ICC profile would solve the problem in another more flexible way.

http://www.brucelindbloom.com/index.html?UPLab.html

KelSolaar commented 3 years ago

Hi @swamidass,

UPLab is a LUT based colourspace and the LUT is rather large, i.e. 1.2mb which is probably not advisable to package as it would increase massively the size of the project. The other issue is that interpolating through that LUT would require code that does not exist in python-colormath, it is quite a significant undertaking.

swamidass commented 3 years ago

So, I managed to sort of get this to work with Pillow and their interface to littleCMS, but it uses integer math.

Have you thought of building an interface between colormath and Pillow? That would give you a way to make use of any ICC profile.

gtaylor commented 3 years ago

This sounds significant enough to be grounds for a separate module. Going to close this issue as there are no plans to pull in the LUT or the Pillow interface. Thanks for raising, @swamidass!