Metadata-Version: 2.4
Name: cmm-16bit
Version: 0.1.5
Summary: Color management module
Home-page: https://github.com/hajimen/cmm
Author: Hajime NAKAZATO
Author-email: hajime@kaoriha.org
License: MIT
Keywords: color management
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Programming Language :: C++
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: summary

# cmm: Color Management Module based on lcms2. Not a full wrapper.

Color management is a kind of rocket science. You should be a specialist of ICC color management 
before struggling this module. You should be familiar with soft proofing, color conversion intent, gamut, etc. first.
These are the ABC of color management.
Please don't try to learn such deep knowledge from this module and document.

I don't want to repeat [lcms2](https://github.com/mm2/Little-CMS) document here.
This module is a thin wrapper of lcms2. Not a full wrapper, but covers most common usage.

## How to use

See `tests/test_from_python.py`. Advanced usage (partial profile and LUT) is not shown there. 
If you are informed enough to use it, you don't need any instruction.

`import faulthandler; faulthandler.enable()` is strongly recommended. There is no memory protection in this module.
You can easily make a segmentation fault.

To integrade to your product, `pip install cmm-16bit`. Be careful of `-16bit`. Just `cmm` is not mine.
If you do not need 16-bit per chanel, consider [ImageCms module](https://pillow.readthedocs.io/en/stable/reference/ImageCms.html) of Pillow.

## Versioning

It is the default versioning scheme of `setuptools-scm`. Commit and tag with a version number
when you need clean version.

## Build

Requires cmake. VS2022 for Windows, Homebrew for macOS, `sudo apt install python3.11-dev` for Ubuntu, etc.

Retrieve all submodules by `git submodule update --init`.

```
python -m pip install -U pip build
python -m build --wheel
```

For macOS, `MACOSX_DEPLOYMENT_TARGET=11 python -m build --wheel` is preferable.

The generated whl file should be found in `dist` directory. The wheel name is `cmm_16bit`.

## Unit testing

Build with `python -m build --wheel`. Do not forget `--wheel`. It generates `build` directory and `tests/test_from_python.py` uses the output.

`pip install pillow`

`python -m unittest .\tests\test_from_python.py`

## License

MIT License.
