]> granicus.if.org Git - imagemagick/blobdiff - www/perl-magick.html
(no commit message)
[imagemagick] / www / perl-magick.html
index 4200b351db105adef16a61f95c3180914be69acf..16143e76d9c771888caedec9b465cd3daba7d456 100644 (file)
@@ -1,13 +1,13 @@
 <!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">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">\r
 <head>\r
-  <meta http-equiv="Content-Type" value="application/xhtml+xml" />\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="screen,projection"><!--\r
+  <style type="text/css" media="all">\r
     @import url("../www/magick.css");\r
-  --></style>\r
+  </style>\r
   <link rel="shortcut icon" href="../images/wand.ico"  type="images/vnd.microsoft.icon"/>
   <title>ImageMagick: PerlMagick, Perl API for ImageMagick</title>
   <meta http-equiv="Content-Language" content="en-US"/>
 <div class="eastbar">\r
 \r
 <div class="menu">
-  <a href="../index.html">About ImageMagick</a>
+  <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
 </div>
 <div class="sep"></div>\r
 <div class="menu">
-  <a href="../www/command-line-tools.html">Command-line Tools</a>
+  <a title="Command-line Tools" href="../www/command-line-tools.html">Command-line Tools</a>
 </div>
 <div class="sub">
-    <a href="../www/command-line-processing.html">Processing</a>
+    <a title="Command-line Tools: Processing" href="../www/command-line-processing.html">Processing</a>
 </div>
 <div class="sub">
-    <a href="../www/command-line-options.html">Options</a>
+    <a title="Command-line Tools: Options" href="../www/command-line-options.html">Options</a>
 </div>
 <div class="sub">
-    <a href="http://www.imagemagick.org/Usage/">Usage</a>
+    <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
 </div>
 <div class="menu">
-  <a href="../www/api.html">Program Interfaces</a>
+  <a title="Program Interfaces" href="../www/api.html">Program Interfaces</a>
 </div>
 <div class="sub">
-    <a href="../www/magick-wand.html">MagickWand</a>
+    <a title="Program Interface: MagickWand" href="../www/magick-wand.html">MagickWand</a>
 </div>
 <div class="sub">
-    <a href="../www/magick-core.html">MagickCore</a>
+    <a title="Program Interface: MagickCore" href="../www/magick-core.html">MagickCore</a>
 </div>
 <div class="sub">
-    <a href="../www/perl-magick.html">PerlMagick</a>
+    <a title="Program Interface: PerlMagick" href="../www/perl-magick.html">PerlMagick</a>
 </div>
 <div class="sub">
-    <a href="../Magick++/">Magick++</a>
+    <a title="Program Interface: Magick++" href="../Magick++/">Magick++</a>
 </div>
 <div class="menu">
-  <a href="../www/architecture.html">Architecture</a>
+  <a title="Architecture" href="../www/architecture.html">Architecture</a>
 </div>
 <div class="sep"></div>\r
 <div  class="menu">
-   <a href="../www/install-source.html">Install from Source</a>
+   <a title="Install from Source" href="../www/install-source.html">Install from Source</a>
 </div>
 <div class="sub">
-    <a href="../www/install-source.html#unix">Unix</a>
+    <a title="Install from Source: Unix" href="../www/install-source.html#unix">Unix</a>
 </div>
 <div class="sub">
-    <a href="../www/install-source.html#windows">Windows</a>
+    <a title="Install from Source: Windows" href="../www/install-source.html#windows">Windows</a>
  </div>
 <div class="menu">
-  <a href="../www/binary-releases.html">Binary Releases</a>
+  <a title="Binary Releases" href="../www/binary-releases.html">Binary Releases</a>
 </div>
 <div class="sub">
-    <a href="../www/binary-releases.html#unix">Unix</a>
+    <a title="Binary Release: Unix" href="../www/binary-releases.html#unix">Unix</a>
 </div>
 <div class="sub">
-    <a href="../www/binary-releases.html#macosx">Mac OS X</a>
+    <a title="Binary Release: MacOS X" href="../www/binary-releases.html#macosx">Mac OS X</a>
 </div>
 <div class="sub">
