Menu

#128 (Request) Color Correction Support

Git
open
nobody
None
5
2023-07-20
2023-07-20
Wyatt Ward
No

Some programs have support for loading 3-D lookup tables from an ICC profile or stand-alone LUT file.

PIL.ImageCms is a Python module that uses Little CMS to allow for color management-related operations.

I'd like it if I could supply an ICC profile to MComix and select a preferred rendering intent, and have MComix apply a transformation to the rendered image via ImageCms.

I have implemented a somewhat hacky version of something like this in a personal fork of MComix, as a proof of concept, but I don't think it's ready for prime-time. Also, it'd work better if it used the LAB colorspace as an intermediary instead of converting the input image to sRGB and then to the destination colorspace.

But the upshot would be much better color reproduction on profiled and calibrated screens - especially for screens that have a narrower gamut than the picture is intended for, which would otherwise appear desaturated.

There are other patches in here, but most of the edits for my version of this are in image_tools.py.
Do note that this does not handle 'not found' files properly, should you try to run it. You will need to provide a path to a lookup table file, even if you do not intend to use it. Again, this is just to get an example of how the actual color transformation is applied, rather than a suggestion to use as a basis for a pull.

https://github.com/wyatt8740/mcomix/compare/a464475..30a0a59

Discussion


Log in to post a comment.

MongoDB Logo MongoDB