What's the algo. to turn an image into grayscale???
Printable View
What's the algo. to turn an image into grayscale???
Hey
Uhm first I have a question: What is it all about this Chrises ccclub???? who started that? (I probably sound all dumb here now, but I just have no clue)
Well I guess you can just add up the rbg values and divide them by 3.
You could convert the colour values to HSB and then just use the brightness.
MisanThrop, you forgot to tell him that (R + G + B) / 3 should be dumped in all of the 3 RGB values ;)
The problem with this algorythm is that it makes the images too dark.
In real grayscale photos, bright red becomes white.
But with this algorythm it becomes dark gray. Any idea? :confused: This problem has always puzzled me :)
The algorithm you choose depends on the situation. You can average, take the brightness, or just set all the values to their R, G, or B value.
Yeah, but I wanted one that would adjust itself automatically ;)
Could you tell me how to change it to it's respective HSB parameters?
There's something on PSC somewhere, but my rainbow text program does it:
(oops I posted on the wrong thread :p )
Can you pleas give us the source code? :)
Bugger it. I thought that did have the source *grrrr*
Ah...I see why...I had two files, same name, different contents :rolleyes:
Heh nice :)
I thought that you had used that code to do the color gradations you see here, do you where I can find it?
Because I wanna make my own that has a new feature... but I'm not sure if it already has it.