Drawing inside images (was : Problem with imagedata)
dsc at swcp.com
Fri Mar 19 12:11:24 CST 2004
On Friday, March 19, 2004, at 01:46 AM, jbv wrote:
> The idea was to use transcript to update the imagedata.
> So far the conclusion is that it works on small images (100 x
> 100 pixels, or 150 x 150 pixels) on a Mac G3/300 (I always
> test my code on such rather slow machines rather on the latest
> & fastest ones). But when the image size reaches 200 x 200, it
> becomes way too slow...
Currently, replacing a substring with a string of the same size is
slow. For example, this is slow:
put newPixel into char i to i+3 of largeImage
See bugzilla 586. I had intended to enter this as an enhancement.
Perhaps I did and it was changed to bug along the way.
Alternatives to replacing substrings in image processing is to
accumulate pixels from the front, to use some other structure (such as
an array), or to build up the image in pieces and then put the pieces
Since many folks who first start experimenting with image processing
might try the above slow method, I would suggest bugzilla 586 counts as
an image bug or enhancement.
More information about the use-livecode