ditherit-v2
ditherit-v2 copied to clipboard
Add Gamma Correction
from @farteryhr on twitter:
but here's my only one more wish, please add gamma correction.. for reference, see: http://entropymine.com/imageworsener/ https://bisqwit.iki.fi/story/howto/dither/jy/
This is definitely something important to add. No dithering can really be considered "correct" unless it linearizes image values when doing numerical operations, only delinearizing (sRGB) for display or encoding purposes. Otherwise the operations won't affect different pixel values equally.
Here's a gradient dithered without gamma correction:
And with it:
Source: https://surma.dev/things/ditherpunk/
Make sure to view these images at 100% size.
Hi, ok thanks for the 2nd. This is on the list, as you can see, just gotta figure out how to do it? Pull requests welcome ><
Actually this would be something RgbQuant.js would have to do, isn't it? Maybe it already does this.
It doesn't as far as I know. But yeah if I figured it out I would probably just submit a PR to RgbQuant.js