-    <a href="../www/binary-releases.html#windows">Windows</a>
+    <a title="Binary Release: Windows" href="../www/binary-releases.html#windows">Windows</a>
 </div>
 <div class="menu">
-  <a href="../www/resources.html">Resources</a>
+  <a title="Resources" href="../www/resources.html">Resources</a>
 </div>
 <div class="sep"></div>\r
 <div class="menu">
-  <a href="../www/download.html">Download</a>
+  <a title="Download" href="../www/download.html">Download</a>
 </div>
 <div class="sep"></div>\r
 <div class="menu">
-  <a href="http://www.imagemagick.org/script/search.php">Search</a>
+  <a title="Search" href="http://www.imagemagick.org/script/search.php">Search</a>
 </div>
 <div class="sep"></div>\r
 <div class="menu">
-  <a href="../www/sitemap.html">Site Map</a>
+  <a title="Site Map"href="../www/sitemap.html">Site Map</a>
 </div>
 <div  class="sub">
-    <a 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">
-  <a href="../www/sponsors.html">Sponsors:</a>
+  <a title="Sponsors" href="../www/sponsors.html">Sponsors:</a>
 
 <div class="sponsbox">
 <div  class="sponsor">
-   <a href="http://www.hygi.de">Reinigungsmittel</a><!-- 201002000400+ -->
+  <a title="Sponsor: Webdesign Agentur" href="http://www.ventzke-partner.de">Webdesign Agentur</a><!-- 201101010480 invendio.de-->
 </div>
 <div  class="sponsor">
-  <a href="http://www.tomsgutscheine.de">Tom's Gutscheine</a><!-- 201005010360 invendio.de-->
+  <a title="Sponsor: LVM Versicherung" href="http://www.neu-reich.de">LVM Versicherung</a><!-- 201101010480 -->
 </div>
 <div  class="sponsor">
-  <a href="http://www.online-kredit-index.de">Kredit</a><!-- 201006010120 Buchhorn -->
+  <a title="Sponsor: Deko.net" href="http://www.deko.net">Deko.net</a><!-- 201101010600 Peterssen-->
 </div>
 <div  class="sponsor">
-  <a href="http://www.blumenversender.com">Blumenversand</a><!-- 201005010120 -->
+  <a title="Sponsor: Kredit" href="http://www.online-kredit-index.de">Kredit</a><!-- 201007010120 Buchhorn -->
 </div>
 <div  class="sponsor">
-  <a href="http://www.print24.de/">Druckerei</a><!-- 201009010720 -->
+  <a title="Sponsor: Druckerei" href="http://www.print24.de/">Druckerei</a><!-- 201009010720 -->
 </div>
 <div  class="sponsor">
-   <a href="http://www.goyax.de">Börse</a><!-- 201004010240 Gewiese digital-finance.de -->
+   <a title="Sponsor: Druckerei Online" href="http://www.allesdruck.de">Druckerei Online</a><!-- 201012011200 allesdruck.de-->
 </div>
 <div  class="sponsor">
-   <a href="http://www.allesdruck.de">Druckerei Online</a><!-- 201012011200 allesdruck.de-->
-</div>
-<div  class="sponsor">
-  <a href="http://www.who-sells-it.com/">Free Catalogs</a><!-- 201002010000 -->
+   <a title="Sponsor: Webdesign" href="http://www.renehornig.com/" title="Webdesign">Webdesign</a><!-- 20110101000120 -->
 </div>
 </div>
 </div>
 
 <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.59 for
-ImageMagick 6.5.9) and unpack it as shown below:</p>
+(e.g., PerlMagick 6.61 for
+ImageMagick 6.6.1) and unpack it as shown below:</p>
 
-<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>tar xvfz PerlMagick-6.59.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.61.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>
@@ -500,7 +497,7 @@ ImageMagick 6.5.9) and unpack it as shown below:</p>
 
   <tr>
     <td valign="top">Annotate</td>
