Clan x86

Technical (Development, Security, etc.) => Graphics => Topic started by: iago on February 19, 2005, 05:05:15 PM

Title: Translating to black&white
Post by: iago on February 19, 2005, 05:05:15 PM
To translate an image from color to black and white, how is that normally done? My guess is that the RGB values of each pixel averaged?
Title: Re: Translating to black&white
Post by: iago on February 19, 2005, 06:02:57 PM
Judging by my output (which is all plain pixels anyway), averaging the pixels works well.  Gg! :)
Title: Re: Translating to black&white
Post by: Towelie on February 19, 2005, 11:40:05 PM
iago..... Its easy. Instead of RGB mode you use greyscale :-). Then when you switch it back Im pretty sure its still black and white.
Title: Re: Translating to black&white
Post by: iago on February 20, 2005, 11:14:34 AM
I'm not talking about photoshop, I'm writing a program.  I have the RGB for each pixel, but I wanted to make them into greyscale.
Title: Re: Translating to black&white
Post by: Towelie on February 20, 2005, 08:34:41 PM
oh well gj.
Title: Re: Translating to black&white
Post by: iago on February 20, 2005, 08:52:56 PM
I found a formula on some website for it:
(0.3*red) + (0.59*green) + (0.11*blue)

Apparently, that's better.