3 PerlMagick, is an objected-oriented Perl interface to ImageMagick.
4 Use the module to read, manipulate, or write an image or image sequence
5 from within a Perl script. This makes it suitable for Web CGI scripts. You
6 must have ImageMagick 6.6.7 or above installed on your system for this
7 module to work properly.
11 http://www.imagemagick.org/script/perl-magick.php
13 for additional information about PerlMagick. If you have problems, go to
15 http://www.imagemagick.org/discourse-server/viewforum.php?f=7
17 for help. For instructions about installing ImageMagick, see
19 http://www.imagemagick.org/
24 Get the PerlMagick distribution and type the following:
26 gunzip ImageMagick-6.6.7-0.tar.gz
27 tar xvf ImageMagick-6.6.7
29 Follow the ImageMagick installation instructions in INSTALL-unix.txt
34 Next, edit Makefile.PL and change LIBS and INC to include the appropriate
35 path information to the required libMagick library. You will also need
36 library search paths (-L) to JPEG, PNG, TIFF, etc. libraries if they were
37 included with your installed version of ImageMagick. If an extension
38 library is built as a shared library but not installed in the system's
39 default library search path, you may need to add run-path information
40 (often -R or -rpath) corresponding to the equivalent library search
41 path option so that the library can be located at run-time.
43 To create and install the dymamically-loaded version of PerlMagick
44 (the preferred way), execute
50 To create and install a new 'perl' executable (replacing your existing
51 PERL interpreter!) with PerlMagick statically linked (but other libraries
52 linked statically or dynamically according to system linker default),
57 make -f Makefile.aperl inst_perl
59 or to create and install a new PERL interpreter with a different name
60 than 'perl' (e.g. 'PerlMagick') and with PerlMagick statically linked
62 perl Makefile.PL MAP_TARGET=PerlMagick
64 make -f Makefile.aperl inst_perl
66 See the ExtUtils::MakeMaker(3) manual page for more information on
67 building PERL extensions (like PerlMagick).
69 For Windows systems, type
74 For Unix, you typically need to be root to install the software.
75 There are ways around this. Consult the Perl manual pages for more
76 information. You are now ready to utilize the PerlMagick routines from
77 within your Perl scripts.
79 Installation - Win32 Strawberry perl
81 On Win32 Strawberry perl the prefered way of installing PerlMagick is the
84 1) Download and install ImageMagick Windows binaries from
85 http://www.imagemagick.org/script/binary-releases.php#windows
87 2) You HAVE TO choose dynamic (DLL) ImageMagick binaries. Note: it is not
88 possible to mix 32/64bit binaries of perl and ImageMagick
90 3) During installation select that you want to install ImageMagick's
91 development files (libraries+headers)
93 4) You NEED TO have ImageMagick's directory in your PATH. Note: we are
94 checking the presence of convert.exe or identify.exe tools
96 5) You might need Visual C++ Redistributable Package installed on your
97 system. See instructions on ImageMagick's Binary Release webpage.
99 6) If you have all prerequisites 1)...5) you can simply install
100 ImageMagick by running: cpan -i Image::Magick
105 Before PerlMagick is installed, you may want to execute
109 to verify that PERL can load the PerlMagick extension ok. Chances are
110 some of the tests will fail if you do not have the proper delegates
111 installed for formats like JPEG, TIFF, etc.
113 To see a number of PerlMagick demonstration scripts, type
119 Example Perl Magick Script
121 Here is an example script to get you started:
126 $q = Image::Magick->new;
127 $x = $q->Read("model.gif", "logo.gif", "rose.gif");
130 $x = $q->Crop(geom=>'100x100+100+100');
133 $x = $q->Write("x.gif");
136 The script reads three images, crops them, and writes a single image
137 as a GIF animation sequence.