]> granicus.if.org Git - imagemagick/blobdiff - www/perl-magick.html
(no commit message)
[imagemagick] / www / perl-magick.html
index 8bcfb6e636fcd28406e7e2ab18a4eabf1bf58d8e..2620605173b680f200d500686d2c8ffc98a44ed0 100644 (file)
@@ -1,29 +1,50 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\r
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" \r
+  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html version="-//W3C//DTD XHTML 1.1//EN"\r
+      xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"\r
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+      xsi:schemaLocation="http://www.w3.org/1999/xhtml\r
+                          http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">\r
 <head>\r
-  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>\r
-  <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U=" />\r
-  <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf" />\r
-  <style type="text/css" media="all">\r
-    @import url("../www/magick.css");\r
-  </style>\r
-  <link rel="shortcut icon" href="../images/wand.ico"  type="images/vnd.microsoft.icon"/>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>\r
+  <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U="/>\r
   <title>ImageMagick: PerlMagick, Perl API for ImageMagick</title>
   <meta http-equiv="Content-Language" content="en-US"/>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
   <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
+  <meta name="Application-name" content="ImageMagick"/>
+  <meta name="Description" content="Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats.  In addition resize, rotate, shear, distort and transform images."/>
+  <meta name="Application-url" content="http://www.imagemagick.org"/>
   <meta name="Generator" content="PHP"/>
   <meta name="Keywords" content="perlmagick, perl, api, for, imagemagick, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject, Swiss, Army, Knife, Image, Processing"/>
-  <meta name="Description" content="ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 100) including GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.  ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you can freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems.  The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images automagically and dynamically."/>
   <meta name="Rating" content="GENERAL"/>
   <meta name="Robots" content="INDEX, FOLLOW"/>
   <meta name="Generator" content="ImageMagick Studio LLC"/>
   <meta name="Author" content="ImageMagick Studio LLC"/>
   <meta name="Revisit-after" content="2 DAYS"/>
   <meta name="Resource-type" content="document"/>
-  <meta name="Copyright" content="Copyright (c) 1999-2010 ImageMagick Studio LLC"/>
+  <meta name="Copyright" content="Copyright (c) 1999-2011 ImageMagick Studio LLC"/>
   <meta name="Distribution" content="Global"/>
+  <link rel="icon" href="../images/wand.png"/>
+  <link rel="shortcut icon" href="../images/wand.ico"  type="images/x-icon"/>
+  <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"/>\r
+  <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />\r
+  <style type="text/css" media="all">\r
+    @import url("../www/magick.css");\r
+  </style>\r
+  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>\r
+  <script type="text/javascript" src="../fancybox/jquery.fancybox-1.3.4.pack.js"></script>\r
+  <link rel="stylesheet" type="text/css" href="../fancybox/jquery.fancybox-1.3.4.css" media="screen" />\r
+  <script type="text/javascript">\r
+    $(document).ready(function() {\r
+      $("a[href$=.jpg],a[href$=.png],a[href$=.gif]").fancybox({\r
+        'transitionIn'  : 'elastic',\r
+        'transitionOut' : 'elastic',\r
+        'overlayShow'   : false,\r
+        'opacity'       : true\r
+      });\r
+    });\r
+  </script>\r
 </head>\r
 \r
 <body id="www-imagemagick-org">\r
   style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>\r
 <a href="http://www.networkredux.com">\r
   <img src="../images/networkredux.png" alt="[sponsor]"\r
-  style="margin: 45px auto; border: 0px; float: left;" /></a>\r
+  style="margin-top: 42px; border: 0px; float: left;" /></a>\r
 <a href="http://www.imagemagick.org/discourse-server/">\r
-  <img src="../images/logo.jpg" alt=""\r
-  style="width: 114px; height: 118px; border: 0px; float: right;" /></a>\r
+  <img src="../images/logo.jpg"\r
+  alt="ImageMagick Logo"\r
+  style="width: 123px; height: 118px; border: 0px; float: right;" /></a>\r
 <a href="../index.html">\r
-  <img src="../images/sprite.jpg" alt=""\r
+  <img src="../images/sprite.jpg"\r
+  alt="ImageMagick Sprite"\r
   style="width: 114px; height: 118px; border: 0px; float: right;" /></a>\r
 </div>\r
 \r
