[deprecated] A practical scripter's color management toolkit.
 
 
 
 
Go to file
Sofus Albert Høgsbro Rose 59f42a2622
Actually working pip install now. Added OpenGL modularity.
2017-01-19 21:09:48 -05:00
doc Added my OpenGL viewer, olOpt for cool fast C++, and more! 2017-01-19 17:55:14 -05:00
img_test Added my OpenGL viewer, olOpt for cool fast C++, and more! 2017-01-19 17:55:14 -05:00
openlut Actually working pip install now. Added OpenGL modularity. 2017-01-19 21:09:48 -05:00
tests Added my OpenGL viewer, olOpt for cool fast C++, and more! 2017-01-19 17:55:14 -05:00
.gitattributes Added my OpenGL viewer, olOpt for cool fast C++, and more! 2017-01-19 17:55:14 -05:00
.gitignore Added my OpenGL viewer, olOpt for cool fast C++, and more! 2017-01-19 17:55:14 -05:00
.pypirc Added my OpenGL viewer, olOpt for cool fast C++, and more! 2017-01-19 17:55:14 -05:00
.venv Added Python infrastructure, as well as, PIP NOW WORKSgit add README .venv requirements.txt ! 2017-01-19 19:22:00 -05:00
MANIFEST.in Added Python infrastructure, as well as, PIP NOW WORKSgit add README .venv requirements.txt ! 2017-01-19 19:22:00 -05:00
README.md Actually working pip install now. Added OpenGL modularity. 2017-01-19 21:09:48 -05:00
main.py Added Python infrastructure, as well as, PIP NOW WORKSgit add README .venv requirements.txt ! 2017-01-19 19:22:00 -05:00
openlut-project Added my OpenGL viewer, olOpt for cool fast C++, and more! 2017-01-19 17:55:14 -05:00
requirements.txt Added Python infrastructure, as well as, PIP NOW WORKSgit add README .venv requirements.txt ! 2017-01-19 19:22:00 -05:00
setup.py Actually working pip install now. Added OpenGL modularity. 2017-01-19 21:09:48 -05:00

README.md

openlut

Open-source tools for practical color management.

What is it?

openlut is, at its core, a color management library, accessible from Python 3.5+. It's built on my own color pipeline needs, which includes managing Lookup Tables, Gamma/Gamut functions/matrices, applying color transformations, etc. .

openlut is also a tool. Included soon will be a command line utility letting you perform complex color transformations from the comfort of your console. In all cases, interactive usage from a Python console is easy.

I wanted it to cover this niche simply and consistently, something color management often isn't! Take a look; hopefully you'll agree :) !

What About OpenColorIO? Why does this exist?

OpenColorIO is a wonderful library, but seems geared towards managing the complexity of many larger applications in a greater pipeline. openlut is more simple; it doesn't care about the big picture - you just do consistent operations on images. openlut also has tools to deal with these building blocks, unlike OCIO - resizing LUTs, etc. .

Indeed, OCIO is just a system these basic operations using LUTs - in somewhat unintuitive ways, in my opinion. You could setup a similar system using openlut's toolkit.

Installation

Simply use pip: sudo pip3 install openlut (pip3 denotes that you must use a Python 3 version of pip). Keep in mind, there are some external dependencies:

  • Python 3.5: This is Python; you need Python.
  • gcc: This is needed to compile the C++ extensions.
  • pybind11: This is a library needed to link the C++ extension into Python. pip version is being difficult...
  • imagemagick: For all file IO. It's not like I was gonna write that myself :) .

If it's breaking, try running sudo pip3 install -U pip setuptools. Sometimes they are out of date.

Installing Dependencies

Not Difficult, I promise!

On Debian/Ubuntu: sudo apt-get install python3-pip gcc pybind11-dev libmagickwand-dev On Mac: brew install python3 gcc pybind11 imagemagick

  • You will need Homebrew ( copy/paste a command from http://brew.sh/ ) and XCode Command Line Tools for gcc (it should prompt you to install this).
  • Disclaimer - gcc took its sweet time compiling/installing on my old Mac...

Dependencies

There are some dependencies that you must get. Keep in mind that it's Python 3.X only; all dependencies must be their 3.X versions.

Getting python3 and pip3

If you're on a Mac, run this to get python3 and pip3: brew install python3; curl https://bootstrap.pypa.io/get-pip.py | python3 If you're on Linux, you should already have python3 and pip3 - otherwise see your distribution repositories.

Dependency Installation

You need Python 3.5, Pip, a newer version (must support C++14) of gcc, and pybind11 in your includes. This is trivial on Debian/Ubuntu:

  • `sudo apt-get install python3-pip

Basic Library Usage

To represent images, use a ColMap object. This handles IO to/from all ImageMagick supported formats (including EXR and DPX), as well as storing the image data.

Use any child of the Transform class to do a color transform on a ColMap, using ColMap's apply(Transform) method.

The Transform objects themselves have plenty of features - like LUT, with open(), save(), and resize() methods, or TransMat with auto-combining input matrices, or automatic spline-based interpolation of very small 1D LUTs - to make them helpful in and of themselves!

Take a look at the test code under tests for examples.