jbv.silences at club-internet.fr
Thu Mar 23 16:22:15 EST 2006
great job Scott.
BTW I didn't know that chartonum also worked on binary data...
> Recently, Bob Warren wrote:
> > Suppose I have 2 cards in a stack and I am moving the mouse over the top
> > card (naturally). I want to know what colour is under the mouse pointer
> > in a corresponding position on the 2nd card which is hidden underneath.
> I believe this function will retrieve the pixel color of a pixel in any
> image using the X,Y position of the pixel as measured from the topleft of
> the image. Pass the long ID of the image and the X,Y coordinates as
> on mouseUp
> answer retrievePixelColor(long id of myImage,5,5)
> end mouseUp
> function retrievePixelColor pObj,X,Y
> put imageData of pObj into tData
> put ((Y-1) * width of pObj * 4) + ((X-1)*4) into P
> repeat with N = 2 to 4
> put charToNum(char (P+N) of tData) & "," after tColor
> end repeat
> delete last char of tColor
> return tColor
> end retrievePixelColor
> Let me know if this works for you.
> Scott Rossi
> Creative Director
> Tactile Media, Multimedia & Design
> E: scott at tactilemedia.com
> W: http://www.tactilemedia.com
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
Faith is a central nervous system disease, like Alzheimer or multiple sclerosis.
More information about the Use-livecode