-<div class="eastbar">\r
+<div class="westbar">\r
 \r
 <div class="menu">
   <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
@@ -57,6 +80,9 @@
 <div class="sub">
     <a title="Binary Release: MacOS X" href="../www/binary-releases.html#macosx">Mac OS X</a>
 </div>
+<div class="sub">
+    <a title="Binary Release: iPhone" href="../www/binary-releases.html#iPhone">iPhone</a>
+</div>
 <div class="sub">
     <a title="Binary Release: Windows" href="../www/binary-releases.html#windows">Windows</a>
 </div>
     <a title="Program Interface: PerlMagick" href="../www/perl-magick.html">PerlMagick</a>
 </div>
 <div class="sub">
-    <a title="Program Interface: Magick++" href="../Magick++/">Magick++</a>
+    <a title="Program Interface: Magick++" href="../www/magick++.html">Magick++</a>
 </div>
 <div class="sep"></div>\r
 <div  class="menu">
 </div>
 <div class="sep"></div>\r
 <div class="menu">
-  <a title="Search" href="http://www.imagemagick.org/script/search.php">Search</a>
+  <a title="Search" href="../www/search.html">Search</a>
 </div>
 <div class="sep"></div>\r
 <div class="menu">
-  <a title="Site Map"href="../www/sitemap.html">Site Map</a>
+  <a title="Site Map" href="../www/sitemap.html">Site Map</a>
 </div>
 <div  class="sub">
-    <a title="Site Map: Links"href="../www/links.html">Links</a>
+  <a title="Site Map: Links" href="../www/links.html">Links</a>
 </div>
 <div class="sep"></div>\r
 <div  class="menu">
 
 <div class="sponsbox">
 <div  class="sponsor">
-  <a title="Sponsor: Webdesign Agentur" href="http://www.ventzke-partner.de">Webdesign Agentur</a><!-- 201101010480 invendio.de-->
+  <a title="Sponsor: Website Hosting" href="http://hostreviewgeeks.com">Website Hosting</a><!-- 201106010090 alexanian media -->
+</div>
+<div  class="sponsor">
+  <a title="Sponsor: Druckerei" href="http://www.allesdruck.de">Druckerei</a><!-- 201107010240 r.leo -->
 </div>
 <div  class="sponsor">
-  <a title="Sponsor: LVM Versicherung" href="http://www.neu-reich.de">LVM Versicherung</a><!-- 201101010480 -->
+  <a title="Sponsor: Best Web Hosting" href="http://webhostinggeeks.com">Best Web Hosting</a><!-- 201110010720 -->
 </div>
 <div  class="sponsor">
-  <a title="Sponsor: Deko.net" href="http://www.deko.net">Deko.net</a><!-- 201101010600 Peterssen-->
+  <a title="Sponsor: Image Converter" href="http://www.batchphoto.com">Image Converter</a><!-- 201103010900 Bits Coffee-->
 </div>
 <div  class="sponsor">
-  <a title="Sponsor: Kredit" href="http://www.online-kredit-index.de">Kredit</a><!-- 201007010120 Buchhorn -->
+  <a title="Sponsor: Web Hosting Ratings" href="http://webhostingrating.com">Web Hosting Ratings</a><!-- 201110010720 -->
 </div>
 <div  class="sponsor">
-  <a title="Sponsor: Druckerei" href="http://www.print24.de/">Druckerei</a><!-- 201009010720 -->
+  <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
+</div>
+<div class="sponsor">
+  <a title="Sponsor: Web Hosting" href="http://www.bodhost.com/hosting.shtml">Web Hosting</a><!-- 201104010090 -->
 </div>
 <div  class="sponsor">
-   <a title="Sponsor: Druckerei Online" href="http://www.allesdruck.de">Druckerei Online</a><!-- 201012011200 allesdruck.de-->
+  <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
 </div>
 <div  class="sponsor">
-   <a title="Sponsor: Webdesign" href="http://www.renehornig.com/" title="Webdesign">Webdesign</a><!-- 20110901000240 -->
+   <a title="Sponsor: Fototapete" href=" http://www.allesdruck.de/Fototapete-Tapetendruck,category,8830.html">Fototapete</a><!-- 20110701000080 a-o.de -->
 </div>
 </div>
 </div>
