]> granicus.if.org Git - imagemagick/blobdiff - www/perl-magick.html
(no commit message)
[imagemagick] / www / perl-magick.html
index 09fb5d3db0dc010cef364744fcbc6aecf05d1c1e..09e704a974a05167b8d33a5b1fcf3bf691ffa2fa 100644 (file)
@@ -2,6 +2,7 @@
     "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
 <head>\r
+  <meta http-equiv="Content-Type" value="application/xhtml+xml" />\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
@@ -21,7 +22,7 @@
   <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-2009 ImageMagick Studio LLC"/>
+  <meta name="Copyright" content="Copyright (c) 1999-2010 ImageMagick Studio LLC"/>
   <meta name="Distribution" content="Global"/>
 </head>\r
 \r
 
 <div class="sponsbox">
 <div  class="sponsor">
-   <a href="http://www.buerodruck.de/stempel-service/index.html">Stempel bestellen</a><!-- 200910000035+ -->
+   <a href="http://www.hygi.de">Reinigungsmittel</a><!-- 201002000400+ -->
 </div>
 <div  class="sponsor">
-  <a href="http://www.online-kredit-index.de">Kredit</a><!-- 201003010120 Buchhorn -->
+  <a href="http://www.tomsgutscheine.de">Tom's Gutscheine</a><!-- 201005010360 invendio.de-->
 </div>
 <div  class="sponsor">
-  <a href="http://www.print24.de/">Druckerei</a><!-- 201009010720 -->
+  <a href="http://www.online-kredit-index.de">Kredit</a><!-- 201006010120 Buchhorn -->
 </div>
 <div  class="sponsor">
-   <a href="http://www.goyax.de">Börse</a><!-- 201001000240 Gewiese digital-finance.de -->
+  <a href="http://www.blumenversender.com">Blumenversand</a><!-- 201005010120 -->
 </div>
 <div  class="sponsor">
-   <a href="http://www.allesdruck.de">Druckerei Online</a><!-- 201012001200 allesdruck.de-->
+  <a href="http://www.print24.de/">Druckerei</a><!-- 201009010720 -->
 </div>
 <div  class="sponsor">
-  <a href="http://www.blumenversender.com">Blumenversand</a><!-- 200911010120 -->
+   <a href="http://www.goyax.de">Börse</a><!-- 201004010240 Gewiese digital-finance.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 -->
 
 <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.57 for
-ImageMagick 6.5.7) and unpack it as shown below:</p>
+(e.g., PerlMagick 6.59 for
+ImageMagick 6.5.9) and unpack it as shown below:</p>
 
-<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>tar xvfz PerlMagick-6.57.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.59.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>
@@ -417,6 +421,8 @@ ImageMagick 6.5.7) and unpack it as shown below:</p>
   close(IMAGE);
 </pre>
 
+<p>Note, reading from or writing to a Perl filehandle may fail under Windows due to different versions of the C-runtime libraries between ImageMagick and the ActiveState Perl distributions or if one of the DLL's is linked with the /MT option.  See <a href="http://msdn.microsoft.com/en-us/library/ms235460.aspx">Potential Errors Passing CRT Objects Across DLL Boundaries</a> for an explanation.</p>
+
 <p>If <kbd>%0Nd, %0No, or %0Nx</kbd> appears in the filename, it is interpreted as a printf format specification and the specification is replaced with the specified decimal, octal, or hexadecimal encoding of the scene number. For example,</p>
 
 <pre class="text">
@@ -518,7 +524,7 @@ ImageMagick 6.5.7) and unpack it as shown below:</p>
 
   <tr>
     <td valign="top">BlackThreshold</td>
-    <td valign="top">threshold=&gt;<i>string</i></td>
+    <td valign="top">threshold=&gt;<i>string</i>, , channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
     <td valign="top">force all pixels below the threshold intensity into black</td>
   </tr>
 
@@ -626,13 +632,13 @@ ImageMagick 6.5.7) and unpack it as shown below:</p>
 
   <tr>
     <td valign="top">Convolve</td>
-    <td valign="top">coefficients=&gt;<i>array of float values</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}, bias=&gt;;<i>double</i></td>
+    <td valign="top">coefficients=&gt;<i>array of float values</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}, bias=&gt;<i>double</i></td>
     <td valign="top">apply a convolution kernel to the image. Given a kernel <i>order</i> , you would supply <i>order*order</i> float values (e.g. 3x3 implies 9 values).</td>
   </tr>
 
   <tr>
     <td valign="top">Crop</td>
-    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i>, x=&gt;<i>integer</i>, y=&gt;<i>integer</i>, fuzz=&gt;<i>double</i></td>
+    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i>, x=&gt;<i>integer</i>, y=&gt;<i>integer</i>, fuzz=&gt;<i>double</i>, gravity=&gt;{NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast}</td>
     <td valign="top">crop an image</td>
   </tr>
 
@@ -726,6 +732,12 @@ ImageMagick 6.5.7) and unpack it as shown below:</p>
     <td valign="top">apply an arithmetic, relational, or logical expression to the image</td>
   </tr>
 
+  <tr>
+    <td valign="top">Filter</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}, bias=&gt;<i>double</i></td>
+    <td valign="top">apply a convolution kernel to the image.</td>
+  </tr>
+
   <tr>
     <td valign="top">Flip</td>
     <td valign="top"><br /></td>
@@ -794,7 +806,7 @@ ImageMagick 6.5.7) 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>
 
@@ -882,6 +894,12 @@ ImageMagick 6.5.7) 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>
@@ -891,7 +909,7 @@ ImageMagick 6.5.7) 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>
@@ -969,7 +987,7 @@ fill=&gt;<i><a href="../www/color.html">color name</a></i>, channel=&gt;{All, De
 
   <tr>
     <td valign="top">Remap</td>
-    <td valign="top">image=&gt;<i>image-handle</i>,  dither-method=&gt;{Riemersma, Floyd-Steinberg}</td>
+    <td valign="top">image=&gt;<i>image-handle</i>,  dither=&gt;{true, false}, dither-method=&gt;{Riemersma, Floyd-Steinberg}</td>
     <td valign="top">replace the colors of an image with the closest color from a reference image.</td>
   </tr>
 
@@ -1196,7 +1214,7 @@ fill=&gt;<i><a href="../www/color.html">color name</a></i>, channel=&gt;{All, De
 
   <tr>
     <td valign="top">WhiteThreshold</td>
-    <td valign="top">threshold=&gt;<i>string</i></td>
+    <td valign="top">threshold=&gt;<i>string</i>, , channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
     <td valign="top">force all pixels above the threshold intensity into white</td>
   </tr>
 </tbody>
@@ -2264,6 +2282,14 @@ blobs in any of these image <a href="../www/formats.html">formats</a> and provid
 
 <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 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">
+  @features = $image-&gt;Features(1);
+</pre>
+
+<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>
 
 <pre class="code">
@@ -2523,13 +2549,12 @@ 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://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>\r
+    <a href="http://studio.webbyland.com/ImageMagick/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-2009 ImageMagick Studio LLC</span>\r
+    <span id="footer-west">&copy; 1999-2010 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