This is a program I've been working on to convert a source image(currently it must be 2048x2048 pixels and file type: JPG, GIF, BMP(suggested)) to a 4096x4096(16777216 pixels/colors) AllRGB image. AllRGB means each color is used only once, none missing, none repeating.

Here are some of my very own examples produced with this very program(NOTE: some images may be slightly NSFW). Included is a RAR file with the latest compiled EXE, scanned by jotti.org with 20 out of 20 CLEAN results!

Here is the official AllRGB web page with dozens of more examples(SFW). I believe I have four on there, currently(all earlier works... I have newer submissions pending).

You can download the complete source code here: allrgb.zip

It's really easy to use:

  1. Select a Sort By... method from the menu(NOTE: methods denoted with artifact will benefit from Limit Swapping disabled and using higher Depths)
  2. Click Prepare Palette menu, enabling the Render menu upon completion(likely no more than 10-20 seconds on a modern PC)
  3. Click Render menu, select image file(must be a 2048x2048 bmp, jpg, or gif) BMP suggested

Under the Options menu, Swap Pixels is what's responsible for 'faithfully' colorizing images. Limit Swapping and Depths configure the pixel swapping. Depth is the most critical factor, and you'll have to experiment(to maximize optimal quality/time; in my experiences this is usually around 2-3 minutes) with it for different pictures. I've found good to great results generally start to appear between Depths of 12 to 30, so that's the default. It'll iterate, incrementing the depth by 6, so that's 4 passes; generally, these 4 passes with Limit Swapping enabled take around 5 minutes(aggregate), and 7 to 8 minutes with Limit Swapping disabled. The extra time/passes has ensured a very wide compatibility across numerous test images I've used(colors probably won't be perfect, but they're usually quite good). Time estimates based on my AMD Phenom II @ 3.8 GHz.

Feel free to ask any questions or add any comments you may have.

Source code is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License. Have fun, play with the code, and share your changes with us!