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

We have an application that requires us to manipulate images using Activeperl 522. Due to the image size, we'd prefer to use the JPEG format. However the GD library w've got for Activeperl 522 (version 0.21) doesn't appear to support this format.

We can obtain the images in either GIF or JPEG format. We need to determine the image size and scale it proportionally so that the width or height meets a maximum size criteria. The ability to create thumbnails would also be nice.

Replies are listed 'Best First'.
ImageMagick (and Image::Magick)
by Corion (Patriarch) on Jun 02, 2000 at 18:00 UTC
    I use Image::Magick (available from the ImageMagick homepage or precompiled from ActiveState) for image manipulation, but there is one big downside - there is no precompiled binary for ActivePerl 613, the latest build (that I know of). The old version simply crashes Perl. Other than that, Image::Magick is the way to go if you want image manipulation.

    Currently I'm glueing the application together by using the command line interface to ImageMagick, which is slower but at least it works even under Perl 5.6 :)

    For the ImageMagick package, you need the ImageMagick binaries for Windows and the PerlMagick binaries for Windows. The ImageMagick binaries are available here and the PerlMagick binaries for Perl 5.005 are available here, but remember that they don't work with Perl 5.6 / the latest ActivePerl build !

    If anybody is so kind to compile me PerlMagick binaries for the latest ActivePerl build, please make them available to the general public or leave me a message :)

RE: Manipulating Jpegs with ActivePerl 522
by t0mas (Priest) on Jun 02, 2000 at 14:11 UTC
    The GD (1.27) I use can handle jpegs. Try to get it with ppm or at http://www.activestate.com/ppmpackages/5.005/zips/. Or switch to Image-Magick.

    /brother t0mas