Menu

Tree [d59cce] default tip / PerlMagick /
 History

Read Only access


File Date Author Commit
 demo 2008-11-09 Bob Friesenhahn Bob Friesenhahn [fedc0d] fixup commit for branch 'GraphicsMagick-1_3'
 t 2024-12-19 Bob Friesenhahn Bob Friesenhahn [831362] PerlMagick/t/input2_TC1.wpg: Fix accidental fil...
 .gdbinit 2002-06-16 Bob Friesenhahn Bob Friesenhahn [0f8d98] Enhancements for Cygwin and MinGW.
 Changelog 2024-01-17 Bob Friesenhahn Bob Friesenhahn [dd7e6a] Fix spelling errors in code and documentation
 MANIFEST 2023-08-12 Bob Friesenhahn Bob Friesenhahn [56057d] Merge changes for the 1.3.41 release
 MANIFEST.SKIP 2016-09-11 Bob Friesenhahn Bob Friesenhahn [25264a] Fix content of PerlMagick MANIFEST.
 Magick.pm 2025-01-04 Bob Friesenhahn Bob Friesenhahn [f1e61f] Update copyright year and rotate ChangeLog
 Magick.pm.in 2025-01-04 Bob Friesenhahn Bob Friesenhahn [f1e61f] Update copyright year and rotate ChangeLog
 Magick.xs 2024-08-18 Bob Friesenhahn Bob Friesenhahn [7046c3] Merge changes for the 1.3.44 release
 Makefile.PL 2025-01-04 Bob Friesenhahn Bob Friesenhahn [f1e61f] Update copyright year and rotate ChangeLog
 Makefile.PL.in 2024-03-22 Bob Friesenhahn Bob Friesenhahn [8f02b3] Merge changes for the 1.3.43 release
 Makefile.am 2024-03-22 Bob Friesenhahn Bob Friesenhahn [8f02b3] Merge changes for the 1.3.43 release
 Makefile.nt 2017-12-23 Bob Friesenhahn Bob Friesenhahn [a473f9] Whitespace cleanup
 PerlMagickCheck.sh.in 2013-03-09 Bob Friesenhahn Bob Friesenhahn [3efefc] Merge in changes from tip which will become GM ...
 README.txt 2025-01-04 Bob Friesenhahn Bob Friesenhahn [f1e61f] Update copyright year and rotate ChangeLog
 build_manifest.sh 2017-07-04 Bob Friesenhahn Bob Friesenhahn [db4eb7] Merge changes for 1.3.26 release from head to G...
 typemap 2012-06-02 Bob Friesenhahn Bob Friesenhahn [a1f080] Add typemap file needed to build PerlMagick und...

Read Me

# Copyright (C) 2003-2025 GraphicsMagick Group
# Copyright (C) 2002 ImageMagick Studio
# Copyright (C) 1998,1999 E. I. du Pont de Nemours and Company
#
# This program is covered by multiple licenses, which are described in
# Copyright.txt. You should have received a copy of Copyright.txt with this
# package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
===========================================================================

Introduction

    PerlMagick, is an objected-oriented Perl interface to GraphicsMagick.
    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 GraphicsMagick 1.2 or above installed on
    your system for this module to work properly.

    See

        http://www.graphicsmagick.org/www/perl.html

    for additional information about PerlMagick.  See

        http://www.graphicsmagick.org/

    for instructions about installing GraphicsMagick.


Installation

    PerlMagick is configured by default by GraphicsMagick in order to
    create a starting Makefile.PL.  Additional edits to Makefile.PL
    may be required.  GraphicsMagick does not provide a separate
    distribution of PerlMagick.  Please follow the applicable steps
    described here in order to complete the installation of
    PerlMagick.

    Get the GraphicsMagick distribution and type the following:

        gunzip -c GraphicsMagick-1.3.tar.gz | tar -xvf -
        cd GraphicsMagick
        ./configure --enable-shared
        make
        su root (if necessary)
        make install
        cd PerlMagick

    If you used GraphicsMagick configure then Makefile.PL should already
    be prepared for use. If not, or you want to change a setting, then
    edit Makefile.PL and change LIBS and INC to include the appropriate
    path information to the required libGraphicsMagick library. You will
    also need library search paths (-L) to JPEG, PNG, TIFF, etc.
    libraries if they were included with your installed version of
    GraphicsMagick. If an extension library is built as a shared library
    but not installed in the system's default library search path, you
    may need to add run-path information (often -R or -rpath)
    corresponding to the equivalent library search path option so that
    the library can be located at run-time.

    To create and install the dymamically-loaded version of
    PerlMagick (the preferred way), execute

        perl Makefile.PL
        make
        su root (if necessary)
        make install

    [ Note that the following procedure for building a static
      PerlMagick seems to work only for perl 5.8.8 and earlier ]

    To create and install a new 'perl' executable (replacing your
    existing PERL interpreter!) with PerlMagick statically linked
    (but other libraries linked statically or dynamically according
    to system linker default), execute

        perl Makefile.PL
        make perl
        make -f Makefile.aperl inst_perl

    or to create and install a new PERL interpreter with a
    different name than 'perl' (e.g. 'PerlMagick') and with
    PerlMagick statically linked

        perl Makefile.PL MAP_TARGET=PerlMagick
        make PerlMagick
        make -f Makefile.aperl inst_perl

    See the ExtUtils::MakeMaker(3) manual page for more information on
    building PERL extensions (like PerlMagick).

    For Windows systems, type

        perl Makefile.nt
        nmake install

    For Unix, 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.


Testing PerlMagick

    Before PerlMagick is installed, you may want to execute

        make test

    to verify that PERL can load the PerlMagick extension ok.  Chances
    are some of the tests will fail if you do not have the proper
    delegates installed for formats like JPEG, TIFF, etc.  If 'make
    test' fails in some gruesome way (e.g. many tests fail), then it
    is advised not to install PerlMagick until the problem is
    resolved.

    The 'prove' utility may be used to execute a test from the
    PerlMagick build directory like

        prove --blib blib -I `pwd` -bv ./t/read.t

    To see a number of PerlMagick demonstration scripts, type

        cd demo
        make


Example Perl Magick Script

    Here is an example script to get you started:

        #!/usr/bin/perl
        use Graphics::Magick;

        $q = Graphics::Magick->new;
        $x = $q->Read("model.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.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.