Imagedata row order
J. Landman Gay
jacque at hyperactivesw.com
Fri Jul 21 20:54:58 EDT 2006
Dar Scott wrote:
>
> 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.
Right.
> You might want to check the height & width and formattedHeight &
> formattedWidth.
I got tired of crashing, but if I get brave again I'll do that. Hadn't
thought of it, but it would be interesting to know.
> Also, I have seen cases when funny things happen when the total size is
> not as expected. It goes completely wacko.
That's the word I was looking for. :)
>
> 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...
Do you use imageData a lot? I know the crashes I had were because the
imageData was wrong, but in your experience is this generally a stable
technique for repeated use?
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list