-    <td valign="top">text=&gt;<i>string</i>, font=&gt;<i>string</i>, family=&gt;<i>string</i>, style=&gt;{Normal, Italic, Oblique, Any}, stretch=&gt;{Normal, UltraCondensed, ExtraCondensed, Condensed, SemiCondensed, SemiExpanded, Expanded, ExtraExpanded, UltraExpanded}, weight=&gt;<i>integer</i>, pointsize=&gt;<i>integer</i>, density=&gt;<i>geometry</i>, stroke=&gt;<i><a href="../www/color.html">color name</a></i>, strokewidth=&gt;<i>integer</i>, fill=&gt;<i><a href="../www/color.html">color name</a></i>, undercolor=&gt;<i><a href="../www/color.html">color name</a></i>, kerning=&gt;<i>float</i>, geometry=&gt;<i>geometry</i>, gravity=&gt;{NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast}, antialias=&gt;{true, false}, x=&gt;<i>integer</i>, y=&gt;<i>integer</i>, affine=&gt;<i>array of float values</i>, translate=&gt;<i>float, float</i>, scale=&gt;<i>float, float</i>, rotate=&gt;<i>float</i>. skewX=&gt;<i>float</i>, skewY=&gt; <i>float</i>, align=&gt;{Left, Center, Right}, encoding=&gt;{UTF-8}, interline-spacing=&gt;<i>double</i>, interword-spacing=&gt;<i>double</i></td>
+    <td valign="top">text=&gt;<i>string</i>, font=&gt;<i>string</i>, family=&gt;<i>string</i>, style=&gt;{Normal, Italic, Oblique, Any}, stretch=&gt;{Normal, UltraCondensed, ExtraCondensed, Condensed, SemiCondensed, SemiExpanded, Expanded, ExtraExpanded, UltraExpanded}, weight=&gt;<i>integer</i>, pointsize=&gt;<i>integer</i>, density=&gt;<i>geometry</i>, stroke=&gt;<i><a href="../www/color.html">color name</a></i>, strokewidth=&gt;<i>integer</i>, fill=&gt;<i><a href="../www/color.html">color name</a></i>, undercolor=&gt;<i><a href="../www/color.html">color name</a></i>, kerning=&gt;<i>float</i>, geometry=&gt;<i>geometry</i>, gravity=&gt;{NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast}, antialias=&gt;{true, false}, x=&gt;<i>integer</i>, y=&gt;<i>integer</i>, affine=&gt;<i>array of float values</i>, translate=&gt;<i>float, float</i>, scale=&gt;<i>float, float</i>, rotate=&gt;<i>float</i>. skewX=&gt;<i>float</i>, skewY=&gt; <i>float</i>, align=&gt;{Left, Center, Right}, encoding=&gt;{UTF-8}, interline-spacing=&gt;<i>double</i>, interword-spacing=&gt;<i>double</i>, direction=&gt;{right-to-left, left-to-right}</td>
     <td valign="top">annotate an image with text. See <a href="#misc">QueryFontMetrics</a> to get font metrics without rendering any text.</td>
   </tr>
 
@@ -588,6 +585,12 @@ ImageMagick 6.5.9) and unpack it as shown below:</p>
     <td valign="top">merge a sequence of images</td>
   </tr>
 
+  <tr>
+    <td valign="top">Color</td>
+    <td valign="top">color=&gt;<i><a href="../www/color.html">color name</a></i></td>
+    <td valign="top">set the entire image to this color.</td>
+  </tr>
+
   <tr>
     <td valign="top">ColorDecisionList</td>
     <td valign="top">filename=&gt;<i>string</i>,</td>
@@ -600,6 +603,12 @@ ImageMagick 6.5.9) and unpack it as shown below:</p>
     <td valign="top">colorize the image with the fill color</td>
   </tr>
 
+  <tr>
+    <td valign="top">ColorMatrix</td>
+    <td valign="top">matrix=&gt;<i>array of float values</i></td>
+    <td valign="top">apply color correction to the image.  Although you can use variable sized matrices, typically you use a 5 x 5 for an RGBA image and a 6x6 for CMYKA.  A 6x6 matrix is required for offsets (populate the last column with normalized values).</td>
+  </tr>
+
   <tr>
     <td valign="top">Comment</td>
     <td valign="top">string</td>
@@ -686,7 +695,7 @@ ImageMagick 6.5.9) and unpack it as shown below:</p>
 
   <tr>
     <td valign="top">Draw</td>
