gamma - grayscale filter

Blitz3D Forums/Blitz3D Programming/gamma - grayscale filter

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I did a working grayscale function a long time ago in 5 min. Since all grayscale pictures has equal RGB values (very obvious), you can do this perfectly by taking each pixel from the src image, find the middlevalue (basic math: m=rgb/3) of RGB, and write that value as RGB to dest image at same pixel. 20,10,60 at org pic would ie be 30,30,30 on dest pic. I'm sure u understand.