Arrays

Ben Fisher boinjyboing at hotmail.com
Fri Feb 4 13:19:28 CST 2005


Thanks Phil and Mark.

It seems like Rev is really lacking documentation about its array and matrix capabilities. I like the idea of having flexible arrays, I.e. myArray["key"]. Is there a page in the docs that specifically outlines what array features there are? (Whenever I try to search for something in the docs, the spinning-beach ball cursor appears but Rev crashes.) I'm having problems using the combine and split commands; for some reason the data never is processed quite correctly.

I'm working on image processing. Let's say I wanted to lighten every shade in the image by 2. The way I do this now is by getting the chartonum of each char in the imagedata (except for every fourth char which is always 0), adding 2, getting the numtochar, and putting this after a variable. Then I set the imagedata of the image to that variable. It works great, but it's a little slow. Too slow for a smooth animation which is what I'm trying to accomplish.

Is there a way to directly add something to the imagedata in binary? For example, adding 2 to all the red in an image in one step rather than going through all the data manually. Or is converting binary>decimal>binary necessary?

-Ben


>In fact, it isn't necessary to set the the customPropertySet if you 
>don't need to access elements of it directly. If you simply want to 
>store an array you can do this:



More information about the use-livecode mailing list