>At 16:26 +0200 01_04_04, Ute Flierl wrote:
> >I habe a bitmap member in 16 bit color depth and want to create a 1
> >bit color black and white mask image from it with imaging lingo
> >where all pixels except the really white ones get black.
>
> >Does anyone know a way to solve this?
>
>At 13:40 05.04.2001, Jakob Hede Madsen wrote:
>Yes, James and Werner do:
>
>    srcImage = member(11).image
>    member(12).image = image(srcImage.width, srcImage.height, 1)
>    member(12).image.fill(srcImage.rect, rgb(0, 0, 0))
>    inkParams = [#ink:#backgroundTransparent, #color: rgb(255, 255, 255)]
>
>    -- All white pixels are not copied over.
>    -- The rest are converted to white pixels
>    member(12).image.copyPixels (srcImage, srcImage.rect,
>srcImage.rect, inkParams)
>
>    member(12).image.copyPixels (member(12).image, srcImage.rect,
>srcImage.rect, [#ink:#notCopy])
>
>    member(12).regpoint = member(11).regpoint
>
>Jakob

Thank you a lot, Jakob (and James and Werner), this works fine and very fast.

No I have another question:
How can I calculate a "reverse" quad for the sprite's quad to copy the 
pixels of the sprite's rect back to the member image (similar to what 
mapStageToMember does for points) ?
I can do it by using get/setPixel and mapStageToMember for every pixel but 
there must be a more elegant way.

Again thanks in advance for your help.

Ute




[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to