Valentin's has better quality results, too. I didn't even know about the bgcolor parameter. That
may help speed up a project I'm working on this week.
Thanks Valentin!
Kind Regards,
Daniel
Valentin Schmidt wrote:
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))
[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!]