Commit d7906904 authored by Pekka Paalanen's avatar Pekka Paalanen
Browse files

A Pixel's Color

Add a story on what one would need to know to process and display a

This is an introduction to people who are already familiar with computer
graphics in general, images in memory, and maybe window systems, but
never really thought what the values in a pixel actually mean or what
they are doing wrong with them.
Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <>
parent 1ce9c034
Pipeline #449868 passed with stage
in 17 seconds
......@@ -27,6 +27,9 @@ specifications. All content must follow the [license](LICENSE).
- [Todo](doc/todo.rst) contains random notes.
- [A Pixel's Color](doc/ is an introduction to
understanding pixel values.
## History
Originally this documentation was started to better explain how
% SPDX-FileCopyrightText: 2021 Collabora, Ltd.
% SPDX-License-Identifier: MIT
% This is an Octave script:
s = 0.04045;
e = [0 : 0.01 : 1];
o = zeros(size(e));
mask = e <= s;
o(mask) = e(mask) ./ 12.92;
o(~mask) = realpow((e(~mask) + 0.055) ./ 1.055, 2.4);
f = figure();
plot(e, o);
grid on
title('sRGB EOTF')
xlabel('electrical / non-linear value')
ylabel('optical / linear value')
axis square tight
ppi = get(0, 'ScreenPixelsPerInch');
set(f, 'PaperPosition', [0 0 400 400] ./ ppi)
print(f, 'sRGB_EOTF.png', '-dpng')
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment