+
+
+
+
<!DOCTYPE html>
<html lang="en">
<head>
-
- <title>ImageMagick: PerlMagick, Perl API for ImageMagick</title>
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
- <meta name="application-name" content="ImageMagick">
- <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.">
- <meta name="application-url" content="http://www.imagemagick.org">
- <meta name="generator" content="PHP">
- <meta name="keywords" content="perlmagick, perl, api, for, imagemagick, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert">
- <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-2015 ImageMagick Studio LLC">
- <meta name="distribution" content="Global">
- <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1">
- <link rel="icon" href="../images/wand.png">
- <link rel="shortcut icon" href="../images/wand.ico">
- <link rel="stylesheet" href="../css/magick.html">
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
+ <meta http-equiv="x-ua-compatible" content="ie=edge" />
+ <title>PerlMagick, Perl API @ ImageMagick</title>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <meta name="application-name" content="ImageMagick"/>
+ <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves."/>
+ <meta name="application-url" content="https://www.imagemagick.org"/>
+ <meta name="generator" content="PHP"/>
+ <meta name="keywords" content="perlmagick, perl, api, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/>
+ <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-2016 ImageMagick Studio LLC"/>
+ <meta name="distribution" content="Global"/>
+ <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
+ <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
+ <link rel="canonical" href="https://www.imagemagick.org/script/perl-magick.html"/>
+ <link rel="icon" href="../images/wand.png"/>
+ <link rel="shortcut icon" href="../images/wand.ico"/>
+ <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:900,400,400italic,700,700italic,300,300italic|Open+Sans:300italic,400italic,700italic,300,400,600,700" />
+ <link rel="stylesheet" href="css/magick.css"/>
</head>
<body>
<div class="main">
<div class="magick-masthead">
<div class="container">
- <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3129977114552745" data-ad-slot="6345125851" data-ad-format="auto"></ins>
+ <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle"
+ style="display:block"
+ data-ad-client="ca-pub-3129977114552745"
+ data-ad-slot="6345125851"
+ data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<a class="magick-nav-item " href="../index.html">Home</a>
<a class="magick-nav-item " href="binary-releases.html">Download</a>
<a class="magick-nav-item " href="command-line-tools.html">Tools</a>
- <a class="magick-nav-item " href="command-line-options.html">Options</a>
+ <a class="magick-nav-item " href="command-line-processing.html">Command-line</a>
<a class="magick-nav-item " href="resources.html">Resources</a>
<a class="magick-nav-item " href="api.html">Develop</a>
- <a class="magick-nav-item " href="http://nextgen.imagemagick.org/script/search.php">Search</a>
- <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a>
+ <a class="magick-nav-item " href="https://www.imagemagick.org/script/search.php">Search</a>
+ <a class="magick-nav-item pull-right" href="https://www.imagemagick.org/discourse-server/">Community</a>
</nav>
</div>
</div>
<a id="introduction"></a>
<p class="lead magick-description"><a href="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="http://git.imagemagick.org/repos/ImageMagick/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>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="https://www.imagemagick.org/download/perl">MagickStudio</a>, or use <a href="http://git.imagemagick.org/repos/ImageMagick/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="examples.html">examples</a> of select PerlMagick functions.</p>
+<p>You can try PerlMagick from your Web browser at the <a href="https://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">ImageMagick Studio</a>. Or, you can see <a href="examples.html">examples</a> of select PerlMagick functions.</p>
<h2 class="magick-header"><a id="installation"></a>Installation</h2>
yum install ImageMagick-perl
</pre>
-<p>If not, you must install PerlMagick from the ImageMagick source distribution. Download the latest <a href="http://www.imagemagick.org/download/ImageMagick.tar.gz">source</a> release.</p>
+<p>If not, you must install PerlMagick from the ImageMagick source distribution. Download the latest <a href="https://www.imagemagick.org/download/ImageMagick.tar.gz">source</a> release.</p>
<p>Unpack the distribution with this command:</p>
<p>Next configure and compile ImageMagick:</p>
-<pre><span class="crtprompt"> </span><span class="crtin">cd ImageMagick-7.0.0</span><span class="crtout"></span><span class="crtprompt"> </span><span class="crtin">./configure -with-perl</span><span class="crtout"></span><span class="crtprompt"> </span><span class="crtin">make</span></pre>
+<pre><span class="crtprompt"> </span><span class='crtin'>cd ImageMagick-7.0.3</span><span class='crtout'></span><span class="crtprompt"> </span><span class='crtin'>./configure -with-perl</span><span class='crtout'></span><span class="crtprompt"> </span><span class='crtin'>make</span></pre>
<p>If ImageMagick / PerlMagick configured and compiled without complaint, you are ready to install it on your system. Administrator privileges are required to install. To install, type</p>
<pre>
<p>Finally, verify the PerlMagick install worked properly, type</p>
<pre>
-perl -e \"use Image::Magick; print Image::Magick->QuantumDepth\"
+perl -MImage::Magick -le 'print Image::Magick->QuantumDepth'
</pre>
-<p>Congratulations, you have a working ImageMagick distribution and you are ready to use PerlMagick to <a href="http://www.imagemagick.org/Usage/">convert, compose, or edit</a> your images.</p>
+<p>Congratulations, you have a working ImageMagick distribution and you are ready to use PerlMagick to <a href="https://www.imagemagick.org/Usage/">convert, compose, or edit</a> your images.</p>
<p><b>Windows XP / Windows 2000</b></p>
<pre>
#!/usr/local/bin/perl
-use Image::Magick;<br>
-my($image, $x);<br>
+use Image::Magick;<br />
+my($image, $x);<br />
$image = Image::Magick->new;
$x = $image->Read('girl.png', 'logo.png', 'rose.png');
-warn "$x" if "$x";<br>
+warn "$x" if "$x";<br />
$x = $image->Crop(geometry=>'100x100+100+100');
-warn "$x" if "$x";<br>
+warn "$x" if "$x";<br />
$x = $image->Write('x.png');
warn "$x" if "$x";
</pre>
<p>The script reads three images, crops them, and writes a single image as a GIF animation sequence. In many cases you may want to access individual images of a sequence. The next example illustrates how this done:</p>
<pre class="pre-scrollable">#!/usr/local/bin/perl
-use Image::Magick;<br>
-my($image, $p, $q);<br>
+use Image::Magick;<br />
+my($image, $p, $q);<br />
$image = new Image::Magick;
$image->Read('x1.png');
$image->Read('j*.jpg');
<table class="table table-condensed table-striped">
<caption>Read or Write Methods</caption>
<colgroup>
- <col width="20%">
- <col width="20%">
- <col width="20%">
- <col width="40%">
+ <col width="20%" />
+ <col width="20%" />
+ <col width="20%" />
+ <col width="40%" />
</colgroup>
<tbody>
<pre>
$filename = "image.png";
-open(IMAGE, ">$filename");
+open(IMAGE, ">$filename");
$image->Write(file=>\*IMAGE, filename=>$filename);
close(IMAGE);
</pre>
<tr>
<td>AutoOrient</td>
- <td><br></td>
+ <td><br /></td>
<td>adjusts an image so that its orientation is suitable for viewing (i.e. top-left orientation)</td>
</tr>
<tr>
<td>BlackThreshold</td>
- <td>threshold=><i>string</i>, , channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
+ <td>threshold=><i>string</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>force all pixels below the threshold intensity into black</td>
</tr>
<tr>
<td>Coalesce</td>
- <td><br></td>
+ <td><br /></td>
<td>merge a sequence of images</td>
</tr>
<tr>
<td>Deconstruct</td>
- <td><br></td>
+ <td><br /></td>
<td>break down an image sequence into constituent parts</td>
</tr>
<tr>
<td>Distort</td>
- <td>points=><i>array of float values</i>, method=>{Affine, AffineProjection, Bilinear, Perspective, Resize, ScaleRotateTranslate}, 'virtual-pixel'=>{Background Black Constant Dither Edge Gray Mirror Random Tile Transparent White}, 'best-fit'=>{True, False}</td>
+ <td>points=><i>array of float values</i>, method=>{Affine, AffineProjection, ScaleRotateTranslate, SRT, Perspective, PerspectiveProjection, BilinearForward, BilinearReverse, Polynomial, Arc, Polar, DePolar, Barrel, BarrelInverse, Shepards, Resize}, 'virtual-pixel'=>{Background Black Constant Dither Edge Gray Mirror Random Tile Transparent White}, 'best-fit'=>{True, False}</td>
<td>distort image</td>
</tr>
<tr>
<td>Enhance</td>
- <td><br></td>
+ <td><br /></td>
<td>apply a digital filter to enhance a noisy image</td>
</tr>
<tr>
<td>Equalize</td>
- <td>channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}<br></td>
+ <td>channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}<br /></td>
<td>perform histogram equalization to the image</td>
</tr>
<tr>
<td>Flip</td>
- <td><br></td>
+ <td><br /></td>
<td>reflect the image scanlines in the vertical direction</td>
</tr>
<tr>
<td>Flop</td>
- <td><br></td>
+ <td><br /></td>
<td>reflect the image scanlines in the horizontal direction</td>
</tr>
<tr>
<td>Magnify</td>
- <td><br></td>
+ <td><br /></td>
<td>double the size of the image with pixel art scaling</td>
</tr>
<tr>
<td>Minify</td>
- <td><br></td>
+ <td><br /></td>
<td>half the size of an image</td>
</tr>
<tr>
<td>Normalize</td>
- <td>channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}<br></td>
+ <td>channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}<br /></td>
<td>transform image to span the full range of color values</td>
</tr>
<tr>
<td>Signature</td>
- <td><br></td>
+ <td><br /></td>
<td>generate an SHA-256 message digest for the image pixel stream</td>
</tr>
<tr>
<td>Strip</td>
- <td><br></td>
+ <td><br /></td>
<td>strip an image of all profiles and comments.</td>
</tr>
<tr>
<td>Transpose</td>
- <td><br></td>
+ <td><br /></td>
<td>flip image in the vertical direction and rotate 90 degrees</td>
</tr>
<tr>
<td>Transverse</td>
- <td><br></td>
+ <td><br /></td>
<td>flop image in the horizontal direction and rotate 270 degrees</td>
</tr>
<tr>
<td>Trim</td>
- <td><br></td>
+ <td><br /></td>
<td>remove edges that are the background color from the image</td>
</tr>
<td>alter an image along a sine wave</td>
</tr>
+ <tr>
+ <td>WaveDenoise</td>
+ <td>geometry=><i>geometry</i>, threshold=><i>double</i>, threshold=><i>double</i></td>
+ <td>removes noise from the image using a wavelet transform</td>
+ </tr>
+
<tr>
<td>WhiteThreshold</td>
<td>threshold=><i>string</i>, , channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>the number of rows or height of an image</td>
</tr>
+ <tr>
+ <td>icc</td>
+ <td><i>string</i></td>
+ <td>ICC profile</td>
+ </tr>
+
+ <tr>
+ <td>icc</td>
+ <td><i>string</i></td>
+ <td>ICM profile</td>
+ </tr>
+
<tr>
<td>id</td>
<td><i>integer</i></td>
<td>ImageMagick registry id</td>
</tr>
+ <tr>
+ <td>IPTC</td>
+ <td><i>string</i></td>
+ <td>IPTC profile</td>
+ </tr>
+
<tr>
<td>mean-error</td>
<td><i>double</i></td>
<td>the number of columns or width of an image</td>
</tr>
+ <tr>
+ <td>XMP</td>
+ <td><i>string</i></td>
+ <td>XMP profile</td>
+ </tr>
+
<tr>
<td>x-resolution</td>
<td><i>integer</i></td>
<pre>
use Image::Magick;
-$logo=Image::Magick->New();
-$logo->Read('logo:');
-$sharp=Image::Magick->New();
-$sharp->Read('logo:');
-$sharp->Sharpen('0x1');
-$difference=$logo->Compare(image=>$sharp, metric=>'rmse');
-print $difference->Get('error'), "\n";
-$difference->Display();
+$logo=Image::Magick->New();
+$logo->Read('logo:');
+$sharp=Image::Magick->New();
+$sharp->Read('logo:');
+$sharp->Sharpen('0x1');
+$difference=$logo->Compare(image=>$sharp, metric=>'rmse');
+print $difference->Get('error'), "\n";
+$difference->Display();
</pre>
<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>
<td>geometry</td>
<td><i>geometry</i></td>
<td>preferred tile and border size of each tile of the composite
-image (e.g. 120x120+4+3>)</td>
+image (e.g. 120x120+4+3>)</td>
</tr>
<tr>
<p>Finally, the Transform() method accepts a fully-qualified geometry specification for cropping or resizing one or more images. For example,</p>
<pre>
-$p = $images->Transform(crop=>'100x100+10+60');
+$p = $images->Transform(crop=>'100x100+10+60');
</pre>
<p>The Flatten() method flattens a set of images and returns it. For example,</p>
<p><a href="support.html">Donate</a> •
<a href="sitemap.html">Sitemap</a> •
<a href="links.html">Related</a> •
+ <a href="security-policy.html">Security</a> •
<a href="architecture.html">Architecture</a>
</p>
<p><a href="perl-magick.html#">Back to top</a> •
<a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> •
- <a href="http://nextgen.imagemagick.org/script/contact.php">Contact Us</a></p>
- <p><small>© 1999-2015 ImageMagick Studio LLC</small></p>
+ <a href="https://www.imagemagick.org/script/contact.php">Contact Us</a></p>
+ <p><small>© 1999-2016 ImageMagick Studio LLC</small></p>
</footer>
</div><!-- /.container -->
<script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
- <script src="http://nextgen.imagemagick.org/js/magick.html"></script>
+ <script src="../js/magick.html"></script>
</div>
</body>
</html>
+<!-- Magick Cache 26th November 2016 12:14 -->
\ No newline at end of file