On Thu, Feb 21, 2002 at 02:00:41PM +0000, Angus Leeming wrote: > 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
Hmm, I remember John Levon published a script for doing this automatically. http://www.movement.uklinux.net/patches/lyx/xpm.diff Martin
msg33347/pgp00000.pgp
Description: PGP signature