forked from ImageMagick/ImageMagick
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathperl-magick.html
2563 lines (2063 loc) · 91.6 KB
/
perl-magick.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!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">
</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>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<nav class="magick-nav">
<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="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>
</nav>
</div>
</div>
<div class="container">
<div class="magick-header">
<p class="text-center"><a href="perl-magick.html#installation">Installation</a> • <a href="perl-magick.html#overview">Overview</a> • <a href="perl-magick.html#example">Example Script</a> • <a href="perl-magick.html#read">Read or Write an Image</a> • <a href="perl-magick.html#manipulate">Manipulate an Image</a> • <a href="perl-magick.html#set-attribute">Set an Image Attribute</a> • <a href="perl-magick.html#get-attribute">Get an Image Attribute</a> • <a href="perl-magick.html#compare">Compare an Image to its Reconstruction</a> • <a href="perl-magick.html#montage">Create an Image Montage</a> • <a href="perl-magick.html#blobs">Working with Blobs</a> • <a href="perl-magick.html#direct-access">Direct-access to Image Pixels</a> • <a href="perl-magick.html#miscellaneous">Miscellaneous Methods</a> • <a href="perl-magick.html#exceptions">Handling Exceptions</a>• <a href="perl-magick.html#constants">Constant</a> </p>
<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>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>
<h2 class="magick-header"><a id="installation"></a>Installation</h2>
<p><b>UNIX</b></p>
<p>Is PerlMagick available from your system RPM repository? For example, on our CentOS system, we install PerlMagick thusly:</p>
<pre>
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>Unpack the distribution with this command:</p>
<pre>
tar xvzf ImageMagick.tar.gz
</pre>
<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>
<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>
sudo make install
</pre>
<p>You may need to configure the dynamic linker run-time bindings:</p>
<pre>
sudo ldconfig /usr/local/lib
</pre>
<p>Finally, verify the PerlMagick install worked properly, type</p>
<pre>
perl -e \"use Image::Magick; 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><b>Windows XP / Windows 2000</b></p>
<p>ImageMagick must already be installed on your system. Also, the ImageMagick source distribution for <a href="download.html">Windows 2000</a> is required. You must also have the <code>nmake</code> from the Visual C++ or J++ development environment. Copy <code>\bin\IMagick.dll</code> and <code>\bin\X11.dll</code> to a directory in your dynamic load path such as <code>c:\perl\site\5.00502</code>.</p>
<p>Next, type</p>
<pre>
cd PerlMagick
perl Makefile.nt
nmake
nmake install
</pre>
<p>See the <a href="http://www.dylanbeattie.net/magick/">PerlMagick Windows HowTo</a> page for further installation instructions.</p>
<p><b>Running the Regression Tests</b></p>
<p>To verify a correct installation, type</p>
<pre>
make test
</pre>
<p>Use <code>nmake test</code> under Windows. There are a few demonstration scripts available to exercise many of the functions PerlMagick can perform. Type</p>
<pre>
cd demo
make
</pre>
<p>You are now ready to utilize the PerlMagick methods from within your Perl scripts.</p>
<h2 class="magick-header"><a id="overview"></a>Overview</h2>
<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>
<pre>
use Image::Magick;
$image = Image::Magick->new;
</pre>
<p>PerlMagick is <var>quantum</var> aware. You can request a specific quantum depth when you instantiate an image object:</p>
<pre>
use Image::Magick::Q16;
$image = Image::Magick::Q16->new;
</pre>
<p>The new() method takes the same parameters as <a href="perl-magick.html#set-attribute">SetAttribute</a> . For example,</p>
<pre>
$image = Image::Magick->new(size=>'384x256');
</pre>
<p>Next you will want to read an image or image sequence, manipulate it, and then display or write it. The input and output methods for PerlMagick are defined in <a href="perl-magick.html#read">Read or Write an Image</a>. See <a href="perl-magick.html#set-attribute">Set an Image Attribute</a> for methods that affect the way an image is read or written. Refer to <a href="perl-magick.html#manipulate">Manipulate an Image</a> for a list of methods to transform an image. <a href="perl-magick.html#get-attribute">Get an Image Attribute</a> describes how to retrieve an attribute for an image. Refer to <a href="perl-magick.html#montage">Create an Image Montage</a> for details about tiling your images as thumbnails on a background. Finally, some methods do not neatly fit into any of the categories just mentioned. Review <a href="perl-magick.html#misc">Miscellaneous Methods</a> for a list of these methods.</p>
<p>Once you are finished with a PerlMagick object you should consider destroying it. Each image in an image sequence is stored in virtual memory. This can potentially add up to mebibytes of memory. Upon destroying a PerlMagick object, the memory is returned for use by other Perl methods. The recommended way to destroy an object is with <code>undef</code>:</p>
<pre>
undef $image;
</pre>
<p>To delete all the images but retain the <code>Image::Magick</code> object use</p>
<pre>
@$image = ();
</pre>
<p>and finally, to delete a single image from a multi-image sequence, use</p>
<pre>
undef $image->[$x];
</pre>
<p>The next section illustrates how to use various PerlMagick methods to manipulate an image sequence.</p>
<p>Some of the PerlMagick methods require external programs such as <a href="http://www.cs.wisc.edu/~ghost/">Ghostscript</a>. This may require an explicit path in your PATH environment variable to work properly. For example (in Unix),</p>
<pre>
$ENV{PATH}' . "='/../bin:/usr/bin:/usr/local/bin';
</pre>
<h2 class="magick-header"><a id="example"></a>Example Script</h2>
<p>Here is an example script to get you started:</p>
<pre>
#!/usr/local/bin/perl
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>
$x = $image->Crop(geometry=>'100x100+100+100');
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>
$image = new Image::Magick;
$image->Read('x1.png');
$image->Read('j*.jpg');
$image->Read('k.miff[1, 5, 3]');
$image->Contrast();
for ($x = 0; $image->[$x]; $x++)
{
$image->[$x]->Frame('100x200') if $image->[$x]->Get('magick') eq 'GIF';
undef $image->[$x] if $image->[$x]->Get('columns') < 100;
}
$p = $image->[1];
$p->Draw(stroke=>'red', primitive=>'rectangle', points=>20,20 100,100');
$q = $p->Montage();
undef $image;
$q->Write('x.miff');
</pre>
<p>Suppose you want to start out with a 100 by 100 pixel white canvas with a red pixel in the center. Try</p>
<pre>
$image = Image::Magick->new;
$image->Set(size=>'100x100');
$image->ReadImage('canvas:white');
$image->Set('pixel[49,49]'=>'red');
</pre>
<p>Here we reduce the intensity of the red component at (1,1) by half:</p>
<pre>
@pixels = $image->GetPixel(x=>1,y=>1);
$pixels[0]*=0.5;
$image->SetPixel(x=>1,y=>1,color=>\@pixels);
</pre>
<p>Or suppose you want to convert your color image to grayscale:</p>
<pre>
$image->Quantize(colorspace=>'gray');
</pre>
<p>Let's annotate an image with a Taipai TrueType font:</p>
<pre>
$text = 'Works like magick!';
$image->Annotate(font=>'kai.ttf', pointsize=>40, fill=>'green', text=>$text);
</pre>
<p>Perhaps you want to extract all the pixel intensities from an image and write them to STDOUT:</p>
<pre>
@pixels = $image->GetPixels(map=>'I', height=>$height, width=>$width, normalize=>true);
binmode STDOUT;
print pack('B*',join('',@pixels));
</pre>
<p>Other clever things you can do with a PerlMagick objects include</p>
<pre>
$i = $#$p"+1"; # return the number of images associated with object p
push(@$q, @$p); # push the images from object p onto object q
@$p = (); # delete the images but not the object p
$p->Convolve([1, 2, 1, 2, 4, 2, 1, 2, 1]); # 3x3 Gaussian kernel
</pre>
<h2 class="magick-header"><a id="read"></a>Read or Write an Image</h2>
<p>Use the methods listed below to either read, write, or display an image or image sequence:</p>
<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%">
</colgroup>
<tbody>
<tr>
<th>Method</th>
<th>Parameters</th>
<th>Return Value</th>
<th>Description</th>
</tr>
<tr>
<td>Read</td>
<td>one or more filenames</td>
<td>the number of images read</td>
<td>read an image or image sequence</td>
</tr>
<tr>
<td>Write</td>
<td>filename</td>
<td>the number of images written</td>
<td>write an image or image sequence</td>
</tr>
<tr>
<td>Display</td>
<td>server name</td>
<td>the number of images displayed</td>
<td>display the image or image sequence to an X server</td>
</tr>
<tr>
<td>Animate</td>
<td>server name</td>
<td>the number of images animated</td>
<td>animate image sequence to an X server</td>
</tr>
</tbody>
</table>
<p>For convenience, methods Write(), Display(), and Animate() can take any parameter that <a href="perl-magick.html#set-attribute">SetAttribute</a> knows about. For example,</p>
<pre>
$image->Write(filename=>'image.png', compression=>'None');
</pre>
<p>Use <code>-</code> as the filename to method Read() to read from standard in or to method Write() to write to standard out:</p>
<pre>
binmode STDOUT;
$image->Write('png:-');
</pre>
<p>To read an image in the GIF format from a PERL filehandle, use:</p>
<pre>
$image = Image::Magick->new;
open(IMAGE, 'image.gif');
$image->Read(file=>\*IMAGE);
close(IMAGE);
</pre>
<p>To write an image in the PNG format to a PERL filehandle, use:</p>
<pre>
$filename = "image.png";
open(IMAGE, ">$filename");
$image->Write(file=>\*IMAGE, filename=>$filename);
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 <code>%0Nd, %0No, or %0Nx</code> 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>
image%03d.miff
</pre>
<p>converts files image000.miff, image001.miff, etc.</p>
<p>You can optionally add <i>Image</i> to any method name. For example, ReadImage() is an alias for method Read().</p>
<h2 class="magick-header"><a id="manipulate"></a>Manipulate an Image</h2>
<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="examples.html">examples</a> of select PerlMagick methods. Here is an example call to an image manipulation method:</p>
<pre>
$image->Crop(geometry=>'100x100+10+20');
$image->[$x]->Frame("100x200");
</pre>
<p>And here is a list of other image manipulation methods you can call:</p>
<table class="table table-condensed table-striped">
<caption>Image Manipulation Methods</caption>
<tbody>
<tr>
<th>Method</th>
<th style="width: 40%">Parameters</th>
<th style="width: 40%">Description</th>
</tr>
<tr>
<td>AdaptiveBlur</td>
<td>geometry=><i>geometry</i>, radius=><i>double</i>, sigma=><i>double</i>, bias=><i>double</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>adaptively blur the image with a Gaussian operator of the given radius and standard deviation (sigma). Decrease the effect near edges.</td>
</tr>
<tr>
<td>AdaptiveResize</td>
<td>geometry=><i>geometry</i>, width=><i>integer</i>, height=><i>integer</i>, filter=>{Point, Box, Triangle, Hermite, Hanning, Hamming, Blackman, Gaussian, Quadratic, Cubic, Catrom, Mitchell, Lanczos, Bessel, Sinc}, support=><i>double</i>, blur=><i>double</i></td>
<td>adaptively resize image using data dependant triangulation. Specify <code>blur</code> > 1 for blurry or < 1 for sharp</td>
</tr>
<tr>
<td>AdaptiveSharpen</td>
<td>geometry=><i>geometry</i>, radius=><i>double</i>, sigma=><i>double</i>, bias=><i>double</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>adaptively sharpen the image with a Gaussian operator of the given radius and standard deviation (sigma). Increase the effect near edges.</td>
</tr>
<tr>
<td>AdaptiveThreshold</td>
<td>geometry=><i>geometry</i>, width=><i>integer</i>, height=><i>integer</i>, offset=><i>integer</i></td>
<td>local adaptive thresholding.</td>
</tr>
<tr>
<td>AddNoise</td>
<td>noise=>{Uniform, Gaussian, Multiplicative, Impulse, Laplacian, Poisson}, attenuate=><i>double</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>add noise to an image</td>
</tr>
<tr>
<td>AffineTransform</td>
<td>affine=><i>array of float values</i>, translate=><i>float, float</i>, scale=> <i>float, float</i>, rotate=><i>float</i>, skewX=><i>float</i>, skewY=><i>float</i>, interpolate={Average, Bicubic, Bilinear, Filter, Integer, Mesh, NearestNeighbor}, background=><i><a href="color.html">color name</a></i></td>
<td>affine transform image</td>
</tr>
<tr>
<td>Affinity</td>
<td>image=><i>image-handle</i>, method=>{None, FloydSteinberg, Riemersma}</td>
<td>choose a particular set of colors from this image</td>
</tr>
<tr>
<td>Annotate</td>
<td>text=><i>string</i>, font=><i>string</i>, family=><i>string</i>, style=>{Normal, Italic, Oblique, Any}, stretch=>{Normal, UltraCondensed, ExtraCondensed, Condensed, SemiCondensed, SemiExpanded, Expanded, ExtraExpanded, UltraExpanded}, weight=><i>integer</i>, pointsize=><i>integer</i>, density=><i>geometry</i>, stroke=><i><a href="color.html">color name</a></i>, strokewidth=><i>integer</i>, fill=><i><a href="color.html">color name</a></i>, undercolor=><i><a href="color.html">color name</a></i>, kerning=><i>float</i>, geometry=><i>geometry</i>, gravity=>{NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast}, antialias=>{true, false}, x=><i>integer</i>, y=><i>integer</i>, affine=><i>array of float values</i>, translate=><i>float, float</i>, scale=><i>float, float</i>, rotate=><i>float</i>. skewX=><i>float</i>, skewY=> <i>float</i>, align=>{Left, Center, Right}, encoding=>{UTF-8}, interline-spacing=><i>double</i>, interword-spacing=><i>double</i>, direction=>{right-to-left, left-to-right}</td>
<td>annotate an image with text. See <a href="perl-magick.html#misc">QueryFontMetrics</a> to get font metrics without rendering any text.</td>
</tr>
<tr>
<td>AutoGamma</td>
<td>channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>automagically adjust gamma level of image</td>
</tr>
<tr>
<td>AutoLevel</td>
<td>channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>automagically adjust color levels of image</td>
</tr>
<tr>
<td>AutoOrient</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>force all pixels below the threshold intensity into black</td>
</tr>
<tr>
<td>BlueShift</td>
<td>factor=><i>double</i>,</td>
<td>simulate a scene at nighttime in the moonlight. Start with a factor of 1.5.</td>
</tr>
<tr>
<td>Blur</td>
<td>geometry=><i>geometry</i>, radius=><i>double</i>, sigma=><i>double</i>, bias=><i>double</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>reduce image noise and reduce detail levels with a Gaussian operator of the given radius and standard deviation (sigma).</td>
</tr>
<tr>
<td>Border</td>
<td>geometry=><i>geometry</i>, width=><i>integer</i>, height=><i>integer</i>, bordercolor=><i><a href="color.html">color name</a></i>, compose=>{Undefined, Add, Atop, Blend, Bumpmap, Clear, ColorBurn, ColorDodge, Colorize, CopyBlack, CopyBlue, CopyCMYK, Cyan, CopyGreen, Copy, CopyMagenta, CopyOpacity, CopyRed, RGB, CopyYellow, Darken, Dst, Difference, Displace, Dissolve, DstAtop, DstIn, DstOut, DstOver, Dst, Exclusion, HardLight, Hue, In, Lighten, Luminize, Minus, Modulate, Multiply, None, Out, Overlay, Over, Plus, ReplaceCompositeOp, Saturate, Screen, SoftLight, Src, SrcAtop, SrcIn, SrcOut, SrcOver, Src, Subtract, Threshold, Xor },</td>
<td>surround the image with a border of color</td>
</tr>
<tr>
<td>CannyEdge</td>
<td>geometry=><i>geometry</i>, radius=><i>double</i>, sigma=><i>double</i>, 'lower-percent'=><i>double</i>, 'upper-percent'=><i>double</i></td>
<td>use a multi-stage algorithm to detect a wide range of edges in the image (e.g. CannyEdge('0x1+10%+40%')).</td>
</tr>
<tr>
<td>Charcoal</td>
<td>geometry=><i>geometry</i>, radius=><i>double</i>, sigma=><i>double</i></td>
<td>simulate a charcoal drawing</td>
</tr>
<tr>
<td>Chop</td>
<td>geometry=><i>geometry</i>, width=><i>integer</i>, height=><i>integer</i>, x=><i>integer</i>, y=><i>integer</i>, gravity=>{NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast}</td>
<td>chop an image</td>
</tr>
<tr>
<td>Clamp</td>
<td>channel=>{Red, RGB, All, etc.}</td>
<td>set each pixel whose value is below zero to zero and any the pixel whose value is above the quantum range to the quantum range (e.g. 65535) otherwise the pixel value remains unchanged.</td>
</tr>
<tr>
<td>Clip</td>
<td>id=><i>name</i>, inside=><i>{true, false}</i>,</td>
<td>apply along a named path from the 8BIM profile.</td>
</tr>
<tr>
<td>ClipMask</td>
<td>mask=><i>image-handle</i></td>
<td>clip image as defined by the image mask</td>
</tr>
<tr>
<td>Clut</td>
<td>image=><i>image-handle</i>, interpolate={Average, Bicubic, Bilinear, Filter, Integer, Mesh, NearestNeighbor}, channel=>{Red, RGB, All, etc.}</td>
<td>apply a color lookup table to an image sequence</td>
</tr>
<tr>
<td>Coalesce</td>
<td><br></td>
<td>merge a sequence of images</td>
</tr>
<tr>
<td>Color</td>
<td>color=><i><a href="color.html">color name</a></i></td>
<td>set the entire image to this color.</td>
</tr>
<tr>
<td>ColorDecisionList</td>
<td>filename=><i>string</i>,</td>
<td>color correct with a color decision list.</td>
</tr>
<tr>
<td>Colorize</td>
<td>fill=><i><a href="color.html">color name</a></i>, blend=><i>string</i></td>
<td>colorize the image with the fill color</td>
</tr>
<tr>
<td>ColorMatrix</td>
<td>matrix=><i>array of float values</i></td>
<td>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>Comment</td>
<td>string</td>
<td>add a comment to your image</td>
</tr>
<tr>
<td>CompareLayers</td>
<td>method=>{any, clear, overlay}</td>
<td>compares each image with the next in a sequence and returns the minimum bounding region of any pixel differences it discovers. Images do not have to be the same size, though it is best that all the images are coalesced (images are all the same size, on a flattened canvas, so as to represent exactly how a specific frame should look).</td>
</tr>
<tr>
<td>Composite</td>
<td>image=><i>image-handle</i>, compose=>{Undefined, Add, Atop, Blend, Bumpmap, Clear, ColorBurn, ColorDodge, Colorize, CopyBlack, CopyBlue, CopyCMYK, Cyan, CopyGreen, Copy, CopyMagenta, CopyOpacity, CopyRed, RGB, CopyYellow, Darken, Dst, Difference, Displace, Dissolve, DstAtop, DstIn, DstOut, DstOver, Dst, Exclusion, HardLight, Hue, In, Lighten, Luminize, Minus, Modulate, Multiply, None, Out, Overlay, Over, Plus, ReplaceCompositeOp, Saturate, Screen, SoftLight, Src, SrcAtop, SrcIn, SrcOut, SrcOver, Src, Subtract, Threshold, Xor }, mask=><i>image-handle</i>, geometry=><i>geometry</i>, x=><i>integer</i>, y=><i>integer</i>, gravity=>{NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast}, opacity=><i>integer</i>, tile=>{True, False}, rotate=><i>double</i>, color=><i><a href="color.html">color name</a></i>, blend=><i>geometry</i>, interpolate=>{undefined, average, bicubic, bilinear, filter, integer, mesh, nearest-neighbor, spline}</td>
<td>composite one image onto another. Use the rotate parameter in concert with the tile parameter.</td>
</tr>
<tr>
<td>ConnectedComponents</td>
<td>connectivity=><i>integer</i>,</td>
<td>connected-components uniquely labeled, choose from 4 or 8 w
ay connectivity.</td>
</tr>
<tr>
<td>Contrast</td>
<td>sharpen=>{True, False}</td>
<td>enhance or reduce the image contrast</td>
</tr>
<tr>
<td>ContrastStretch</td>
<td>levels=><i>string</i>, 'black-point'=><i>double</i>, 'white-point'=><i>double</i>, channel=>{Red, RGB, All, etc.}</td>
<td>improve the contrast in an image by `stretching' the range of intensity values</td>
</tr>
<tr>
<td>Convolve</td>
<td>coefficients=><i>array of float values</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}, bias=><i>double</i></td>
<td>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>CopyPixels</td>
<td>image=><i>image-handle</i>, geometry=><i>geometry</i>, width=><i>integer</i>, height=><i>integer</i>, x=><i>integer</i>, y=><i>integer</i>, offset=><i>geometry</i>, gravity=>{NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast}, dx=><i>integer</i>, dy=><i>integer</i></td>
<td>copy pixels from the image as defined by the <code>width</code>x<code>height</code>+<code>x</code>+<code>y</code> to image at offset +<code>dx</code>,+<code>dy</code>.</td>
</tr>
<tr>
<td>ConnectedComponents</td>
<td>connectivity=><i>integer</i>,</td>
<td>connected-components uniquely labeled, choose from 4 or 8 w
ay connectivity.</td>
</tr>
<tr>
<td>Crop</td>
<td>geometry=><i>geometry</i>, width=><i>integer</i>, height=><i>integer</i>, x=><i>integer</i>, y=><i>integer</i>, fuzz=><i>double</i>, gravity=>{NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast}</td>
<td>crop an image</td>
</tr>
<tr>
<td>CycleColormap</td>
<td>amount=><i>integer</i></td>
<td>displace image colormap by amount</td>
</tr>
<tr>
<td>Decipher</td>
<td>passphrase=><i>string</i></td>
<td>convert cipher pixels to plain pixels</td>
</tr>
<tr>
<td>Deconstruct</td>
<td><br></td>
<td>break down an image sequence into constituent parts</td>
</tr>
<tr>
<td>Deskew</td>
<td>geometry=><i>string</i>,threshold=><i>double</i></td>
<td>straighten the image</td>
</tr>
<tr>
<td>Despeckle</td>
<td> </td>
<td>reduce the speckles within an image</td>
</tr>
<tr>
<td>Difference</td>
<td>image=><i>image-handle</i></td>
<td>compute the difference metrics between two images </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>distort image</td>
</tr>
<tr>
<td>Draw</td>
<td>primitive=>{point, line, rectangle, arc, ellipse, circle, path, polyline, polygon, bezier, color, matte, text, @<i>filename</i>}, points=><i>string</i> , method=><i>{Point, Replace, Floodfill, FillToBorder, Reset}</i>, stroke=><i><a href="color.html">color name</a></i>, fill=><i><a href="color.html">color name</a></i>, font=><i>string</i>, pointsize=><i>integer</i>, strokewidth=><i>float</i>, antialias=>{true, false}, bordercolor=><i><a href="color.html">color name</a></i>, x=><i>float</i>, y=><i>float</i>, dash-offset=><i>float</i>, dash-pattern=><i>array of float values</i>, affine=><i>array of float values</i>, translate=><i>float, float</i>, scale=><i>float, float</i>, rotate=><i>float</i>, skewX=><i>float</i>, skewY=><i>float</i>, interpolate=>{undefined, average, bicubic, bilinear, mesh, nearest-neighbor, spline}, kerning=><i>float</i>, text=><i>string</i>, vector-graphics=><i>string</i>, interline-spacing=><i>double</i>, interword-spacing=><i>double</i>, direction=>{right-to-left, left-to-right}</td>
<td>annotate an image with one or more graphic primitives.</td>
</tr>
<tr>
<td>Encipher</td>
<td>passphrase=><i>string</i></td>
<td>convert plain pixels to cipher pixels</td>
</tr>
<tr>
<td>Edge</td>
<td>radius=><i>double</i></td>
<td>enhance edges within the image with a convolution filter of the given radius.</td>
</tr>
<tr>
<td>Emboss</td>
<td>geometry=><i>geometry</i>, radius=><i>double</i>, sigma=><i>double</i></td>
<td>emboss the image with a convolution filter of the given radius and standard deviation (sigma).</td>
</tr>
<tr>
<td>Enhance</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>perform histogram equalization to the image</td>
</tr>
<tr>
<td>Extent</td>
<td>geometry=><i>geometry</i>, width=><i>integer</i>, height=><i>integer</i>, x=><i>integer</i>, y=><i>integer</i>, fuzz=><i>double</i>, background=><i><a href="color.html">color name</a></i>, gravity=>{NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast}</td>
<td>set the image size</td>
</tr>
<tr>
<td>Evaluate</td>
<td>value=><i>double</i>, operator=><i>{Add, And, Divide, LeftShift, Max, Min, Multiply, Or, Rightshift, RMS, Subtract, Xor}</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow} </td>
<td>apply an arithmetic, relational, or logical expression to the image</td>
</tr>
<tr>
<td>Filter</td>
<td>kernel=><i>string</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}, bias=><i>double</i></td>
<td>apply a convolution kernel to the image.</td>
</tr>
<tr>
<td>Flip</td>
<td><br></td>
<td>reflect the image scanlines in the vertical direction</td>
</tr>
<tr>
<td>Flop</td>
<td><br></td>
<td>reflect the image scanlines in the horizontal direction</td>
</tr>
<tr>
<td>FloodfillPaint</td>
<td>geometry=><i>geometry</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}, x=><i>integer</i>, y=><i>integer</i> , fill=><i><a href="color.html">color name</a></i>, bordercolor=><i><a href="color.html">color name</a></i>, fuzz=><i>double</i>, invert=>{True, False}</td>
<td>changes the color value of any pixel that matches the color of the target pixel and is a neighbor. If you specify a border color, the color value is changed for any neighbor pixel that is not that color.</td>
</tr>
<tr>
<td>ForwardFourierTransform</td>
<td>magnitude=>{True, False}</td>
<td>implements the forward discrete Fourier transform (DFT)</td>
</tr>
<tr>
<td>Frame</td>
<td>geometry=><i>geometry</i>, width=><i>integer</i>, height=><i>integer</i>, inner=><i>integer</i>, outer=><i>integer</i>, fill=><i><a href="color.html">color name</a></i>, compose=>{Undefined, Add, Atop, Blend, Bumpmap, Clear, ColorBurn, ColorDodge, Colorize, CopyBlack, CopyBlue, CopyCMYK, Cyan, CopyGreen, Copy, CopyMagenta, CopyOpacity, CopyRed, RGB, CopyYellow, Darken, Dst, Difference, Displace, Dissolve, DstAtop, DstIn, DstOut, DstOver, Dst, Exclusion, HardLight, Hue, In, Lighten, Luminize, Minus, Modulate, Multiply, None, Out, Overlay, Over, Plus, ReplaceCompositeOp, Saturate, Screen, SoftLight, Src, SrcAtop, SrcIn, SrcOut, SrcOver, Src, Subtract, Threshold, Xor },</td>
<td>surround the image with an ornamental border</td>
</tr>
<tr>
<td>Function</td>
<td>parameters=><i>array of float values</i>, function=>{Sin}, 'virtual-pixel'=>{Background Black Constant Dither Edge Gray Mirror Random Tile Transparent White}</td>
<td>apply a function to the image</td>
</tr>
<tr>
<td>Gamma</td>
<td>gamma=><i>string</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>gamma correct the image</td>
</tr>
<tr>
<td>GaussianBlur</td>
<td>geometry=><i>geometry</i>, radius=><i>double</i>, sigma=><i>double</i>, bias=><i>double</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>reduce image noise and reduce detail levels with a Gaussian operator of the given radius and standard deviation (sigma).</td>
</tr>
<tr>
<td>GetPixel</td>
<td>geometry=><i>geometry</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}, normalize=>{true, false}, x=><i>integer</i>, y=><i>integer</i></td>
<td>get a single pixel. By default normalized pixel values are returned.</td>
</tr>
<tr>
<td>GetPixels</td>
<td>geometry=><i>geometry</i>, width=><i>integer</i>, height=><i>integer</i>, x=><i>integer</i>, y=><i>integer</i>, map=><i>string</i>, normalize=>{true, false}</td>
<td>get image pixels as defined by the map (e.g. "RGB", "RGBA", etc.). By default non-normalized pixel values are returned.</td>
</tr>
<tr>
<td>Grayscale</td>
<td>channel=>{Average, Brightness, Lightness, Rec601Luma, Rec601Luminance, Rec709Luma, Rec709Luminance, RMS}</td>
<td>convert image to grayscale</td>
</tr>
<tr>
<td>HaldClut</td>
<td>image=><i>image-handle</i>, channel=>{Red, RGB, All, etc.}</td>
<td>apply a Hald color lookup table to an image sequence</td>
</tr>
<tr>
<td>HoughLine</td>
<td>geometry=><i>geometry</i>, width=><i>double</i>, height=><i>double</i>, threshold=><i>double</i></td>
<td>identify lines in the image (e.g. HoughLine('9x9+195')).</td>
</tr>
<tr>
<td>Identify</td>
<td>file=><i>file</i>, features=><i>distance</i>, unique=>{True, False}</td>
<td>identify the attributes of an image</td>
</tr>
<tr>
<td>Implode</td>
<td>amount=><i>double</i>, interpolate=>{undefined, average, bicubic, bilinear, mesh, nearest-neighbor, spline}</td>
<td>implode image pixels about the center</td>
</tr>
<tr>
<td>InverseDiscreteFourierTransform</td>
<td>magnitude=>{True, False}</td>
<td>implements the inverse discrete Fourier transform (DFT)</td>
</tr>
<tr>
<td>Kuwahara</td>
<td>geometry=><i>geometry</i>, radius=><i>double</i>, sigma=><i>double</i>, bias=><i>double</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>edge preserving noise reduction filter</td>
</tr>
<tr>
<td>Label</td>
<td>string</td>
<td>assign a label to an image</td>
</tr>
<tr>
<td>Layers</td>
<td>method=>{coalesce, compare-any, compare-clear, compare-over, composite, dispose, flatten, merge, mosaic, optimize, optimize-image, optimize-plus, optimize-trans, remove-dups, remove-zero}, compose=>{Undefined, Add, Atop, Blend, Bumpmap, Clear, ColorBurn, ColorDodge, Colorize, CopyBlack, CopyBlue, CopyCMYK, Cyan, CopyGreen, Copy, CopyMagenta, CopyOpacity, CopyRed, RGB, CopyYellow, Darken, Dst, Difference, Displace, Dissolve, DstAtop, DstIn, DstOut, DstOver, Dst, Exclusion, HardLight, Hue, In, Lighten, LinearLight, Luminize, Minus, Modulate, Multiply, None, Out, Overlay, Over, Plus, ReplaceCompositeOp, Saturate, Screen, SoftLight, Src, SrcAtop, SrcIn, SrcOut, SrcOver, Src, Subtract, Threshold, Xor }, dither=>{true, false}</td>
<td>compare each image the GIF disposed forms of the previous image in the sequence. From this, attempt to select the smallest cropped image to replace each frame, while preserving the results of the animation.</td>
</tr>
<tr>
<td>Level</td>
<td>levels=><i>string</i>, 'black-point'=><i>double</i>, 'gamma'=><i>double</i>, 'white-point'=><i>double</i>, channel=>{Red, RGB, All, etc.}</td>
<td>adjust the level of image contrast</td>
</tr>
<tr>
<td>LevelColors</td>
<td>invert=>>{True, False}, 'black-point'=><i>string</i>, 'white-point'=><i>string</i>, channel=>{Red, RGB, All, etc.}</td>
<td>level image with the given colors</td>
</tr>
<tr>
<td>LinearStretch</td>
<td>levels=><i>string</i>, 'black-point'=><i>double</i>, 'white-point'=><i>double</i></td>
<td>linear with saturation stretch</td>
</tr>
<tr>
<td>LiquidResize</td>
<td>geometry=><i>geometry</i>, width=><i>integer</i>, height=><i>integer</i>, delta-x=><i>double</i>, rigidity=><i>double</i></td>
<td>rescale image with seam-carving.</td>
</tr>
<tr>
<td>Magnify</td>
<td><br></td>
<td>double the size of the image with pixel art scaling</td>
</tr>
<tr>
<td>Mask</td>
<td>mask=><i>image-handle</i></td>
<td>composite image pixels as defined by the mask</td>
</tr>
<tr>
<td>MatteFloodfill</td>
<td>geometry=><i>geometry</i>, x=><i>integer</i>, y=><i>integer</i> , matte=><i>integer</i>, bordercolor=><i><a href="color.html">color name</a></i>, fuzz=><i>double</i>, invert=>{True, False}</td>
<td>changes the matte value of any pixel that matches the color of the target pixel and is a neighbor. If you specify a border color, the matte value is changed for any neighbor pixel that is not that color.</td>
</tr>
<tr>
<td>MeanShift</td>
<td>geometry=><i>geometry</i>, width=><i>double</i>, height=><i>double</i>, distance=><i>double</i></td>
<td>delineate arbitrarily shaped clusters in the image (e.g. MeanShift('7x7+10%')).</td>
</tr>
<tr>
<td>MedianFilter</td>
<td>geometry=><i>geometry</i>, width=><i>integer</i>, height=><i>integer</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>replace each pixel with the median intensity pixel of a neighborhood.</td>
</tr>
<tr>
<td>Minify</td>
<td><br></td>
<td>half the size of an image</td>
</tr>
<tr>
<td>Mode</td>
<td>geometry=><i>geometry</i>, width=><i>integer</i>, height=><i>integer</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>make each pixel the <var>predominant color</var> of the neighborhood.</td>
</tr>
<tr>
<td>Modulate</td>
<td>factor=><i>geometry</i>, brightness=><i>double</i>, saturation=><i>double</i>, hue=><i>double</i>, lightness=><i>double</i>, whiteness=><i>double</i>, blackness=><i>double</i> </td>
<td>vary the brightness, saturation, and hue of an image by the specified percentage</td>
</tr>
<tr>
<td>Morphology</td>
<td>kernel=><i>string</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}, iterations=><i>integer</i></td>
<td>apply a morphology method to the image.</td>
</tr>
<tr>
<td>MotionBlur</td>
<td>geometry=><i>geometry</i>, radius=><i>double</i>, sigma=><i>double</i>, angle=><i>double</i>, bias=><i>double</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>reduce image noise and reduce detail levels with a Gaussian operator of the given radius and standard deviation (sigma) at the given angle to simulate the effect of motion</td>
</tr>
<tr>
<td>Negate</td>
<td>gray=>{True, False}, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>replace each pixel with its complementary color (white becomes black, yellow becomes blue, etc.)</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>transform image to span the full range of color values</td>
</tr>
<tr>
<td>OilPaint</td>
<td>radius=><i>integer</i></td>
<td>simulate an oil painting</td>
</tr>
<tr>
<td>Opaque</td>
<td>color=><i><a href="color.html">color name</a></i>,
fill=><i><a href="color.html">color name</a></i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}, invert=>{True, False}</td>
<td>change this color to the fill color within the image</td>
</tr>
<tr>
<td>OrderedDither</td>
<td>threshold=>{threshold, checks, o2x2, o3x3, o4x4, o8x8, h4x4a, h6x6a, h8x8a, h4x4o, h6x6o, h8x8o, h16x16o, hlines6x4}, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>order dither image</td>
</tr>
<tr>
<td>Perceptible</td>
<td>epsilon=><i>double</i>, channel=>{Red, RGB, All, etc.}</td>
<td>set each pixel whose value is less than |<var>epsilon</var>| to <var>-epsilon</var> or <var>epsilon</var> (whichever is closer) otherwise the pixel value remains unchanged..</td>
</tr>
<tr>
<td>Polaroid</td>
<td>caption=><i>string</i>, angle=><i>double</i>, pointsize=><i>double</i>, font=><i>string</i>, stroke=> <i><a href="color.html">color name</a></i>, strokewidth=><i>integer</i>, fill=><i><a href="color.html">color name</a></i>, gravity=>{NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast}, background=><i><a href="color.html">color name</a></i></td>
<td>simulate a Polaroid picture.</td>
</tr>
<tr>
<td>Posterize</td>
<td>levels=><i>integer</i>, dither=>{True, False}</td>
<td>reduce the image to a limited number of color level</td>
</tr>
<tr>
<td>Profile</td>
<td>name=><i>string</i>, profile=><i>blob</i>, rendering-intent=>{Undefined, Saturation, Perceptual, Absolute, Relative}, black-point-compensation=>{True, False}</td>
<td>add or remove ICC or IPTC image profile; name is formal name (e.g. ICC or filename; set profile to <code>''</code> to remove profile</td>
</tr>
<tr>
<td>Quantize</td>
<td>colors=><i>integer</i>, colorspace=>{RGB, Gray, Transparent, OHTA, XYZ, YCbCr, YIQ, YPbPr, YUV, CMYK, sRGB, HSL, HSB}, treedepth=> <i>integer</i>, dither=>{True, False}, dither-method=>{Riemersma, Floyd-Steinberg}, measure_error=>{True, False}, global_colormap=>{True, False}, transparent-color=><i>color</i></td>
<td>preferred number of colors in the image</td>
</tr>
<tr>
<td>Raise</td>
<td>geometry=><i>geometry</i>, width=><i>integer</i>, height=><i>integer</i>, x=><i>integer</i>, y=><i>integer</i>, raise=>{True, False}</td>
<td>lighten or darken image edges to create a 3-D effect</td>
</tr>
<tr>
<td>ReduceNoise</td>
<td>geometry=><i>geometry</i>, width=><i>integer</i>, height=><i>integer</i>, channel=>{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
<td>reduce noise in the image with a noise peak elimination filter</td>
</tr>
<tr>
<td>Remap</td>
<td>image=><i>image-handle</i>, dither=>{true, false}, dither-method=>{Riemersma, Floyd-Steinberg}</td>
<td>replace the colors of an image with the closest color from a reference image.</td>
</tr>
<tr>
<td>Resample</td>
<td>density=><i>geometry</i>, x=><i>double</i>, y=><i>double</i>, filter=>{Point, Box, Triangle, Hermite, Hanning, Hamming, Blackman, Gaussian, Quadratic, Cubic, Catrom, Mitchell, Lanczos, Bessel, Sinc}, support=><i>double</i></td>
<td>resample image to desired resolution. Specify <code>blur</code> > 1 for blurry or < 1 for sharp</td>
</tr>
<tr>
<td>Resize</td>
<td>geometry=><i>geometry</i>, width=><i>integer</i>, height=><i>integer</i>, filter=>{Point, Box, Triangle, Hermite, Hanning, Hamming, Blackman, Gaussian, Quadratic, Cubic, Catrom, Mitchell, Lanczos, Bessel, Sinc}, support=><i>double</i>, blur=><i>double</i></td>
<td>scale image to desired size. Specify <code>blur</code> > 1 for blurry or < 1 for sharp</td>
</tr>
<tr>
<td>Roll</td>
<td>geometry=><i>geometry</i>, x=><i>integer</i>, y=><i>integer</i></td>
<td>roll an image vertically or horizontally</td>
</tr>
<tr>
<td>Rotate</td>
<td>degrees=><i>double</i>, background=><i><a href="color.html">color name</a></i></td>
<td>rotate an image</td>