Hi,
I'd like to convert a rgb bitmap to greyscale with lingo. How can it be
done?
I suppose I can use imaging lingo to adjust the (R,G,B).
will this work?:

repeat with something to something else -- scan whole image...
  myPixel = imageToConvert.getPixel(x,y)
  tempValue = (myPixel.color.red + myPixel.color.green + myPixel.color.blue)
/ 3
  myPixel.color.red = tempValue
  myPixel.color.green = tempValue
  myPixel.color.blue = tempValue
end repeat


Syntax may be off a little, but will it work by just take the average of R,
G and B. Then assign the average value to the three channels?

thanks!
Martijn

[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