-    <td valign="top">primitive=&gt;{point, line, rectangle, arc, ellipse, circle, path, polyline, polygon, bezier, color, matte, text, @<i>filename</i>}, points=&gt;<i>string</i> , method=&gt;<i>{Point, Replace, Floodfill, FillToBorder, Reset}</i>, stroke=&gt;<i><a href="../www/color.html">color name</a></i>, fill=&gt;<i><a href="../www/color.html">color name</a></i>, font=&gt;<i>string</i>, pointsize=&gt;<i>integer</i>, strokewidth=&gt;<i>float</i>, antialias=&gt;{true, false}, bordercolor=&gt;<i><a href="../www/color.html">color name</a></i>, x=&gt;<i>float</i>, y=&gt;<i>float</i>, dash-offset=&gt;<i>float</i>, dash-pattern=&gt;<i>array of float values</i>, affine=&gt;<i>array of float values</i>, translate=&gt;<i>float, float</i>, scale=&gt;<i>float, float</i>, rotate=&gt;<i>float</i>,  skewX=&gt;<i>float</i>, skewY=&gt;<i>float</i>, interpolate=&gt;{undefined, average, bicubic, bilinear, mesh, nearest-neighbor, spline}, kerning=&gt;<i>float</i>, text=&gt;<i>string</i>, vector-graphics=&gt;<i>string</i></td>
+    <td valign="top">primitive=&gt;{point, line, rectangle, arc, ellipse, circle, path, polyline, polygon, bezier, color, matte, text, @<i>filename</i>}, points=&gt;<i>string</i> , method=&gt;<i>{Point, Replace, Floodfill, FillToBorder, Reset}</i>, stroke=&gt;<i><a href="../www/color.html">color name</a></i>, fill=&gt;<i><a href="../www/color.html">color name</a></i>, font=&gt;<i>string</i>, pointsize=&gt;<i>integer</i>, strokewidth=&gt;<i>float</i>, antialias=&gt;{true, false}, bordercolor=&gt;<i><a href="../www/color.html">color name</a></i>, x=&gt;<i>float</i>, y=&gt;<i>float</i>, dash-offset=&gt;<i>float</i>, dash-pattern=&gt;<i>array of float values</i>, affine=&gt;<i>array of float values</i>, translate=&gt;<i>float, float</i>, scale=&gt;<i>float, float</i>, rotate=&gt;<i>float</i>,  skewX=&gt;<i>float</i>, skewY=&gt;<i>float</i>, interpolate=&gt;{undefined, average, bicubic, bilinear, mesh, nearest-neighbor, spline}, kerning=&gt;<i>float</i>, text=&gt;<i>string</i>, vector-graphics=&gt;<i>string</i>, interline-spacing=&gt;<i>double</i>, interword-spacing=&gt;<i>double</i>, direction=&gt;{right-to-left, left-to-right}</td>
     <td valign="top">annotate an image with one or more graphic primitives.</td>
   </tr>
 
@@ -806,7 +815,7 @@ ImageMagick 6.5.9) and unpack it as shown below:</p>
 
   <tr>
     <td valign="top">Identify</td>
-    <td valign="top">file=&gt;<i>file</i></td>
+    <td valign="top">file=&gt;<i>file</i>, features=&gt;<i>distance</i>, unique=&gt;{True, False}</td>
     <td valign="top">identify the attributes of an image</td>
   </tr>
 
@@ -894,6 +903,12 @@ ImageMagick 6.5.9) and unpack it as shown below:</p>
     <td valign="top">vary the brightness, saturation, and hue of an image by the specified percentage</td>
   </tr>
 
+  <tr>
+    <td valign="top">Morphology</td>
+    <td valign="top">kernel=&gt;<i>string</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}, iterations=&gt;<i>integer</i></td>
+    <td valign="top">apply a morphology method to the image.</td>
+  </tr>
+
   <tr>
     <td valign="top">MotionBlur</td>
     <td valign="top">geometry=&gt;<i>geometry</i>, radius=&gt;<i>double</i>, sigma=&gt;<i>double</i>, angle=&gt;<i>double</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
@@ -903,7 +918,7 @@ ImageMagick 6.5.9) and unpack it as shown below:</p>
   <tr>
     <td valign="top">Negate</td>
     <td valign="top">gray=&gt;{True, False}, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
