Generating images with a full spectrum of colors, allRGB-style.
There are several disucssions online (1, 2, 3) about generating images where each color in the RGB color space is used once. This is my implementation of some ideas from each of those sites. It's not particularly novel, though I do support images of sizes other than 2^24 while maintaining the spirit of allRGB by evenly sampling the RGB colorspace.
Warning
Most of this code was written while I was on vacation, sitting on a deck chair, looking at the ocean, possibly having a drink.
Starting from this input image:
Ignoring hue:
bin/permute examples/castle.png examples/ascending.png -a
Swapping pixels for a closer match:
bin/permute examples/castle.png examples/castle-s200.png -s 200
Dithering:
bin/permute examples/castle.png examples/castle-d300.png -d 300
No input image, just colors:
bin/abstract 750 1200 examples/sdfs.png
A slightly different feel:
bin/abstract 750 1200 examples/bfs.png -bfs
Requires pnglib and a newish compiler. Clone the repo, then:
cd image-permute mkdir build cd build cmake .. make