2013 Development Updates

In presentations I like to use colourful graphics. Some of those graphics are generated automatically by the Cairo based oyranos-profile-graph 2D grapher tool. In git that tool obtained a option to show black body spectra based on kelvin. The spectra are scaled for better illustration.

CIE D65 and black body radiation SPDs for 6500 Kelvin

CIE D65 and black body 6500 Kelvin spectral power distributions (SPD)


Some other work in Oyranos went on with the device mapping to JSON serialisation, as is useful to store device configurations using the Oyranos API. Through JSON files it is possible to support new device classes without to worry about creating a native Oyranos device module. The basic idea is to let users bring in a OpenICC device description and a weighting description. Oyranos is then able to find matches inside its DB and weight the resulting properties according to the provided weighting file. The example code is inside oyranos-test-device and needs still some polishing to become a stable tool. For instance more integration with the frontends and UI parts is needed, to make sure everything gives a nice user experience. Raw images can now be rendered better in image_display and do not show the artefacts from table based conversion of linear camera space to gamma encoded monitor spaces.

During spring 2013 I decided to abstain from public activities and paused coding completely. After some months I was mentally able to enjoy work on self contained stuff. That was first without any community involvement. Months later I contacted some people to explain that situation and want to thank here all those friendly souls who directly encouraged me. After what happened in the last years, I learned, that it can be pretty healthy to not to stay in public light and become involved in highly controversial discussions. Especially the later can become easily burning. As a result of that personal lesson, I skipped 2013 LGM and other meetings and outside activities. Now after around 9 months I feel really better and hope to become slowly more involved. Still I am learning how to keep others opinions at arms length. And that lesson appears key for me to stay welcoming and focused. Well, time will show how well .

Oyranos supports Elektra-0.8.4 in git as a result of friendly behind the scene discussions later in 2013. A new image filter, called “scale“, is currently used inside the image-display example viewer. It does so far no interpolation, but it might become useful for other applications as well, in order to select only a subset of unaltered image pixels. ICC named colour list reading was added. More changes happened around documentation, building external modules and use of threading inside the image-display application.

Pixel naming in Cairo

I find it always confusing to say CAIRO_FORMAT_ARGB32 and mean a 8-bit per channel thing. At a first glace I seriously expect it to be a IEEE float format, which it is not. Most users will expect to multiply by the channels count to get the pixel size not to divide the pixel size by the channel count.

If you consider, most of the imaging world has changed its pixel naming to a per channel base, it would be nice to see Cairo following this too. It is pretty common to say 16-bit image processing, which means per channel. Or 8-bit monitor displaying, which is again per channel. The monitor LUT’s are sometimes 10/12 or even 14-bit, again per channel. The pixel numbers dont say anything about the colour resolution.

Why bit per channel instead of bit per pixel?
For instance a 16-bit Gray X-Ray image, properly displayed, can be superior compared to a 32-bit/pixel CMYK representation. In this case the numbers are non relevant to the lightness distinction. The example makes clear, what counts are the shades of gray.

Tricks like dithering dont count. Otherwise all people would still use indexed gif’s for photos. But I dont know any camera or scanner doing so.

On the other side a 32 bit chunck with 3*10 bit RGB inside would be harder to describe. Is such thing still in use for hardware and must be supported? At least it is not present in cairo_format_t. Out of scope?

Possibly someone can point me to a document describing the necessity of Cairos per pixel naming as is. Is it something to do with tradition? Nethertheless the non selfexplanatory behaviour today makes it feel much like a pitfal.

To exemplify (a F stands for floating point):

colour    bit/channel    bit/pixel        cairo_format_t sheme
RGB                 8           24        CAIRO_FORMAT_RGB24
RGBA                8           32        CAIRO_FORMAT_ARGB32
Gray                8            8
GrayA               8           16
Alpha               8            8        CAIRO_FORMAT_A8
CMYKA               8           40
RGB                16           48        CAIRO_FORMAT_RGB48
RGBA               16           64        CAIRO_FORMAT_ARGB64
Gray               16           16
GrayA              16           32
CMYKA              16           80
RGB[A]... 16-bit float/channel use the same pixel size as the 16-bit per channel integers.
RGB      IEEE Half 16           48        CAIRO_FORMAT_RGB48F
RGBA     IEEE Half 16           64        CAIRO_FORMAT_ARGB64F
IEEE floats and 32-bit integers:
RGB          FLOAT 32           96        CAIRO_FORMAT_RGB96F
RGBA         FLOAT 32          128        CAIRO_FORMAT_ARGB128F
IEEE doubles:
RGB         DOUBLE 64          192        CAIRO_FORMAT_RGB192F
RGBA        DOUBLE 64          256        CAIRO_FORMAT_ARGB256F

The later can easily be confused with a 256 shades of Gray per channel naming.
Do you really expect a user to always divide the pixel values by the channels count to get an idea about the colour resolution?

To remember the marketing inflation of having 16 million colours and so on is long gone away. Today it is in, to say a software supports 16-bit, which is much more meaningful.
As a side step, manufacturers suggesting theire consumer camera to deliver the full range of 16-bit is still a joke. Such anouncements are demystified regularily.

Windows and osX have long inherited pixel naming conventions.
Cairo as a young project does not. Cairo could express pixels much closer to our current language in cairo_format_t.

Lets end here and come to a suggestion for a new sheme:



could ashure compatibility.

Later Cairo could add


… and so on.