I also saw it on 4chan first, a long time ago, but I'd bet this trick has been around for many years before that. The gamma of 0.023 also seems to have been the de-facto way to do this.
Here's a good illustration that shows how the pixel values of the 2 images have been "compressed" into two separate ranges: