Skip to main content

Module color

Module color 

Source
Expand description

Turns a picture’s pixels from its embedded ICC profile into sRGB for showing. Falcon draws sRGB, so a picture tagged Adobe RGB or Display P3 would otherwise look dull. Colours outside sRGB are clipped.

This is for what’s on screen and in thumbnails. Rotating, flipping, cropping and exporting rewrite the file’s own pixels, so they keep crate::thumbnail::decode, which leaves them alone.

Functions§

changes_rgb
Whether showing a colour picture through icc changes it, so a caller with many frames can skip profiles that do nothing.
to_srgb
img in sRGB through icc. A profile that can’t be read, doesn’t match the picture’s colours or changes nothing leaves img as it is.