Imagedata row order
Dar Scott
dsc at swcp.com
Fri Jul 21 17:56:30 EDT 2006
On Jul 21, 2006, at 1:55 PM, J. Landman Gay wrote:
> I am trying to figure out how to set an image's imageData to a
> repeating pattern. I have a pattern that is 8 x 8 pixels. I want to
> repeat this pattern 16 times in order to fill a 32-pixel square image.
>
> If I repeat the pattern 4 times, I get a nice column of four
> repeating patterns going down the left edge of the image. If I
> repeat it 16 times I get junk. In what order are the pixels laid
> down, and what determines where and when they wrap?
I can't remember the exact details. Once you get the image data, set
the image to empty, set the height and width and then set the imageData.
In building the imageData, you can't just repeat the pattern 16
times. You have to repeat the first row 4 times. Then the second
through 8th. Repeat all that 4 times.
I think Chipp has an image overlay function.
Dar
More information about the use-livecode
mailing list