Closed virtualritz closed 3 weeks ago
This fixes #43, I believe.
Note that this alpha blending is not correct but good enough. To be correct, the colors need to be in linear color space.
This requires determining in which color space they are to start with, linearizing them in at least u16
/channel, carrying out the blending and then transforming them back to gamma-corrected sRGB, the only sensible space for display in a terminal.
I figured that this is beyond the scope of the crate (for now).
But if this is merged I would open another PR that explains this limitation in the docs.
Fantastic stuff, thank you @virtualritz!
See also the README in my branch. You may want to cherry-pick that out btw.
Config
).image
crate. This brings down the number of deps from 129 to 61 (when--all-features
is passed)!Before:
After: