CCL Home Page
Up Directory CCL README.PerlMagic
Introduction 

    PerlMagick, version 1.10, is an objected-oriented Perl interface to
    ImageMagick.  Use the module to read, manipulate, or write an image
    or image sequence from within a Perl script. This makes it suitable
    for Web CGI scripts. You must have ImageMagick 3.8.7 or above and
    Perl version 5.002 or greater installed on your system.

    See

      http://www.wizards.dupont.com/cristy/www/perl.html

    for additional information about PerlMagick.  See

      http://www.wizards.dupont.com/cristy/

    for instructions about installing ImageMagick.


Installation 

    Get the PerlMagick distribution and type the following: 

        gunzip PerlMagick-1.10.tar.gz
        tar xvf PerlMagick-1.10.tar
        cd Magick

    Next, edit Makefile.PL and change LIBS and INC to include the
    appropriate path information to the required libMagick library. You
    will also need paths to JPEG, PNG, TIFF, etc. libraries if they
    were included with your installed version of ImageMagick. Now type 

        perl Makefile.PL
        make
        make install

    You typically need to be root to install the software. There are
    ways around this.  Consult the Perl manual pages for more
    information. You are now ready to utilize the PerlMagick routines
    from within your Perl scripts.


Example Perl Magick Script 

    Here is an example script to get you started: 

        #!/usr/local/bin/perl
        use Image::Magick;

        $q = Image::Magick->new;
        $x = $q->Read("girl.gif", "logo.gif", "rose.gif");
        warn "$x" if $x;

        $x = $q->Crop(geom=>'100x100+100+100');
        warn "$x" if $x;

        $x = $q->Write("x.gif");
        warn "$x" if $x;

    The script reads three images, crops them, and writes a single
    image as a GIF animation sequence.

Modified: Mon Jun 23 02:01:34 1997 GMT
Page accessed 8257 times since Sat Apr 17 21:25:00 1999 GMT