From: <jca...@in...> - 2001-11-28 01:45:44
|
On Tuesday 27 November 2001 21:23, Alan W. Irwin wrote: | 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. But I had to compile my libgd, because Suse-7.0 didn't have it! We have irreconciliable opinions in this respect. Joao |