Imagedata row order
Dar Scott
dsc at swcp.com
Fri Jul 21 19:17:00 EDT 2006
On Jul 21, 2006, at 4:07 PM, J. Landman Gay wrote:
> But now I'm curious. My first attempt created an incomplete set of
> pixels that didn't fill the image completely, but how come it
> wrapped by itself? That got me to wondering how imagedata gets
> applied. Is it supposed to just go along in rows until it hits the
> edge of the image object and then wrap itself around? If so, what I
> saw wasn't doing that.
I assume you are using 4 bytes per pixel with no lf or spaces in
between.
You might want to check the height & width and formattedHeight &
formattedWidth.
Also, I have seen cases when funny things happen when the total size
is not as expected. It goes completely wacko.
That may be why I clear the image and set the height and width before
setting the imageData. Or is it set height & width, then clear the
data? Or maybe...
Dar
More information about the use-livecode
mailing list