+</div>\r
 \r
-\r
+<div class="eastbar">\r
+  <script type="text/javascript">\r
+  <!--\r
+    google_ad_client = "pub-3129977114552745";\r
+    google_ad_slot = "0574824969";\r
+    google_ad_width = 160;\r
+    google_ad_height = 600;\r
+  //-->\r
+  </script>\r
+  <script type="text/javascript"\r
+    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
+  </script>\r
 </div>\r
 \r
 <div class="main">\r
 \r
 \r
+<h1>PerlMagick API</h1>
 <p class="navigation-index">[<a href="#installation">Installation</a> &bull; <a href="#overview">Overview</a> &bull; <a href="#example">Example Script</a> &bull; <a href="#read">Read or Write an Image</a> &bull; <a href="#manipulate">Manipulate an Image</a> &bull; <a href="#set-attribute">Set an Image Attribute</a> &bull; <a href="#get-attribute">Get an Image Attribute</a> &bull; <a href="#compare">Compare an Image to its Reconstruction</a> &bull; <a href="#montage">Create an Image Montage</a> &bull; <a href="#blobs">Working with Blobs</a> &bull; <a href="#direct-access">Direct-access to Image Pixels</a> &bull; <a href="#miscellaneous">Miscellaneous Methods</a> &bull; <a href="#exceptions">Handling Exceptions</a>&bull; <a href="#constants">Constant</a> ]</p>
 
 <div class="doc-section">
-<a name="introduction"></a>
+<a id="introduction"></a>
 <p><a href="../www/download.html">PerlMagick</a> is an objected-oriented <a href="http://www.perl.com/perl/">Perl</a> interface to ImageMagick. Use the module to read, manipulate, or write an image or image sequence from within a Perl script. This makes it very suitable for Web CGI scripts. You must have ImageMagick 6.5.5 or above and Perl version 5.005_02 or greater installed on your system for PerlMagick to build properly.</p>
 
 <p>There are a number of useful scripts available to show you the value of PerlMagick. You can do Web based image manipulation and conversion with <a href="http://www.imagemagick.org/download/perl">MagickStudio</a>, or use <a href="https://www.imagemagick.org/subversion/ImageMagick/trunk/PerlMagick/demo/">L-systems</a> to create images of plants using mathematical constructs, and finally navigate through collections of thumbnail images and select the image to view with the <a href="http://webmagick.sourceforge.net/">WebMagick Image Navigator</a>.</p>
 <p>You can try PerlMagick from your Web browser at the <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">ImageMagick Studio</a>. Or, you can see <a href="../www/examples.html">examples</a> of select PerlMagick functions.</p>
 </div>
 
-<h2><a name="installation"></a>Installation</h2>
+<h2><a id="installation"></a>Installation</h2>
 <div class="doc-section">
 
 <p><b>UNIX</b></p>
 
 <p>ImageMagick must already be installed on your system. Next, get
 the <a href="../www/download.html">PerlMagick</a> distribution corresponding to the installed ImageMagick distribution
-(e.g., PerlMagick 6.62 for
-ImageMagick 6.6.2) and unpack it as shown below:</p>
+(e.g., PerlMagick 6.67 for
+ImageMagick 6.6.7) and unpack it as shown below:</p>
 
-<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>tar xvfz PerlMagick-6.62.tar.gz</span><span class='crtout'></span><span class="crtprompt"> $magick&gt; </span><span class='crtin'>cd PerlMagick</span></p>
+<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>tar xvfz PerlMagick-6.67.tar.gz</span><span class='crtout'></span><span class="crtprompt"> $magick&gt; </span><span class='crtin'>cd PerlMagick</span></p>
 <p>Next, edit <kbd>Makefile.PL</kbd> and change LIBS and INC to include the appropriate path information to the required <kbd>MagickCore</kbd> library. You may need paths to JPEG, PNG, TIFF, etc.  delegates if they were included with your installed version of ImageMagick. Build and install it like this:</p>
 
 <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>perl Makefile.PL</span><span class='crtout'></span><span class="crtprompt"> $magick&gt; </span><span class='crtin'>make</span><span class='crtout'></span><span class="crtprompt"> $magick&gt; </span><span class='crtin'>make install</span></p>
