sorry, forgot to remove daniel's postfix "correction" from the subject line, so here once more, with correct subject:

here a handler which produces a similar result, but without the
pixel-wise GetPixel/SetPixel, so much faster:

on colorize (tGrayscaleImage, tColor)
 tImage = image(tGrayscaleImage.width, tGrayscaleImage.height, 24)
 tImage.copypixels(tGrayscaleImage, tImage.rect, tImage.rect, \
 [#bgcolor: tColor, #maskImage:tGrayscaleImage.createMask() ])
 return tImage
end

use it like:
m = new(#bitmap)
m.image = colorize(myGrayBitmapMember.image, RGB(0,0,255))

cheers,
valentin

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/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