From: Alan W. I. <ir...@be...> - 2001-11-27 21:23:58
|
On Tue, 27 Nov 2001, Alan W. Irwin wrote: > (png > format also has the truecolour alternative, but we must avoid that because > plplot would not be able to work with it.) I have just found that the > combination of pnmquant and pnmtopng does produce the colour-pallete style > png format. Now I have done little coding yet, but from the documentation > it looks like the colour pallette is accessible using the libgd library so > that for the cost of ~15 extra lines of code in x20c we can demonstrate > processing a colour image. With a few lines of commentary in x20c.c we can > also advise all our Linux users how to use the netpbm utilities to transform > *any* of their favorite colour images into a png image with colour palette > that the ~15 lines of libgd-related code in x20c.c could understand. Correction: I have just discovered the gdImageTrueColorToPalette function in libgd which translates an image from truecolour to palette. So strike my comments about netpbm. Everything we need to process colour png images of any type is already in libgd. Alan |