From: Alan W. I. <ir...@be...> - 2001-11-27 07:36:14
|
My motivation here is to have a good-looking demo. Obviously something is not correct about the current method of reading in lena.pgm since the other parts of the demo show that plimage works well, and if I look at lena.pgm directly with kview, that is one heck of a good-looking image....;-) Probably, one could fix up the current pgm input, but I don't see much poin= t to this reincarnation of the libpgm library if we can satisfy the valid cross-platform concerns that you and Joao have expressed another way. Thus, Andrew, I like your suggestion for using png format for our standard input format and using libgd to read it since both are cross-platform. Also as you point out, on Linux the user can convert anything to png format usin= g the netpbm package. I have already used that package in the following way: anytopnm < lena.pgm | pnmtopng > lena.png. The high-quality result was indistinguishable from the original even at high magnification. Thus, I would like to concentrate now on getting proper input of png images for x20c.c so we can have a good-looking result. Now the big question for Andrew: would you be willing to programme png inpu= t to x20c.c using libgd (version 2)? I am willing to do this myself starting tomorrow using libgd version 2.0.1 that is on my Debian woody system, but i= t might take me a while and with your C skills it might be trivial for you to do. Even if you provide just the bare bones of the png reading programme, i= t would help me get a much quicker start. Let me know what you decide. Alan email: ir...@be... phone: 250-727-2902=09FAX: 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 __________________________ On Tue, 27 Nov 2001, Andrew Roach wrote: > 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 > >libraries that may not be available on some other systems. In the > >first place, unix is not linux, plplot runs also on Macs and > >MSWindows, and the purpose of a demo is just showing a capability. > >That's the reason why I spend some time coding the reading of the > >image, instead of just calling a library. (After all it looks like > >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. > > 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/o= r > 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 > > > > > _______________________________________________ > Plplot-devel mailing list > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-devel > |