From: Alan W. I. <ir...@be...> - 2001-11-26 20:43:19
|
I have a suggestion. Why not add a function to this demo to input various image formats and extract the information required by plimage? Right now, there is rudimentary support for reading ppm images from x20c.c, and I suggest replacing this with the appropriate calls to libpbm, libpgm, libpnm, or libppm. I have never used those free libraries directly, but the license (as interpreted by the Debian copyright notice) puts no restrictions whatsoever on our code, and it is the library used by the huge number of linux image converters. Also, use of these libraries (which come with the netpbm package, see http://netpbm.sourceforge.net/netpbm.html#lbAM) means you have direct read access to pbm, pgm, pnm, or ppm images from your C code. Furthermore, from the C code you could invoke the the free image converter with the system command that was appropriate (e.g., pngtopnm, jpegtopnm, tifftopnm, pstopnm, and many more or indeed anytopnm which is a superset of all of them) to convert a given format to pnm which can then be read into x20c using libpnm. If there are no objections to this way to have access to many different image formats, I am willing to give this a try. Alan email: ir...@be... phone: 250-727-2902 FAX: 250-721-7715 snail-mail: Dr. Alan W. Irwin Department of Physics and Astronomy, University of Victoria, P.O. Box 3055, Victoria, British Columbia, Canada, V8W 3P6 __________________________ Linux-powered astrophysics __________________________ |