Friday, December 02, 2011

Some fun with gamma and invert

Take an image and invert every other pixel. The result you get will look like this:

Or up close like this:

Zooming in and out in the browser or scaling the image will reveal the image, as most image applications these days handle gamma incorrectly, they assume the image is encoded as a linear range, while it's actually encoded with a gamma value applied to it, that would need to be unapplied before doing the blending performed when scaling the image. This is also the reason why this little trick can't be pulled off in Gimp directly, as the build in invert doesn't handle gamma correctly either.

Little nice side effect: You can use images like this to see if the gamma on your monitor is properly calibrated, if the image doesn't look like a flat gray area, then your gamma is off.

Source Code: ditherinv.cpp

PS: Yes, this is totally not news, just fun to toy around with to see how different image applications react, read that Slashdot story for more background information.

1 comment:

New Game of 2050 said...
This comment has been removed by a blog administrator.