More image processing

Ken Norris pixelbird at
Wed Dec 31 15:03:01 EST 2003

Hi Dar,

> Date: Wed, 31 Dec 2003 01:01:18 -0700
> From: Dar Scott <dsc at>
> Subject: Re: More image processing
> On Wednesday, December 31, 2003, at 12:33 AM, Ken Norris wrote:
>> put numToChar(0) into char x of binDat
> This takes a long time.
How long? Surely not *that* long. Not more than a few minutes, although I
agree it's slow.
> Bugzilla 586 is an enhancement suggestion that
> will drop the time to do this drastically.
> Instead build a new value with "put ... after ...".  That would also
> allow you to use a faster repeat.
Well, it would go faster if I could find the rectangle of the painted
section pasted into the image. That way I could use a formula to find the
'pixelToStart' and go from there to a 'pixelToStop' and be done.

OTOH, I once saw that the image object had concatenated itself to the size
of the pasted area, which is much smaller of course, but I don't know how it
happened, and I don't know if I could still set the windowShape to it.
> BTW, I only see 0 and 255 in maskData.
Right. There are only three pixel colors, black, white, and transparent. I'm
trying to use only the black for the demask. I tried several methods to
recover the white value with no success. It is apparently *not* 1. However,
I *know* the black has to be the last value, or 255, in Rev's way of looking
at things, so if I set everything else to 0 then it should leave only the
black, which is what I want.
> You might want to test with small images until those speed problems are
> tracked down.
OK, and I'll try something with the other method as well.

What a pain this is. All I want is an 8-bit mask shape to fit my 32-bit
graphic. Maybe I can bring it over from SC. I haven't tried that.

Ken N.

More information about the Use-livecode mailing list