Re: looking for an xpmto<foo> converter than understands none

Paul Harrington (
Wed, 31 May 1995 11:38:38 +0100

Steve> Eh? The xpmtoppm translation shouldn't add colors. Maybe the 'ppmquant
Steve> 5' is munging things -- it shouldn't be needed. Could the dithering be
Steve> being done by whatever you're using to display the image?

I am not explaining myself too well ... the dithering _is_ being done
by what I am using to display the image. I want some way of forcing
the ppm's to be display undithered within the Tk canvas. If I
translate the xpm by using xv, then they work.

[ Details ]
The xpmtoppm is producing an image which xv reports as having a 4x8x4
colourmap. This gets dithered by both xv and the Tk canvas and does
not look nice. When I force xv to use an 8-bit display mode, it is
display correctly without dithering. When I use xv to view the
original xpm, it is displayed in 8 bit mode by default and obviously
looks correct. When I get xv to save the xpm as a raw ppm, it gets
displayed correctly in the Tk canvas.

Anthony> You are asking ppmquant to reduce the number of colors to only 5,
Anthony> of course it is going to look horrible.

I was using the Irish flag as my example and that has only 5 colours
in in (green, white, orange, black and none). I don't understand where
the 'extra' colours are coming from i.e. why does xv and the Tk
canvas feel the need to dither the display when there are so few
colours in the image in the first place? (I am running on a 8-bit

I have been unable so far to FTP the scripts that Anthony mentions in
his message ... I guess that an examination of them should answer a
few of my questions.