-    <td valign="top">replace every pixel with its complementary color (white becomes black, yellow becomes blue, etc.)</td>
+    <td valign="top">replace each pixel with its complementary color (white becomes black, yellow becomes blue, etc.)</td>
   </tr>
 
   <tr>
@@ -967,12 +982,6 @@ fill=&gt;<i><a href="../www/color.html">color name</a></i>, channel=&gt;{All, De
     <td valign="top">lighten or darken image edges to create a 3-D effect</td>
   </tr>
 
-  <tr>
-    <td valign="top">Recolor</td>
-    <td valign="top">matrix=&gt;<i>array of float values</i></td>
-    <td valign="top">translate, scale, shear, or rotate image colors.  Although you can use variable sized matrices, typically you use a 5 x 5 for an RGBA image and a 6x6 for CMYKA.  Populate the last row with normalized values to translate.</td>
-  </tr>
-
   <tr>
     <td valign="top">ReduceNoise</td>
     <td valign="top">radius=&gt;<i>double</i></td>
@@ -1422,6 +1431,12 @@ can use the integers 1 and 0.</p>
     <td valign="top">image depth</td>
   </tr>
 
+  <tr>
+    <td valign="top">direction</td>
+    <td valign="top"><i>{Undefined, right-to-left, left-to-right</i></td>
+    <td valign="top">render text right-to-left or left-to-right</td>
+  </tr>
+
   <tr>
     <td valign="top">disk-limit</td>
     <td valign="top"><i>integer</i></td>
@@ -2260,21 +2275,29 @@ blobs in any of these image <a href="../www/formats.html">formats</a> and provid
 
 <p>appends all the images associated with object <kbd>$image</kbd>. By default, images are stacked left-to-right. Set <kbd>stack</kbd> to True to stack them top-to-bottom.</p>
 
-<p>The Average() method averages a set of images. For example,</p>
+<p>The Clone() method copies a set of images. For example,</p>
 
 <pre class="code">
-  $p = $image-&gt;Average();
+  $q = $p-&gt;Clone();
+</pre>
+
+<p>copies all the images from object <kbd>$p</kbd> to <kbd>$q</kbd>. You can use this method for single or multi-image sequences.</p>
+
+<p>The EvaluateImages() method applies an arithemtic, logical or relational expression to a set of images. For example,</p>
+
+<pre class="code">
+  $p = $image-&gt;EvaluateImages('mean');
 </pre>
 
 <p>averages all the images associated with object <kbd>$image</kbd>.</p>
 
-<p>The Clone() method copies a set of images. For example,</p>
+<p>The Features() method returns features for each channel in the image in each of four directions (horizontal, vertical, left and right diagonals) for the specified distance.  The features include the angular second momentum, contrast, correlation, sum of squares: variance, inverse difference moment, sum average, sum varience, sum entropy, entropy, difference variance, difference entropy, information measures of correlation 1, information measures of correlation 2, and maximum correlation coefficient.  Values in RGB, CMYK, RGBA, or CMYKA order (depending on the image type).</p>
 
 <pre class="code">
-  $q = $p-&gt;Clone();
+  @features = $image-&gt;Features(1);
 </pre>
 
-<p>copies all the images from object <kbd>$p</kbd> to <kbd>$q</kbd>. You can use this method for single or multi-image sequences.</p>
+<p>Finally, the Transform() method accepts a fully-qualified geometry specification for cropping or resizing one or more images.  For example,</p>
 
 <p>The Flatten() method flattens a set of images and returns it. For example,</p>
 
@@ -2444,7 +2467,7 @@ blobs in any of these image <a href="../www/formats.html">formats</a> and provid
   print $1;               # print the error number
 </pre>
 
-<p>Methods which return images (Average(), Montage(), Clone()) should be checked for errors this way:</p>
+<p>Methods which return images (EvaluateSequence(), Montage(), Clone()) should be checked for errors this way:</p>
 
 <pre class="code">
   $x = $image-&gt;Montage(...);
@@ -2535,8 +2558,7 @@ blobs in any of these image <a href="../www/formats.html">formats</a> and provid
  <!--    <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="../www/mailing-list.html">Mailing Lists</a> &bull;\r
-    <a href="http://studio.webbyland.com/ImageMagick/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