Monday, January 11, 2010

Tonight's hackish code...

... is a 16-bit ppm luminance booster/blower-outer.

To use:

- Convert your image into a 16-bit .ppm file. I use "dcraw -4 -h [file.cr2]" to convert a raw file. Raw DSLR files have enough color depth to do interesting things, even though there *is* a noise floor to contend with still...

- Build with "-O3" and preferably SSE math if you're not on a 64-bit system.

- Then run it as "./a.out 0.8 0.99 < [16-bit.ppm] > [new 16-bit ppm]"

- Finally do "gm convert [new ppm] [out.jpg]" to get a postable .jpg file.

The code is entirely uncommented and doesn't even care if you accidently feed it an 8-bit file, it'll just get very confused. Not recommended. ;)

The main concept is to convert RGB into HSL, play with L, and then you get a brighter output.

Some results are at

edit: source at

- Chad

No comments: