| 1 |
# On color proofing under Wayland |
| 2 |
|
| 3 |
ICCv4 specification is really weird in area that is related to the white point |
| 4 |
of the profile's color space. ICC defines two different white points: |
| 5 |
|
| 6 |
* `cmsSigChromaticAdaptationTag` defines the color adaptation of the viewer |
| 7 |
in which the resulting image is viewed. For Display class profiles |
| 8 |
ICCv4 explicitly specifies that the user is assumed to be fully adapted |
| 9 |
to the display. In layman terms it means that the user does not look |
| 10 |
anywhere outside the of the display, hence display's white looks as |
| 11 |
"perfect white" for him/her. |
| 12 |
|
| 13 |
* `cmsSigMediaWhitePointTag` defines the color tint of the paper used |
| 14 |
for printing. This tint will be visible to the user even **after** |
| 15 |
he/she is fully adapted to the environment light (as defined by |
| 16 |
`cmsSigChromaticAdaptationTag`). For Display class profiles |
| 17 |
ICCv4 explicitly specifies that `cmsSigMediaWhitePointTag` must |
| 18 |
be set to `D50`, which means that the user is fully adapted to |
| 19 |
the display. |
| 20 |
|
| 21 |
The weird thing is that ICC's "absolute colorimetric" is not really |
| 22 |
"absolute". It still adjusts `cmsSigChromaticAdaptationTag` between |
| 23 |
the source and destination profiles, ignoring `cmsSigMediaWhitePointTag` |
| 24 |
difference. |
| 25 |
|
| 26 |
From the user perspective we have three usecases: |
| 27 |
|
| 28 |
## Gamut preview in the display space |
| 29 |
|
| 30 |
We basically show the image to the user as if the he/she was |
| 31 |
fully adapted to the **paper white** of the output. I.e. |
| 32 |
both `cmsSigMediaWhitePointTag` and `cmsSigChromaticAdaptationTag` |
| 33 |
values are taken into account (well, internally they are **not** |
| 34 |
taken into account since their values are encoded into AToB1 and |
| 35 |
BToA1 pipelines). |
| 36 |
|
| 37 |
When using Wayland we set up proofing pipelines in the following way: |
| 38 |
|
| 39 |
1) Image -> Proofing Space [0] |
| 40 |
* intent: chosen by the user |
| 41 |
* bpc: chosen by the user |
| 42 |
|
| 43 |
2) Proofing Space -> Monitor Space |
| 44 |
* intent: `IntentPerceptual` |
| 45 |
* adaptation state: _unused_ |
| 46 |
* bpc: `true` |
| 47 |
|
| 48 |
3) Wayland surface |
| 49 |
* intent: `render_intent_relative_bpc` |
| 50 |
|
| 51 |
## Simulate paper white in the display space **with full adaptation** |
| 52 |
|
| 53 |
The user might want to preview the paper white in the current |
| 54 |
display space, while keeping the eye adapted to the display's |
| 55 |
white. It means that the color will be adpted using |
| 56 |
`cmsSigChromaticAdaptationTag` of the profiles, but **not** |
| 57 |
for `cmsSigMediaWhitePointTag`. |
| 58 |
|
| 59 |
The the image's white will look as different to the diffuse |
| 60 |
white of the display, as different the real paper white when |
| 61 |
looked on in the environment defined by |
| 62 |
`cmsSigChromaticAdaptationTag`. |
| 63 |
|
| 64 |
When using Wayland we set up proofing pipelines in the following way: |
| 65 |
|
| 66 |
1) Image -> Proofing Space [0] |
| 67 |
* intent: chosen by the user |
| 68 |
* bpc: chosen by the user |
| 69 |
|
| 70 |
2) Proofing Space -> Monitor Space |
| 71 |
* intent: `IntentAbsoluteColorimetric` |
| 72 |
* adaptation state: `1.0` |
| 73 |
* bpc: _unused_ |
| 74 |
|
| 75 |
3) Wayland surface |
| 76 |
* intent: `render_intent_absolute` [1] |
| 77 |
|
| 78 |
## Simulate paper white in the display space **without adaptation** |
| 79 |
|
| 80 |
Sometimes the user may want to look into the image without full adaptation |
| 81 |
to the display's white point. It may be useful in the case when the user |
| 82 |
stretches the source image to full-screen, puts the printed version on |
| 83 |
the table in front of the display and tries to compare them. |
| 84 |
|
| 85 |
If the Output profile for the media encodes the adaptation state of |
| 86 |
the viewing environment, and and Display profile encodes the white |
| 87 |
point of the display, then the resulting image on the screen will have |
| 88 |
skewed white point, equal to the one on the printed media [2] |
| 89 |
|
| 90 |
When using Wayland we set up proofing pipelines in the following way: |
| 91 |
|
| 92 |
1) Image -> Proofing Space [0] |
| 93 |
* intent: chosen by the user |
| 94 |
* bpc: chosen by the user |
| 95 |
|
| 96 |
2) Proofing Space -> Monitor Space |
| 97 |
* intent: `IntentAbsoluteColorimetric` |
| 98 |
* adaptation state: `0.0` |
| 99 |
* bpc: _unused_ |
| 100 |
|
| 101 |
3) Wayland surface |
| 102 |
* intent: `render_intent_absolute_no_adaptation` |
| 103 |
|
| 104 |
## Footnotes |
| 105 |
|
| 106 |
[0] - "Image -> Proofing Space" leg of the conversion is chosen by the user. |
| 107 |
It means that the user is responsible to convert the image into the |
| 108 |
"Proofing Space" using the selected intent right before sending to |
| 109 |
the printing device. This step is mandatory to get correct colors in the end. |
| 110 |
|
| 111 |
[1] - In early versions of Wayland protocol `render_intent_absolute` was implemented |
| 112 |
to work as `render_intent_absolute_no_adaptation`. For such buggy versions of |
| 113 |
the compositor one should use `render_intent_relative` instead. The change happened in |
| 114 |
this patch in [kwin](https://invent.kde.org/plasma/kwin/-/merge_requests/8032) |
| 115 |
and [wayland](https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/439/). |
| 116 |
|
| 117 |
[2] - It is usually recommended to calibrate the display to the same white |
| 118 |
point as the viewing environment around it. But that might be not easy to guarantee |
| 119 |
their equality, especially in case of laptops. |