brew install joedrago/repo/colorist
Grab the latest executable from AppVeyor.
Building from source requires CMake, version 3.5 or higher.
Clone or download a zip of the repo, then run CMake on the root directory and run the generated build. If you want to use the same build as someone that installed via Homebrew or AppVeyor, download the source of a tagged release instead of just building the latest in the master branch.
Please see the Usage documentation and the Cookbook.
Colorist is an image file and ICC profile converter, generator, and identifier. Why make such a tool when the venerable ImageMagick already exists and seems to offer every possible image processing tool you can imagine? The answer is absolute luminance.
(Also, making tools is great fun.)
Since the dawn of computer rendering, luminance (brightness) has always been relative.** Values of 0 in a pixel have always meant "emit no light / as little light as possible", and max values in a pixel (255 in 8-bit, etc) meant "as bright as possible". We've gotten by just fine for a while with this strategy, but times are changing. The HDR10 standard (BT.2100) and Dolby Vision have defined a luminance range of 0-10,000 nits, and Hybrid Log Gamma has a max luminance of 1000 nits, which can be adjustable on the fly. We no longer can assume that the author of an image containing max-channel white pixels intended to burn your retinas out of your head. We need more information!
** Hasn't it?
This means somewhere in the image file we must store our intended max luminance such that renderers know how much to scale it when rendering (depending on the output's max luminance). But where to store it? It turns out there is already a place available in any image file format that can embed an ICC profile: an ICC profile's lumi tag. The explanation in the ICC spec for the lumi tag is:
This tag contains the absolute luminance of emissive devices in candelas per square metre as described by the Y channel.
Sounds perfect, no? Unfortunately, while ICC profile viewers and editors will happily manipulate this tag and standard ICC profiles occasionally include the tag for completeness, no image manipulation tool to date actually honors the value during conversion or rendering. Until now!
The goal of this tool is to be a one-stop shop for manipulating/abusing ICC profiles and image file formats (with respect to absolute luminance). By leveraging the fantastic LittleCMS library, choosing interesting tone curves and max luminance, and injecting my own scaling and tonemapping steps into the pipeline, I hope to maintain as much of the original image's fidelity when converting to other color profiles or file formats that can't handle larger bit depth or are excessively lossy.
Any files created/generated via this tool will still be fully standards compliant, it will simply have a slightly more interesting color profile embedded that you can choose to parse in your own engines and scale that luminance down accordingly. If the output of this tool isn't to your satisfaction, ImageMagick is better in pretty much every other way. I highly recommend it!
Released under the Boost Software License (Version 1.0).