1 Line Challenge- Minions RGB remix

832
0
Published 2016-07-02
Like in my previous remix, I packed an entire bitmap in that single line of code, but this time using the ARGB version of the 'set color to ()' block. Obviously the end result is far better than with the 'easy' hue-based block, where you only have saturated colors at your disposal.

The code contains 3 strings, one for each color channel (red, green, blue). Each string consists of 129600 digits (one for each pixel). The result is a 360x360 bitmap capable of showing 1000 separate colors.

CREDITS
Thanks to Scratch-Minion for the original project. Nice challenge!

"Minion", copyright Universal. Minions image downloaded from:
http://img0.ndsstatic.com/wallpapers/c42ac6a0c2aaee69c79955d1d32c54b4_large.jpeg
Resized using GIMP (www.gimp.org), then converted to a data URI as explained here:
http://unix.stackexchange.com/questions/247843/how-to-generate-a-data-uri-from-an-image-file#247846
Used this in the following JavaScript fiddle to generate the string of digits:
http://jsfiddle.net/w9145dym/
Based on code from this StackOverflow post:
stackoverflow.com/questions/2541481/get-average-color-of-image-via-javascript#2541680