News:

Holy shit, it's 2018 2019 2020 2021 2022 2023 2024, and the US isn't a fascist country! What a time to be alive.

Main Menu

Translating to black&white

Started by iago, February 19, 2005, 05:05:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

iago

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?

iago

Judging by my output (which is all plain pixels anyway), averaging the pixels works well.  Gg! :)

Towelie

iago..... Its easy. Instead of RGB mode you use greyscale :-). Then when you switch it back Im pretty sure its still black and white.

iago

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.

Towelie


iago

I found a formula on some website for it:
(0.3*red) + (0.59*green) + (0.11*blue)

Apparently, that's better.