From: Andrew R. <ar...@ge...> - 2001-11-27 02:39:53
|
At 12:09 AM 27/11/01 +0000, Jo=E3o Cardoso wrote: >On Monday 26 November 2001 20:43, Alan W. Irwin wrote: >| 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 no strong objections to that, except that x20c will depend on=20 >libraries that may not be available on some other systems. In the=20 >first place, unix is not linux, plplot runs also on Macs and=20 >MSWindows, and the purpose of a demo is just showing a capability.=20 >That's the reason why I spend some time coding the reading of the=20 >image, instead of just calling a library. (After all it looks like=20 >that I have objections ;-) I am inclined to agree with Joao here with regards to the concerns of having those libraries available on other systems. I confess that have never looked to see if libpbm etc... are available for DJGPP, thought I expect they would be in some form. What would prove more difficult is evoking external image converter programs on other platforms. I /personally/ think it is perhaps best left as is, with the image command just rendering a user-supplied bitmap, and leaving the supply/generation of that bitmap up to the user. However, if we do want to have INTERNAL loading of bitmaps (not just user-provided ones) there are some other things to consider.=20 With respect to linking to libpbm etc... and letting them do the image reading, and then using external conversion programs to change the format into pbms etc... that almost SETS the preferred image format to the pbm family. Why pick that format over any others ? It is a very easy one to read in a demo like X20c, but isn't necessarily the most flexible or acceptable image format out there. There is almost zero use on platforms outside on unix/linux. We could just as easily (and perhaps more logically), link to libgd, libjpeg, & libpng then read either JPEGs and/or PNG images as the "raw format" supported by plplot, using external image converters to convert other formats (ie the pbm family) to PNGs. In some respect, especially for DOS, windows, and MACs, PNGs have more use, flexibility, and acceptance than the pbm family. Just a thought... - Andrew |