
-----------------------------------
ttm
Sun Nov 27, 2011 9:14 pm

whatdotcolor is terrible. Here's a better one.
-----------------------------------
Turing's built in whatdotcolor function is terrible. It gives the approximate color of a pixel instead of the exact red, green, and blue values. That means you can't apply special effects to photos. Bleh.

Therefore I rewrote a new whatdotcolor function. It works by taking a picture of the screen using the takepic function, which returns an integer array containing the raw picture information, and then directly fetching the red, green, and blue values from the array. Its syntax is the exact same as the original whatdotcolor, but instead of a color number, it returns a pixel class with R, G, and B values.

Here's a demo: http://dl.dropbox.com/u/17181264/betterwhatdotcolor.png

-----------------------------------
SNIPERDUDE
Sun Nov 27, 2011 11:19 pm

RE:whatdotcolor is terrible. Here\'s a better one.
-----------------------------------
Useful.

-----------------------------------
[Gandalf]
Mon Nov 28, 2011 1:43 am

RE:whatdotcolor is terrible. Here\'s a better one.
-----------------------------------
whatdotcolor is terrible?  7 years ago you would be slaughtered by a certain moderator for such sacrilege!  But times have changed - good work, you seem to have a good grasp of the language. :)  My main critisism would be that your variable naming needs work... bleh (and n) are horrible variable names, use something more descriptive!

-----------------------------------
dannyboy8899
Mon Feb 20, 2012 4:07 am

RE:whatdotcolor is terrible. Here\'s a better one.
-----------------------------------
THE CAKE IS A LIE!
