http://www.perlmonks.org?node_id=542584

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I've looked through some of the SOPW already and a few suggestions have been offered. Mainly ImageMagick and GD. Unfortunately, neither are prepackaged with Perl and most web hosts don't have either of these installed (and won't if you ask).

Is there any clean light-weight image resizer that doesn't depend on either of the two modules listed above? All I need to do is size images DOWN if they are too big. I don't have to increase their size, add any effects to the image, etc. Just a simple resize.

2006-04-13 Retitled by planetscape, as per Monastery guidelines
Original title: 'yet another image resizing question'

Replies are listed 'Best First'.
Re: Seeking lightweight image resizing module likely to be installable on most web hosts
by xorl (Deacon) on Apr 11, 2006 at 19:42 UTC
    install Image::Magic in your directory and then
    use lib '/path/to/imagic/';
Relevant plug *not an answer*
by blogical (Pilgrim) on Apr 11, 2006 at 16:19 UTC
    http://www.nearlyfreespeech.net has great perl support, including Image::Magick. They installed Mason when I asked too, so if you need anything they'll probably be happy to plug it in. For a current list of perl modules, check out their perl support page. CHEAP++!
    No, I'm not in any way getting $$$ for this, just a very satisfied customer.

    "One is enough. If you are acquainted with the principle, what do you care for the myriad instances and applications?"
    - Henry David Thoreau, Walden

      Thanks but I'm looking for a Perl solution, not a hosting one. I have a site that sits on Image::Magick and it'd be so much easier to get better hosting if I didn't have to use the module. I heard something about Image::Thubmnail(er)?
Re: Seeking lightweight image resizing module likely to be installable on most web hosts
by ikegami (Patriarch) on Apr 11, 2006 at 16:31 UTC
    ImageMagick is also available as command line tools. Those would be much easier to install.
Re: Seeking lightweight image resizing module likely to be installable on most web hosts
by tonyc (Pilgrim) on Apr 12, 2006 at 00:02 UTC

    If you can't install modules, or they won't install modules, you might want to check if the netpbm tools are installed, if the libjpeg tools are also installed, you'll be able read and resize most image formats you're likely to need. These tools are pretty common, otherwise the imagemagick tools might be installed as someone else mentioned.

    In general though, if your host won't install the tools you need to host with them, then it's time to find another host.

Re: Seeking lightweight image resizing module likely to be installable on most web hosts
by zentara (Archbishop) on Apr 11, 2006 at 16:31 UTC
    I've yet to see a pure perl script to make a thumbnail from an image. The all use ImageMagick, GD, or Imager. There are a few scripts for getting the "image size" in pure Perl, but they won't do the resizing.

    I'm not really a human, but I play one on earth. flash japh
Re: Seeking lightweight image resizing module likely to be installable on most web hosts
by sulfericacid (Deacon) on Apr 11, 2006 at 16:51 UTC
    Haven't tried it, but take a look at Image::Epeg . Says it only works with Jpegs though.


    "Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

    sulfericacid
A reply falls below the community's threshold of quality. You may see it by logging in.