Thanks Adam, for a good description of NetPBM. I understand that better now. Seems very similar to ImageMagick (which is also a suite of tools).

I have spent some time looking at PBMPlus at acme.com, and reading the NetPBM docs, but I don't see much interfacing with Perl.

If I were using Perl for cgi, what would be the mechanism for interfacing with the NetPBM programs? CPAN did not reveal any packages for use with NetPBM or PBM.


Adam Wells wrote:
At 10:46 -0600 11/13/02, Puneet Kishor wrote:

There has been a lot of discussion here re (Image|Perl)Magick. I have not installed it on my iBook but have installed and used it on my Windoze box and found it to be very fun. However, I recently came across NetPBM. While it might be old news for some of you, I had never heard of it, and reading through the docs it seems to be everything ImageMagick is.

Any insights into NetPBM as a replacement/substitute/alternative for ImageMagick on Perl/OS X platform would be greatly appreciated.

I've used NetPBM for some personal projects and found that it filled my needs. It can convert images to various formats, rotate them, scale them, add borders, and do various other operations. It does this through the use of small tools that you can chain together (as with many Unix toolsets).

You can do such things as rotate to an arbitrary angle (pnmrotate), flip (pnmflip), scale or resize (pnmscale), overlay images (pnmcomp), quantize the colors (pnmquant), render text into an image (pnmtext), create a grayscale or color ramp (pnmramp), add text to an image (ppmlabel), brighten or dim an image (ppmbrighten), concatenate images (pnmcat), add borders (pnmpad), select a rectangular region (pamcut), remove snow (pnmclean), and many more. You can even apply the rules of Conway's Game of Life to an image (pbmlife). Each of these is a distinct tool, and when you install NetPBM, you get about 220 of these little tools that all do one thing each. Then you combine them in shell scripts, lengthy command lines with lots of pipes, or whatever. And they each have a good man page. :)

For my needs, I was using Perl to create POV-Ray source code, which I would render into 360-degree panoramic images. Then I needed to rotate, resize, and convert them to another format before they got passed to my image-to-QTVR tool to create QTVR movies. NetPBM was great for these needs. I'll probably be adding some labels or text later and NetPBM will be able to do that too.

The downside to NetPBM is that all of the tools work with only the PBM or PPM formats, so you need to get your images into this format first. But there's usually a NetPBM tool to convert your image into PBM, as well as to convert it from PBM to your desired final format after you've manipulated it.

Unfortunately, I can't really compare it to ImageMagick since I've never used it -- NetPBM is what I heard of first and it was able to fill all my needs, so I never really felt a need to investigate IM.

adam

Reply via email to