@@ -203,7 +248,7 @@ ImageMagick 6.6.2) and unpack it as shown below:</p>
 
 </div>
 
-<h2><a name="overview"></a>Overview</h2>
+<h2><a id="overview"></a>Overview</h2>
 <div class="doc-section">
 
 <p>Any script that wants to use PerlMagick methods must first define the methods within its namespace and instantiate an image object. Do this with:</p>
@@ -246,7 +291,7 @@ ImageMagick 6.6.2) and unpack it as shown below:</p>
 
 <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>$ENV{PATH}='/../bin:/usr/bin:/usr/local/bin';</span></p>
 <div style="margin: auto;">
-<h2><a name="example"></a>Example Script</h2>
+<h2><a id="example"></a>Example Script</h2>
 </div>
 
 <p>Here is an example script to get you started:</p>
@@ -335,7 +380,7 @@ ImageMagick 6.6.2) and unpack it as shown below:</p>
 </pre>
 
 <div style="margin: auto;">
-  <h2><a name="read"></a>Read or Write an Image</h2>
+  <h2><a id="read"></a>Read or Write an Image</h2>
 </div>
 
 <p>Use the methods listed below to either read, write, or display an image or image sequence:</p>
@@ -432,7 +477,7 @@ ImageMagick 6.6.2) and unpack it as shown below:</p>
 
 </div>
 
-<h2><a name="manipulate"></a>Manipulate an Image</h2>
+<h2><a id="manipulate"></a>Manipulate an Image</h2>
 <div class="doc-section">
 
 <p>Once you create an image with, for example, method ReadImage() you may want to operate on it. Below is a list of all the image manipulations methods available to you with PerlMagick.  There are <a href="../www/examples.html">examples</a> of select PerlMagick methods. Here is an example call to an image manipulation method:</p>
