Colour of a pixel?
John Tregea
john at debraneys.com
Thu Jul 13 05:04:27 EDT 2006
I thought if I could extract the RGB values from pixels in a picture I
could solve my concern about storing a password that may be read by
someone peaking at the source code of a built rev app.
So I take a short text string
repeat through each character in the string
convert each character to a number using chartoNum()
get the value of that pixel in a particular image ("red" value for even
numbers and "green" value for odd numbers)
convert the returned number to a character using numtochar()
put the original char and the returned pixel colour (converted to a
character) after a temp string to build up a new string
base64encode the new string and use that as my password. :-)
Cheers
John T
Chipp Walters wrote:
> Check out the mouseColor function, which returns the color of the
> pixel directly under the mouse
>
> If you're looking to figure out the color of the pixel 4,12 in the
> image, then you'll need to calculate it using the imageData and the
> rect of the image.
>
> best,
> Chipp
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
More information about the use-livecode
mailing list