[dev] Problems with farbfeld image editing tools

From: Mattias Andrée <maandree_AT_kth.se>
Date: Mon, 3 Jul 2017 17:28:29 +0200

Because if the limited number of values that can be stored in an
8-bit integer and because humans don't notices small differences
between dark colours as well as small differences in bright
colours, sRGB encodes colours non-linearly so there are more
bright colours and fewer dark colours.

However, looking at image editing tools for farbfeld I've found
that the tools do not take this into account. For example, making
a colour twice a bright, is not as simple as multiply the RGB
values with 2, rather the algorithm that shall be used is

        x = F(2 ⋅ F⁻¹(x₀))

where F is sRGB's transfer function

               ⎧ -F(-t) if t < 0
        F(t) = ⎨ 12.92 t if 0 ≤ t ≤ 0.0031306684425217108 [*]
               ⎩ 1.055 t↑(1/2.4) - 0.055 otherwise

[*] Approximate value. You will often find the value
    0.0031308 here, but this value is less accurate and
    only good enough when working with 8-bit integers.

Received on Mon Jul 03 2017 - 17:28:29 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 03 2017 - 17:36:25 CEST