On Thursday 21 February 2002 1:39 pm, Asger K. Alstrup Nielsen wrote:
> On Thu, 21 Feb 2002, Angus Leeming wrote:
> 
> > and the problem is now defining an appropriate mapping from the colour
> > colourmap to a grayscale or monochrome one.
> 
> I'm not sure what the problem is, but if you want to convert from
> color to grayscale, just do this:
> 
>   int gray = (red + blue + green) / 3;
> 
> If you want to go monochrome, do this:
> 
>   bool black = gray >= 128;
> 
> Greets,
> 
> Asger

Thanks, Asger. I was playing already!
A

Reply via email to