@@ -1301,7 +1346,7 @@ fill=&gt;<i><a href="../www/color.html">color name</a></i>, channel=&gt;{All, De
 
 </div>
 
-<h2><a name="set-attribute"></a>Set an Image Attribute</h2>
+<h2><a id="set-attribute"></a>Set an Image Attribute</h2>
 <div class="doc-section">
 
 <p>Use method Set() to set an image attribute. For example,</p>
@@ -1679,7 +1724,7 @@ can use the integers 1 and 0.</p>
 
   <tr>
     <td valign="top">type</td>
-    <td valign="top">{Bilevel, Grayscale, GrayscaleMatte, Palette, PaletteMatte, TrueColor, TrueColorMatte, ColorSeparation, ColorSeparationMatte, Optimize }</td>
+    <td valign="top">{Bilevel, Grayscale, GrayscaleMatte, Palette, PaletteMatte, TrueColor, TrueColorMatte, ColorSeparation, ColorSeparationMatte}</td>
     <td valign="top">image type</td>
   </tr>
 
@@ -1718,7 +1763,7 @@ can use the integers 1 and 0.</p>
 
 </div>
 
-<h2><a name="get-attribute"></a>Get an Image Attribute</h2>
+<h2><a id="get-attribute"></a>Get an Image Attribute</h2>
 <div class="doc-section">
 
 <p>Use method Get() to get an image attribute. For example,</p>
@@ -1970,7 +2015,7 @@ can use the integers 1 and 0.</p>
 
 </div>
 
-<h2><a name="compare"></a>Compare an Image to its Reconstruction</h2>
+<h2><a id="compare"></a>Compare an Image to its Reconstruction</h2>
 <div class="doc-section">
 </div>
 
@@ -2028,7 +2073,7 @@ can use the integers 1 and 0.</p>
 
 <p>In addition to the reported root mean squared error of around 0.024, a difference image is displayed so you can visually identify the difference between the images.</p>
 
-<h2><a name="montage"></a>Create an Image Montage</h2>
+<h2><a id="montage"></a>Create an Image Montage</h2>
 <div class="doc-section">
 
 <p>Use method Montage() to create a composite image by combining several separate images. The images are tiled on the composite image with the name of the image optionally appearing just below the individual tile. For example,</p>
@@ -2162,7 +2207,7 @@ South, SouthEast</td>
 
 </div>
 
-<h2><a name="blobs"></a>Working with Blobs</h2>
+<h2><a id="blobs"></a>Working with Blobs</h2>
 <div class="doc-section">
 
 <p>A blob contains data that directly represent a particular image
@@ -2215,7 +2260,7 @@ blobs in any of these image <a href="../www/formats.html">formats</a> and provid
 
 </div>
 
-<h2><a name="direct-access"></a>Direct-access to Image Pixels</h2>
+<h2><a id="direct-access"></a>Direct-access to Image Pixels</h2>
 <div class="doc-section">
 
 <p>Use these methods to obtain direct access to the image pixels:</p>
@@ -2264,7 +2309,7 @@ blobs in any of these image <a href="../www/formats.html">formats</a> and provid
 
 </div>
 
-<h2><a name="miscellaneous"></a>Miscellaneous Methods</h2>
+<h2><a id="miscellaneous"></a>Miscellaneous Methods</h2>
 <div class="doc-section">
 
 <p>The Append() method append a set of images. For example,</p>
@@ -2427,6 +2472,14 @@ blobs in any of these image <a href="../www/formats.html">formats</a> and provid
   $image-&gt;RemoteCommand('image.jpg');
 </pre>
 
+<p>The Smush() method smushes a set of images together. For example,</p>
+
+<pre class="code">
+  $p = $image-&gt;Smush(stack=&gt;{true,false},offset=&gt;<em>integer</em>);
+</pre>
+
+<p>smushes together all the images associated with object <kbd>$image</kbd>. By default, images are smushed left-to-right. Set <kbd>stack</kbd> to True to smushed them top-to-bottom.</p>
+
 <p>Statistics() returns the image statistics for each channel in the image. The returned values are an array of depth, minima, maxima, mean, standard deviation, kurtosis, and skewness values in RGB, CMYK, RGBA, or CMYKA order (depending on the image type).</p>
 
 <pre class="code">
@@ -2443,7 +2496,7 @@ blobs in any of these image <a href="../www/formats.html">formats</a> and provid
 
 </div>
 
-<h2><a name="exceptions"></a>Handling Exceptions</h2>
+<h2><a id="exceptions"></a>Handling Exceptions</h2>
 <div class="doc-section">
 
 <p>All PerlMagick methods return an undefined string context upon success. If any problems occur, the error is returned as a string with an embedded numeric status code. A status code less than 400 is a warning. This means that the operation did not complete but was recoverable to some degree. A numeric code greater or equal to 400 is an error and indicates the operation failed completely. Here is how exceptions are returned for the different methods:</p>
@@ -2494,7 +2547,7 @@ blobs in any of these image <a href="../www/formats.html">formats</a> and provid
 
 </div>
 
-<h2><a name="constants"></a>Constants</h2>
+<h2><a id="constants"></a>Constants</h2>
 <div class="doc-section">
 
 <p>PerlMagick includes these constants:</p>
@@ -2555,17 +2608,28 @@ blobs in any of these image <a href="../www/formats.html">formats</a> and provid
 </div>\r
 \r
 <div id="linkbar">\r
<!--    <span id="linkbar-west">&nbsp;</span>  -->\r
   <span id="linkbar-west">&nbsp;</span>\r
     <span id="linkbar-center">\r
       <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;\r
-    <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>\r
+      <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>\r
     </span>\r
     <span id="linkbar-east">&nbsp;</span>\r
   </div>\r
   <div class="footer">\r
-    <span id="footer-west">&copy; 1999-2010 ImageMagick Studio LLC</span>\r
+    <span id="footer-west">&copy; 1999-2011 ImageMagick Studio LLC</span>\r
     <span id="footer-east"> <a href="http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>\r
   </div>\r
   <div style="clear: both; margin: 0; width: 100%; "></div>\r
+  <script type="text/javascript">\r
+    var _gaq = _gaq || [];\r
+    _gaq.push(['_setAccount', 'UA-17690367-1']);\r
+    _gaq.push(['_trackPageview']);\r
+\r
+    (function() {\r
+      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\r
+      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\r
+      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\r
+    })();\r
+  </script>\r
 </body>\r
 </html>\r