Git Product home page Git Product logo

teamchina / colorist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joedrago/colorist

0.0 1.0 0.0 19.62 MB

Absolute luminance or bust!

Home Page: https://joedrago.github.io/colorist/

License: Boost Software License 1.0

CMake 1.52% Ruby 0.55% C 81.13% Shell 2.91% HTML 5.75% JavaScript 0.01% Makefile 0.62% Python 0.24% C++ 4.60% Roff 0.72% M4 0.43% SAS 0.11% Smalltalk 0.05% WebAssembly 0.11% Assembly 0.07% Module Management System 0.11% Go 0.01% Tcl 0.22% Java 0.74% Objective-C 0.11%

colorist's Introduction

Installation

OSX

brew install joedrago/repo/colorist

Windows

Grab the latest executable from AppVeyor.

Build from source

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.


Usage

Please see the Usage documentation and the Cookbook.


Overview & Explanation

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!


License

Released under the Boost Software License (Version 1.0).

colorist's People

Contributors

joedrago avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.