const LINEAR_RGB_TO_SRGB_TABLE: &[u8; 256];Expand description
Precomputed LinearRGB to sRGB table.
Since we are storing the result in u8, there is no need to compute those
values each time. Mainly because it’s very expensive.
if (C_lin <= 0.0031308)
C_srgb = C_lin * 12.92;
else
C_srgb = 1.055 * pow(C_lin, 1.0 / 2.4) - 0.055;Thanks to librsvg for the idea.