This file is indexed.

/usr/share/doc/imagemagick/www/perl-magick.html is in imagemagick-doc 8:6.7.7.10-6ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html version="-//W3C//DTD XHTML 1.1//EN"
      xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.w3.org/1999/xhtml
                          http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
  <meta name="google-site-verification" content="MxsMq6bdLOx0KSuz1MY6yG9ZTIJ7_7DVRfl5NCAT5Yg"/>
  <title>ImageMagick: PerlMagick, Perl API for ImageMagick</title>
  <meta http-equiv="content-language" content="en-US"/>
  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  <meta http-equiv="reply-to" content="magick-users@imagemagick.org"/>
  <meta name="application-name" content="ImageMagick"/>
  <meta name="description" content="Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats.  In addition resize, rotate, shear, distort and transform images automagically."/>
  <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, OpenMP, software development library, image, photo, software, Magick++, MagickWand"/>
  <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-2012 ImageMagick Studio LLC"/>
  <meta name="distribution" content="Global"/>
  <link rel="icon" href="../images/wand.png"/>
  <link rel="shortcut icon" href="../images/wand.ico"  type="images/x-icon"/>
  <link rel="canonical" href="http://www.imagemagick.org" />
  <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"/>
  <!-- Add jQuery library -->
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
  
  <!-- Optionaly include easing and/or mousewheel plugins -->
  <script type="text/javascript" src="http://www.imagemagick.org/fancybox/jquery.easing-1.3.pack.js"></script>
  <script type="text/javascript" src="http://www.imagemagick.org/fancybox/jquery.mousewheel-3.0.6.pack.js"></script>
  
  <!-- Add fancyBox -->
  <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/jquery.fancybox.css?v=2.0.4" type="text/css" media="screen" />
  <script type="text/javascript" src="http://www.imagemagick.org/fancybox/jquery.fancybox.pack.js?v=2.0.4"></script>
  
  <!-- Optionaly include button and/or thumbnail helpers -->
  <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/helpers/jquery.fancybox-buttons.css?v=2.0.4" type="text/css" media="screen" />
  <script type="text/javascript" src="http://www.imagemagick.org/fancybox/helpers/jquery.fancybox-buttons.js?v=2.0.4"></script>
  
  <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/helpers/jquery.fancybox-thumbs.css?v=2.0.4" type="text/css" media="screen" />
  <script type="text/javascript" src="http://www.imagemagick.org/fancybox/helpers/jquery.fancybox-thumbs.js?v=2.0.4"></script>
  <script type="text/javascript">
  	$(document).ready(function() {
  		$(".fancybox").fancybox();
  	});
  </script>
  <!-- ImageMagick style -->
  <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
  <style type="text/css" media="all">
    @import url("../www/magick.css");
  </style>
</head>

<body id="www-imagemagick-org">
<div class="titlebar">
<div style="margin: 17px auto; float: left;">
  <script type="text/javascript">
  <!--
    google_ad_client = "pub-3129977114552745";
    google_ad_slot = "5439289906";
    google_ad_width = 728;
    google_ad_height = 90;
  //-->
  </script>
  <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  </script>
</div>
<a href="../discourse-server">
  <img src="../images/logo.jpg"
  alt="ImageMagick Logo"
  style="width: 123px; height: 118px; border: 0px; float: right;" /></a>
<a href="../index.html">
  <img src="../images/sprite.jpg"
  alt="ImageMagick Sprite"
  style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
</div>

<div class="westbar">

<div class="menu">
  <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
</div>
<div class="menu">
  <a title="Binary Releases" href="binary-releases.html">Binary Releases</a>
</div>
<div class="sub">
    <a title="Binary Release: Unix" href="binary-releases.html#unix">Unix</a>
</div>
<div class="sub">
    <a title="Binary Release: MacOS X" href="binary-releases.html#macosx">Mac OS X</a>
</div>
<div class="sub">
    <a title="Binary Release: iOS" href="binary-releases.html#iOS">iOS</a>
</div>
<div class="sub">
    <a title="Binary Release: Windows" href="binary-releases.html#windows">Windows</a>
</div>
<div class="sep"></div>
<div class="menu">
  <a title="Command-line Tools" href="command-line-tools.html">Command-line Tools</a>
</div>
<div class="sub">
    <a title="Command-line Tools: Processing" href="command-line-processing.html">Processing</a>
</div>
<div class="sub">
    <a title="Command-line Tools: Options" href="command-line-options.html">Options</a>
</div>
<div class="sub">
    <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
</div>
<div class="menu">
  <a title="Program Interfaces" href="api.html">Program Interfaces</a>
</div>
<div class="sub">
    <a title="Program Interface: MagickWand" href="magick-wand.html">MagickWand</a>
</div>
<div class="sub">
    <a title="Program Interface: MagickCore" href="magick-core.html">MagickCore</a>
</div>
<div class="sub">
    <a title="Program Interface: PerlMagick" href="perl-magick.html">PerlMagick</a>
</div>
<div class="sub">
    <a title="Program Interface: Magick++" href="magick++.html">Magick++</a>
</div>
<div class="sep"></div>
<div  class="menu">
   <a title="Install from Source" href="install-source.html">Install from Source</a>
</div>
<div class="sub">
    <a title="Install from Source: Unix" href="install-source.html#unix">Unix</a>
</div>
<div class="sub">
    <a title="Install from Source: Windows" href="install-source.html#windows">Windows</a>
 </div>
<div class="menu">
  <a title="Resources" href="resources.html">Resources</a>
</div>
<div class="menu">
  <a title="Architecture" href="architecture.html">Architecture</a>
</div>
<div class="menu">
  <a title="Download" href="download.html">Download</a>
</div>
<div class="sep"></div>
<div class="menu">
  <a title="Search" href="search.html">Search</a>
</div>
<div class="sep"></div>
<div class="menu">
  <a title="Site Map" href="sitemap.html">Site Map</a>
</div>
<div  class="sub">
  <a title="Site Map: Links" href="links.html">Links</a>
</div>
<div class="sep"></div>
<div class="menu">
  <a rel="follow" title="Sponsors" href="sponsors.html">Sponsors:</a>

  <a href="http://www.networkredux.com"> <img src="../images/networkredux.png" width="140" height="31" alt="[sponsor]" style="margin-top: 4px; margin-left: 4px; border: 0px; float: left;" /></a>
  <a href="http://www.dinodirect.com/ipads-tablets/"> <img src="../images/dino-direct.jpg" width="140" height="90" alt="[sponsor]" style="margin-top: 4px; margin-left: 4px; border: 0px; float: left;" /></a><!-- 201208010120 mickey@163... -->
<div class="sponsbox">
<div class="sponsor">
  <a rel="follow" title="Sponsor: The Fastest &amp; Easiest Way to Find Images" href="http://www.graphicsfactory.com">The Fastest &amp; Easiest Way to Find Images</a><!-- 201210010270 graphicsfac... -->
</div>
<div class="sponsor">
  <a rel="follow" title="Sponsor: VPS" href="http://www.interdominios.com/vps">VPS</a><!-- 201209010090 barsh@inter... -->
</div>
<div class="sponsor">
  <a rel="follow" title="Werbebanner Werbeplane" href="http://www.allesbanner.de">Werbebanner Werbeplane</a><!-- 201212010450 info@druck... -->
</div>
<div class="sponsor">
  <a rel="follow" title="Entertainment News &amp; Photos" href="http://www.zimbio.com">Entertainment News &amp; Photos</a><!-- 201211010540 bd@zimb... -->
</div>
<div class="sponsor">
  <a rel="follow" title="Sponsor: LED24" href="http://led24.de/">LED24</a><!-- 201207010270 info@led24... -->
</div>
<div class="sponsor">
  <a rel="follow" title="Sponsor: Best Website Hosting" href="http://www.top-cheap-web-hosting.com">Best Website Hosting</a><!-- 201304010090 eunge.liu-->
</div>
<div class="sponsor">
  <a rel="follow" title="Android Tablet" href="http://www.dinodirect.com/ipads-tablets/">Android Tablet</a><!-- 201208010120 mickey@163... -->
</div>
<div class="sponsor">
  <a rel="follow" title="Sponsor: Web Site Hosting" href="http://webhostinggeeks.com">Web Site Hosting</a><!-- 201302010900 funds@enmob... -->
</div>
<div class="sponsor">
   <a rel="follow" title="Sponsor: Premium Quality Stock Photos" href="http://www.f1online.pro/en/">Premium Quality Stock Photos</a><!-- 2012080100540 ... -->
</div>
<div class="sponsor">
   <a rel="follow" title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 2012070100250 ... -->
</div>
<div class="sponsor">
  <a rel="follow" title="Sponsor: Managed Server" href="http://www.robhost.de">Managed Server</a><!-- 201210010720 klikics... -->
</div>
<div class="sponsor">
  <a rel="follow" title="Sponsor: Druckerei" href="http://www.allesdruck.de">Druckerei</a><!-- 201303011500 r.leo -->
</div>
<div  class="sponsor">
   <a rel="follow" title="Sponsor: Kaffeemaschinen reparatur" href="http://www.kaffeemaschinen-reparatur.de">Kaffeemaschinen reparatur</a><!-- 2012080100030 Temurbas atlas-multimedia-->
</div>
<div class="sponsor">
   <a rel="follow" title="Sponsor: Web Hosting" href="http://www.hostucan.com">Web Hosting</a><!-- 2012120100150 racent marketing@webhosting...-->
</div>
</div>
</div>
</div>

<div class="eastbar">
  <div class="g-plusone" id="gplusone"></div>
  <script type="text/javascript">
    window.___gcfg = {
      lang: 'en-US'
    };

    (function() {
      var po = document.createElement('script');
      po.type = 'text/javascript'; po.async = true;
      po.src = 'https://apis.google.com/js/plusone.js';
      var script = document.getElementsByTagName('script')[0];
      script.parentNode.insertBefore(po, script);
    })();
    var gplusone = document.getElementById("gplusone");
    gplusone.setAttribute("data-size","medium");
    gplusone.setAttribute("data-count","false");
  </script>
</div>

<div class="main">


<h1>PerlMagick API</h1>
<p class="navigation-index">[<a href="perl-magick.html#installation">Installation</a> &bull; <a href="perl-magick.html#overview">Overview</a> &bull; <a href="perl-magick.html#example">Example Script</a> &bull; <a href="perl-magick.html#read">Read or Write an Image</a> &bull; <a href="perl-magick.html#manipulate">Manipulate an Image</a> &bull; <a href="perl-magick.html#set-attribute">Set an Image Attribute</a> &bull; <a href="perl-magick.html#get-attribute">Get an Image Attribute</a> &bull; <a href="perl-magick.html#compare">Compare an Image to its Reconstruction</a> &bull; <a href="perl-magick.html#montage">Create an Image Montage</a> &bull; <a href="perl-magick.html#blobs">Working with Blobs</a> &bull; <a href="perl-magick.html#direct-access">Direct-access to Image Pixels</a> &bull; <a href="perl-magick.html#miscellaneous">Miscellaneous Methods</a> &bull; <a href="perl-magick.html#exceptions">Handling Exceptions</a>&bull; <a href="perl-magick.html#constants">Constant</a> ]</p>

<div class="doc-section">
<a id="introduction"></a>
<p><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="https://www.imagemagick.org/subversion/ImageMagick/trunk/PerlMagick/demo/">L-systems</a> to create images of plants using mathematical constructs, and finally navigate through collections of thumbnail images and select the image to view with the <a href="http://webmagick.sourceforge.net/">WebMagick Image Navigator</a>.</p>

<p>You can try PerlMagick from your Web browser at the <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">ImageMagick Studio</a>. Or, you can see <a href="examples.html">examples</a> of select PerlMagick functions.</p>
</div>

<h2><a id="installation"></a>Installation</h2>
<div class="doc-section">

<p><b>UNIX</b></p>

<p>The following instructions for Unix apply only to the unbundled PerlMagick as obtained from CPAN. PerlMagick is included as a subdirectory (PerlMagick) of the ImageMagick source distribution, and may be configured and built using the instructions provided in the ImageMagick distribution's README.txt file. It is usually most convenient to install PerlMagick as part of the ImageMagick distribution.</p>

<p>ImageMagick must already be installed on your system. Next, get
the <a href="download.html">PerlMagick</a> distribution corresponding to the installed ImageMagick distribution
(e.g., PerlMagick 6.77 for
ImageMagick 6.7.7) and unpack it as shown below:</p>

<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>tar xvfz PerlMagick-6.77.tar.gz</span><span class='crtout'></span><span class="crtprompt"> $ </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"> $ </span><span class='crtin'>perl Makefile.PL</span><span class='crtout'></span><span class="crtprompt"> $ </span><span class='crtin'>make</span><span class='crtout'></span><span class="crtprompt"> $ </span><span class='crtin'>make install</span></p>
<p>For Unix, you typically need to be <kbd>root</kbd> to install the software. There are ways around this. Consult the Perl manual pages for more information.</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 <kbd>nmake</kbd> from the Visual C++ or J++ development environment. Copy <kbd>\bin\IMagick.dll</kbd> and <kbd>\bin\X11.dll</kbd> to a directory in your dynamic load path such as <kbd>c:\perl\site\5.00502</kbd>.</p>

<p>Next, type</p>

<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>cd PerlMagick</span><span class='crtout'></span><span class="crtprompt"> $ </span><span class='crtin'>perl Makefile.nt</span><span class='crtout'></span><span class="crtprompt"> $ </span><span class='crtin'>nmake</span><span class='crtout'></span><span class="crtprompt"> $ </span><span class='crtin'>nmake install</span></p>
<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>

<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>make test</span></p>
<p>Use <kbd>nmake test</kbd> under Windows. There are a few demonstration scripts available to exercise many of the functions PerlMagick can perform. Type</p>

<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>cd demo</span><span class='crtout'></span><span class="crtprompt"> $ </span><span class='crtin'>make</span></p>
<p>You are now ready to utilize the PerlMagick methods from within your Perl scripts.</p>

</div>

<h2><a id="overview"></a>Overview</h2>
<div class="doc-section">

<p>Any script that wants to use PerlMagick methods must first define the methods within its namespace and instantiate an image object. Do this with:</p>

<pre class="code">
  use Image::Magick;

  $image=Image::Magick-&gt;new;
</pre>

<p>The new() method takes the same parameters as <a href="perl-magick.html#set-attribute">SetAttribute</a> . For example,</p>

<pre class="code">
  $image=Image::Magick-&gt;new(size=&gt;'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 <kbd>undef</kbd>:</p>

<pre class="code">
  undef $image;
</pre>

<p>To delete all the images but retain the <kbd>Image::Magick</kbd> object use</p>

<pre class="code">
  @$image = ();
</pre>

<p>and finally, to delete a single image from a multi-image sequence, use</p>

<pre class="code">
  undef $image-&gt;[$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>

<p class='crt'><span class="crtprompt"> $ </span><span class='crtin'>$ENV{PATH}='/../bin:/usr/bin:/usr/local/bin';</span></p>
<div style="margin: auto;">
<h2><a id="example"></a>Example Script</h2>
</div>

<p>Here is an example script to get you started:</p>

<pre class="code">
  #!/usr/local/bin/perl
  use Image::Magick;<br />
  my($image, $x);<br />
  $image = Image::Magick-&gt;new;
  $x = $image-&gt;Read('girl.png', 'logo.png', 'rose.png');
  warn "$x" if "$x";<br />
  $x = $image-&gt;Crop(geometry=&gt;'100x100+100+100');
  warn "$x" if "$x";<br />
  $x = $image-&gt;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="code">
  #!/usr/local/bin/perl
  use Image::Magick;<br />
  my($image, $p, $q);<br />
  $image = new Image::Magick;
  $image-&gt;Read('x1.png');
  $image-&gt;Read('j*.jpg');
  $image-&gt;Read('k.miff[1, 5, 3]');
  $image-&gt;Contrast();
  for ($x = 0; $image-&gt;[$x]; $x++)
  {
    $image-&gt;[$x]-&gt;Frame('100x200') if $image-&gt;[$x]-&gt;Get('magick') eq 'GIF';
    undef $image-&gt;[$x] if $image-&gt;[$x]-&gt;Get('columns') &lt; 100;
  }
  $p = $image-&gt;[1];
  $p-&gt;Draw(stroke=&gt;'red', primitive=&gt;'rectangle', points=&gt;20,20 100,100');
  $q = $p-&gt;Montage();
  undef $image;
  $q-&gt;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 class="code">
  $image = Image::Magick-&gt;new;
  $image-&gt;Set(size=&gt;'100x100');
  $image-&gt;ReadImage('canvas:white');
  $image-&gt;Set('pixel[49,49]'=&gt;'red');
</pre>

<p>Here we reduce the intensity of the red component at (1,1) by half:</p>

<pre class="code">
  @pixels = $image-&gt;GetPixel(x=&gt;1,y=&gt;1);
  $pixels[0]*=0.5;
  $image-&gt;SetPixel(x=&gt;1,y=&gt;1,color=&gt;\@pixels);
</pre>

<p>Or suppose you want to convert your color image to grayscale:</p>

<pre class="code">
  $image-&gt;Quantize(colorspace=&gt;'gray');
</pre>

<p>Let's annotate an image with a Taipai TrueType font:</p>

<pre class="code">
  $text = 'Works like magick!';
  $image-&gt;Annotate(font=&gt;'kai.ttf', pointsize=&gt;40, fill=&gt;'green', text=&gt;$text);
</pre>

<p>Perhaps you want to extract all the pixel intensities from an image and write them to STDOUT:</p>

<pre class="code">
  @pixels = $image-&gt;GetPixels(map=&gt;'I', height=&gt;$height, width=&gt;$width, normalize=&gt;true);
  binmode STDOUT;
  print pack('B*',join('',@pixels));
</pre>

<p>Other clever things you can do with a PerlMagick objects include</p>

<pre  class="code">
  $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-&gt;Convolve([1, 2, 1, 2, 4, 2, 1, 2, 1]);   # 3x3 Gaussian kernel
</pre>

<div style="margin: auto;">
  <h2><a id="read"></a>Read or Write an Image</h2>
</div>

<p>Use the methods listed below to either read, write, or display an image or image sequence:</p>

<table class="doc">
<caption>Read or Write Methods</caption>
<colgroup>
  <col width="20%"></col>
  <col width="20%"></col>
  <col width="20%"></col>
  <col width="40%"></col>
</colgroup>
<tbody>

  <tr>
    <th>Method</th>
    <th>Parameters</th>
    <th>Return Value</th>
    <th>Description</th>
  </tr>

  <tr>
    <td valign="top">Read</td>
    <td valign="top">one or more filenames</td>
    <td valign="top">the number of images read</td>
    <td valign="top">read an image or image sequence</td>
  </tr>

  <tr>
    <td valign="top">Write</td>
    <td valign="top">filename</td>
    <td valign="top">the number of images written</td>
    <td valign="top">write an image or image sequence</td>
  </tr>

  <tr>
    <td valign="top">Display</td>
    <td valign="top">server name</td>
    <td valign="top">the number of images displayed</td>
    <td valign="top">display the image or image sequence to an X server</td>
  </tr>

  <tr>
    <td valign="top">Animate</td>
    <td valign="top">server name</td>
    <td valign="top">the number of images animated</td>
    <td valign="top">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 class="code">
  $image-&gt;Write(filename=&gt;'image.png', compression=&gt;'None');
</pre>

<p>Use <kbd>-</kbd> as the filename to method Read() to read from standard in or to method Write() to write to standard out:</p>

<pre class="code">
  binmode STDOUT;
  $image-&gt;Write('png:-');
</pre>

<p>To read an image in the GIF format from a PERL filehandle, use:</p>

<pre class="code">
  $image = Image::Magick-&gt;new;
  open(IMAGE, 'image.gif');
  $image-&gt;Read(file=&gt;\*IMAGE);
  close(IMAGE);
</pre>

<p>To write an image in the PNG format to a PERL filehandle, use:</p>

<pre class="code">
  $filename = "image.png";
  open(IMAGE, ">$filename");
  $image-&gt;Write(file=&gt;\*IMAGE, filename=&gt;$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 <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">
  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>

</div>

<h2><a id="manipulate"></a>Manipulate an Image</h2>
<div class="doc-section">

<p>Once you create an image with, for example, method ReadImage() you may want to operate on it. Below is a list of all the image manipulations methods available to you with PerlMagick.  There are <a href="examples.html">examples</a> of select PerlMagick methods. Here is an example call to an image manipulation method:</p>

<pre class="code">
  $image-&gt;Crop(geometry=&gt;'100x100+10+20');
  $image-&gt;[$x]-&gt;Frame("100x200");
</pre>

<p>And here is a list of other image manipulation methods you can call:</p>

<table class="doc">
<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 valign="top">AdaptiveBlur</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, radius=&gt;<i>double</i>, sigma=&gt;<i>double</i>, bias=&gt;<i>double</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
    <td valign="top">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 valign="top">AdaptiveResize</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i>, filter=&gt;{Point, Box, Triangle, Hermite, Hanning, Hamming, Blackman, Gaussian, Quadratic, Cubic, Catrom, Mitchell, Lanczos, Bessel, Sinc}, support=&gt;<i>double</i>, blur=&gt;<i>double</i></td>
    <td valign="top">adaptively resize image using data dependant triangulation. Specify <kbd>blur</kbd> &gt; 1 for blurry or &lt; 1 for sharp</td>
  </tr>

  <tr>
    <td valign="top">AdaptiveSharpen</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, radius=&gt;<i>double</i>, sigma=&gt;<i>double</i>, bias=&gt;<i>double</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
    <td valign="top">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 valign="top">AdaptiveThreshold</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i>, offset=&gt;<i>integer</i></td>
    <td valign="top">local adaptive thresholding.</td>
  </tr>

  <tr>
    <td valign="top">AddNoise</td>
    <td valign="top">noise=&gt;{Uniform, Gaussian, Multiplicative, Impulse, Laplacian, Poisson}, attenuate=&gt;<i>double</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
    <td valign="top">add noise to an image</td>
  </tr>

  <tr>
    <td valign="top">AffineTransform</td>
    <td valign="top">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={Average, Bicubic, Bilinear, Filter, Integer, Mesh, NearestNeighbor}, background=&gt;<i><a href="color.html">color name</a></i></td>
    <td valign="top">affine transform image</td>
  </tr>

  <tr>
    <td valign="top">Affinity</td>
    <td valign="top">image=&gt;<i>image-handle</i>, method=&gt;{None, FloydSteinberg, Riemersma}</td>
    <td valign="top">choose a particular set of colors from this image</td>
  </tr>

  <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="color.html">color name</a></i>, strokewidth=&gt;<i>integer</i>, fill=&gt;<i><a href="color.html">color name</a></i>, undercolor=&gt;<i><a href="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="perl-magick.html#misc">QueryFontMetrics</a> to get font metrics without rendering any text.</td>
  </tr>

  <tr>
    <td valign="top">AutoGamma</td>
    <td valign="top">channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
    <td valign="top">automagically adjust gamma level of image</td>
  </tr>

  <tr>
    <td valign="top">AutoLevel</td>
    <td valign="top">channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
    <td valign="top">automagically adjust color levels of image</td>
  </tr>

  <tr>
    <td valign="top">AutoOrient</td>
    <td valign="top"><br /></td>
    <td valign="top">automagically orient the image</td>
  </tr>

  <tr>
    <td valign="top">BlackThreshold</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>

  <tr>
    <td valign="top">BlueShift</td>
    <td valign="top">factor=&gt;<i>double</i>,</td>
    <td valign="top">simulate a scene at nighttime in the moonlight.  Start with a factor of 1.5.</td>
  </tr>

  <tr>
    <td valign="top">Blur</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, radius=&gt;<i>double</i>, sigma=&gt;<i>double</i>, bias=&gt;<i>double</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
    <td valign="top">reduce image noise and reduce detail levels with a Gaussian operator of the given radius and standard deviation (sigma).</td>
  </tr>

  <tr>
    <td valign="top">Border</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i>, bordercolor=&gt;<i><a href="color.html">color name</a></i>,  compose=&gt;{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 valign="top">surround the image with a border of color</td>
  </tr>

  <tr>
    <td valign="top">Charcoal</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, radius=&gt;<i>double</i>, sigma=&gt;<i>double</i></td>
    <td valign="top">simulate a charcoal drawing</td>
  </tr>

  <tr>
    <td valign="top">Chop</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></td>
    <td valign="top">chop an image</td>
  </tr>

  <tr>
    <td valign="top">Clamp</td>
    <td valign="top"><br /></td>
    <td valign="top">restrict color values from 0 to the quantum depth.</td>
  </tr>

  <tr>
    <td valign="top">Clip</td>
    <td valign="top">id=&gt;<i>name</i>, inside=&gt;<i>{true, false}</i>,</td>
    <td valign="top">apply along a named path from the 8BIM profile.</td>
  </tr>

  <tr>
    <td valign="top">ClipMask</td>
    <td valign="top">mask=&gt;<i>image-handle</i></td>
    <td valign="top">clip image as defined by the image mask</td>
  </tr>

  <tr>
    <td valign="top">Clut</td>
    <td valign="top">image=&gt;<i>image-handle</i>,  interpolate={Average, Bicubic, Bilinear, Filter, Integer, Mesh, NearestNeighbor}, channel=&gt;{Red, RGB, CMYK, Cyan, Green, Magenta, Blue, Yellow, Opacity, Black, or All}</td>
    <td valign="top">apply a color lookup table to an image sequence</td>
  </tr>

  <tr>
    <td valign="top">Coalesce</td>
    <td valign="top"><br /></td>
    <td valign="top">merge a sequence of images</td>
  </tr>

  <tr>
    <td valign="top">Color</td>
    <td valign="top">color=&gt;<i><a href="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>
    <td valign="top">color correct with a color decision list.</td>
  </tr>

  <tr>
    <td valign="top">Colorize</td>
    <td valign="top">fill=&gt;<i><a href="color.html">color name</a></i>, blend=&gt;<i>string</i></td>
    <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>
    <td valign="top">add a comment to your image</td>
  </tr>

  <tr>
    <td valign="top">CompareLayers</td>
    <td valign="top">method=&gt;{any, clear, overlay}</td>
    <td valign="top">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 valign="top">Composite</td>
    <td valign="top">image=&gt;<i>image-handle</i>, compose=&gt;{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=&gt;<i>image-handle</i>, geometry=&gt;<i>geometry</i>, x=&gt;<i>integer</i>, y=&gt;<i>integer</i>, gravity=&gt;{NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast}, opacity=&gt;<i>integer</i>, tile=&gt;{True, False}, rotate=&gt;<i>double</i>, color=&gt;<i><a href="color.html">color name</a></i>, blend=&gt;<i>geometry</i>, interpolate=&gt;{undefined, average, bicubic, bilinear, filter, integer, mesh, nearest-neighbor, spline}</td>
    <td valign="top">composite one image onto another.  Use the rotate parameter in concert with the tile parameter.</td>
  </tr>

  <tr>
    <td valign="top">Contrast</td>
    <td valign="top">sharpen=&gt;{True, False}</td>
    <td valign="top">enhance or reduce the image contrast</td>
  </tr>

  <tr>
    <td valign="top">ContrastStretch</td>
    <td valign="top">levels=&gt;<i>string</i>, 'black-point'=&gt;<i>double</i>, 'white-point'=&gt;<i>double</i>, channel=&gt;{Red, RGB, CMYK, Cyan, Green, Magenta, Blue, Yellow, Opacity, Black, or All}</td>
    <td valign="top">improve the contrast in an image by `stretching' the range of intensity values</td>
  </tr>

  <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">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>, gravity=&gt;{NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast}</td>
    <td valign="top">crop an image</td>
  </tr>

  <tr>
    <td valign="top">CycleColormap</td>
    <td valign="top">amount=&gt;<i>integer</i></td>
    <td valign="top">displace image colormap by amount</td>
  </tr>

  <tr>
    <td valign="top">Decipher</td>
    <td valign="top">passphrase=&gt;<i>string</i></td>
    <td valign="top">convert cipher pixels to plain pixels</td>
  </tr>

  <tr>
    <td valign="top">Deconstruct</td>
    <td valign="top"><br /></td>
    <td valign="top">break down an image sequence into constituent parts</td>
  </tr>

  <tr>
    <td valign="top">Deskew</td>
    <td valign="top">geometry=&gt;<i>string</i>,threshold=&gt;<i>double</i></td>
    <td valign="top">straighten the image</td>
  </tr>

  <tr>
    <td valign="top">Despeckle</td>
    <td valign="top">&nbsp;</td>
    <td valign="top">reduce the speckles within an image</td>
  </tr>

  <tr>
    <td valign="top">Difference</td>
    <td valign="top">image=&gt;<i>image-handle</i></td>
    <td valign="top">compute the difference metrics between two images </td>
  </tr>

  <tr>
    <td valign="top">Distort</td>
    <td valign="top">points=&gt;<i>array of float values</i>, method=&gt;{Affine, AffineProjection, Bilinear, Perspective, Resize, ScaleRotateTranslate}, virtual-pixel=&gt;{Background Black Constant Dither Edge Gray Mirror Random Tile Transparent White}, best-fit=&gt;{True, False}</td>
    <td valign="top">distort image</td>
  </tr>

  <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="color.html">color name</a></i>, fill=&gt;<i><a href="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="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>

  <tr>
    <td valign="top">Encipher</td>
    <td valign="top">passphrase=&gt;<i>string</i></td>
    <td valign="top">convert plain pixels to cipher pixels</td>
  </tr>

  <tr>
    <td valign="top">Edge</td>
    <td valign="top">radius=&gt;<i>double</i></td>
    <td valign="top">enhance edges within the image with a convolution filter of the given radius.</td>
  </tr>

  <tr>
    <td valign="top">Emboss</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, radius=&gt;<i>double</i>, sigma=&gt;<i>double</i></td>
    <td valign="top">emboss the image with a convolution filter of the given radius and standard deviation (sigma).</td>
  </tr>

  <tr>
    <td valign="top">Enhance</td>
    <td valign="top"><br /></td>
    <td valign="top">apply a digital filter to enhance a noisy image</td>
  </tr>

  <tr>
    <td valign="top">Equalize</td>
    <td valign="top">channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}<br /></td>
    <td valign="top">perform histogram equalization to the image</td>
  </tr>

  <tr>
    <td valign="top">Extent</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>, background=&gt;<i><a href="color.html">color name</a></i>, gravity=&gt;{NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast}</td>
    <td valign="top">set the image size</td>
  </tr>

  <tr>
    <td valign="top">Evaluate</td>
    <td valign="top">value=&gt;<i>double</i>, operator=&gt;<i>{Add, And, Divide, LeftShift, Max, Min, Multiply, Or, Rightshift, Subtract, Xor}</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow} </td>
    <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>
    <td valign="top">reflect the image scanlines in the vertical direction</td>
  </tr>

  <tr>
    <td valign="top">Flop</td>
    <td valign="top"><br /></td>
    <td valign="top">reflect the image scanlines in the horizontal direction</td>
  </tr>

  <tr>
    <td valign="top">FloodfillPaint</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}, x=&gt;<i>integer</i>, y=&gt;<i>integer</i> , fill=&gt;<i><a href="color.html">color name</a></i>, bordercolor=&gt;<i><a href="color.html">color name</a></i>, fuzz=&gt;<i>double</i>, invert=&gt;{True, False}</td>
    <td valign="top">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 valign="top">ForwardFourierTransform</td>
    <td valign="top">magnitude=&gt;{True, False}</td>
    <td valign="top">implements the forward discrete Fourier transform (DFT)</td>
  </tr>

  <tr>
    <td valign="top">Frame</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i>, inner=&gt;<i>integer</i>, outer=&gt;<i>integer</i>, fill=&gt;<i><a href="color.html">color name</a></i>,  compose=&gt;{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 valign="top">surround the image with an ornamental border</td>
  </tr>

  <tr>
    <td valign="top">Function</td>
    <td valign="top">parameters=&gt;<i>array of float values</i>, function=&gt;{Sin}, virtual-pixel=&gt;{Background Black Constant Dither Edge Gray Mirror Random Tile Transparent White}</td>
    <td valign="top">apply a function to the image</td>
  </tr>

  <tr>
    <td valign="top">Gamma</td>
    <td valign="top">gamma=&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">gamma correct the image</td>
  </tr>

  <tr>
    <td valign="top">GaussianBlur</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, radius=&gt;<i>double</i>, sigma=&gt;<i>double</i>, bias=&gt;<i>double</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
    <td valign="top">reduce image noise and reduce detail levels with a Gaussian operator of the given radius and standard deviation (sigma).</td>
  </tr>

  <tr>
    <td valign="top">GetPixel</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}, normalize=&gt;{true, false}, x=&gt;<i>integer</i>, y=&gt;<i>integer</i></td>
    <td valign="top">get a single pixel. By default normalized pixel values are returned.</td>
  </tr>

  <tr>
    <td valign="top">GetPixels</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>, map=&gt;<i>string</i>, normalize=&gt;{true, false}</td>
    <td valign="top">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 valign="top">HaldClut</td>
    <td valign="top">image=&gt;<i>image-handle</i>,  channel=&gt;{Red, RGB, CMYK, Cyan, Green, Magenta, Blue, Yellow, Opacity, Black, or All}</td>
    <td valign="top">apply a Hald color lookup table to an image sequence</td>
  </tr>

  <tr>
    <td valign="top">Identify</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>

  <tr>
    <td valign="top">Implode</td>
    <td valign="top">amount=&gt;<i>double</i>, interpolate=&gt;{undefined, average, bicubic, bilinear, mesh, nearest-neighbor, spline}</td>
    <td valign="top">implode image pixels about the center</td>
  </tr>

  <tr>
    <td valign="top">InverseDiscreteFourierTransform</td>
    <td valign="top">magnitude=&gt;{True, False}</td>
    <td valign="top">implements the inverse discrete Fourier transform (DFT)</td>
  </tr>

  <tr>
    <td valign="top">Label</td>
    <td valign="top">string</td>
    <td valign="top">assign a label to an image</td>
  </tr>

  <tr>
    <td valign="top">Layers</td>
    <td valign="top">method=&gt;{coalesce, compare-any, compare-clear, compare-over, composite, dispose, flatten, merge, mosaic, optimize, optimize-image, optimize-plus, optimize-trans, remove-dups, remove-zero},  compose=&gt;{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=&gt;{true, false}</td>
    <td valign="top">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 valign="top">Level</td>
    <td valign="top">levels=&gt;<i>string</i>, 'black-point'=&gt;<i>double</i>, 'gamma'=&gt;<i>double</i>, 'white-point'=&gt;<i>double</i>, channel=&gt;{Red, RGB, CMYK, Cyan, Green, Magenta, Blue, Yellow, Opacity, Black, or All}</td>
    <td valign="top">adjust the level of image contrast</td>
  </tr>

  <tr>
    <td valign="top">LevelColors</td>
    <td valign="top">invert=&gt;&gt;{True, False}, 'black-point'=&gt;<i>string</i>,  'white-point'=&gt;<i>string</i>, channel=&gt;{Red, RGB, CMYK, Cyan, Green, Magenta, Blue, Yellow, Opacity, Black, or All}</td>
    <td valign="top">level image with the given colors</td>
  </tr>

  <tr>
    <td valign="top">LinearStretch</td>
    <td valign="top">levels=&gt;<i>string</i>, 'black-point'=&gt;<i>double</i>, 'white-point'=&gt;<i>double</i></td>
    <td valign="top">linear with saturation stretch</td>
  </tr>

  <tr>
    <td valign="top">LiquidResize</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i>, delta-x=&gt;<i>double</i>, rigidity=&gt;<i>double</i></td>
    <td valign="top">rescale image with seam-carving.</td>
  </tr>

  <tr>
    <td valign="top">Magnify</td>
    <td valign="top"><br /></td>
    <td valign="top">double the size of an image</td>
  </tr>

  <tr>
    <td valign="top">Mask</td>
    <td valign="top">mask=&gt;<i>image-handle</i></td>
    <td valign="top">composite image pixels as defined by the mask</td>
  </tr>

  <tr>
    <td valign="top">MatteFloodfill</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, x=&gt;<i>integer</i>, y=&gt;<i>integer</i> , matte=&gt;<i>integer</i>, bordercolor=&gt;<i><a href="color.html">color name</a></i>, fuzz=&gt;<i>double</i>, invert=&gt;{True, False}</td>
    <td valign="top">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 valign="top">MedianFilter</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
    <td valign="top">replace each pixel with the median intensity pixel of a neighborhood.</td>
  </tr>

  <tr>
    <td valign="top">Minify</td>
    <td valign="top"><br /></td>
    <td valign="top">half the size of an image</td>
  </tr>

  <tr>
    <td valign="top">Mode</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
    <td valign="top">make each pixel the <em>predominant color</em> of the neighborhood.</td>
  </tr>

  <tr>
    <td valign="top">Modulate</td>
    <td valign="top">factor=&gt;<i>geometry</i>, brightness=&gt;<i>double</i>, saturation=&gt;<i>double</i>, hue=&gt;<i>double</i>, lightness=&gt;<i>double</i>, whiteness=&gt;<i>double</i>, blackness=&gt;<i>double</i> </td>
    <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>, bias=&gt;<i>double</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
    <td valign="top">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 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 each pixel with its complementary color (white becomes black, yellow becomes blue, etc.)</td>
  </tr>

  <tr>
    <td valign="top">Normalize</td>
    <td valign="top">channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}<br /></td>
    <td valign="top">transform image to span the full range of color values</td>
  </tr>

  <tr>
    <td valign="top">OilPaint</td>
    <td valign="top">radius=&gt;<i>integer</i></td>
    <td valign="top">simulate an oil painting</td>
  </tr>

  <tr>
    <td valign="top">Opaque</td>
    <td valign="top">color=&gt;<i><a href="color.html">color name</a></i>,
fill=&gt;<i><a href="color.html">color name</a></i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}, invert=&gt;{True, False}</td>
    <td valign="top">change this color to the fill color within the image</td>
  </tr>

  <tr>
    <td valign="top">OrderedDither</td>
    <td valign="top">threshold=&gt;{threshold, checks, o2x2, o3x3, o4x4, o8x8, h4x4a, h6x6a, h8x8a, h4x4o, h6x6o, h8x8o, h16x16o, hlines6x4}, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
    <td valign="top">order dither image</td>
  </tr>

  <tr>
    <td valign="top">Polaroid</td>
    <td valign="top">caption=&gt;<i>string</i>, angle=&gt;<i>double</i>, pointsize=&gt;<i>double</i>, font=&gt;<i>string</i>, stroke=&gt; <i><a href="color.html">color name</a></i>, strokewidth=&gt;<i>integer</i>, fill=&gt;<i><a href="color.html">color name</a></i>, gravity=&gt;{NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast},  background=&gt;<i><a href="color.html">color name</a></i></td>
    <td valign="top">simulate a Polaroid picture.</td>
  </tr>

  <tr>
    <td valign="top">Posterize</td>
    <td valign="top">levels=&gt;<i>integer</i>, dither=&gt;{True, False}</td>
    <td valign="top">reduce the image to a limited number of color level</td>
  </tr>

  <tr>
    <td valign="top">Profile</td>
    <td valign="top">name=&gt;<i>string</i>, profile=&gt;<i>blob</i>, rendering-intent=&gt;{Undefined, Saturation, Perceptual, Absolute, Relative}, black-point-compensation=&gt;{True, False}</td>
    <td valign="top">add or remove ICC or IPTC image profile; name is formal name (e.g. ICC or filename; set profile to <kbd>''</kbd> to remove profile</td>
  </tr>

  <tr>
    <td valign="top">Quantize</td>
    <td valign="top">colors=&gt;<i>integer</i>, colorspace=&gt;{RGB, Gray, Transparent, OHTA, XYZ, YCbCr, YIQ, YPbPr, YUV, CMYK, sRGB, HSL, HSB}, treedepth=&gt; <i>integer</i>, dither=&gt;{True, False}, dither-method=&gt;{Riemersma, Floyd-Steinberg}, measure_error=&gt;{True, False}, global_colormap=&gt;{True, False}, transparent-color=&gt;<i>color</i></td>
    <td valign="top">preferred number of colors in the image</td>
  </tr>

  <tr>
    <td valign="top">RadialBlur</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, angle=&gt;<i>double</i>, bias=&gt;<i>double</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
    <td valign="top">radial blur the image.</td>
  </tr>

  <tr>
    <td valign="top">Raise</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>, raise=&gt;{True, False}</td>
    <td valign="top">lighten or darken image edges to create a 3-D effect</td>
  </tr>

  <tr>
    <td valign="top">ReduceNoise</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
    <td valign="top">reduce noise in the image with a noise peak elimination filter</td>
  </tr>

  <tr>
    <td valign="top">Remap</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>

  <tr>
    <td valign="top">Resample</td>
    <td valign="top">density=&gt;<i>geometry</i>, x=&gt;<i>double</i>, y=&gt;<i>double</i>, filter=&gt;{Point, Box, Triangle, Hermite, Hanning, Hamming, Blackman, Gaussian, Quadratic, Cubic, Catrom, Mitchell, Lanczos, Bessel, Sinc}, support=&gt;<i>double</i></td>
    <td valign="top">resample image to desired resolution. Specify <kbd>blur</kbd> &gt; 1 for blurry or &lt; 1 for sharp</td>
  </tr>

  <tr>
    <td valign="top">Resize</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i>, filter=&gt;{Point, Box, Triangle, Hermite, Hanning, Hamming, Blackman, Gaussian, Quadratic, Cubic, Catrom, Mitchell, Lanczos, Bessel, Sinc}, support=&gt;<i>double</i>, blur=&gt;<i>double</i></td>
    <td valign="top">scale image to desired size. Specify <kbd>blur</kbd> &gt; 1 for blurry or &lt; 1 for sharp</td>
  </tr>

  <tr>
    <td valign="top">Roll</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, x=&gt;<i>integer</i>, y=&gt;<i>integer</i></td>
    <td valign="top">roll an image vertically or horizontally</td>
  </tr>

  <tr>
    <td valign="top">Rotate</td>
    <td valign="top">degrees=&gt;<i>double</i>, background=&gt;<i><a href="color.html">color name</a></i></td>
    <td valign="top">rotate an image</td>
  </tr>

  <tr>
    <td valign="top">Sample</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i></td>
    <td valign="top">scale image with pixel sampling.</td>
  </tr>

  <tr>
    <td valign="top">Scale</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i></td>
    <td valign="top">scale image to desired size</td>
  </tr>

  <tr>
    <td valign="top">Segment</td>
    <td valign="top">colorspace=&gt;{RGB, Gray, Transparent, OHTA, XYZ, YCbCr, YCC, YIQ, YPbPr, YUV, CMYK}, verbose={True, False}, cluster-threshold=&gt;<i>double</i>, smoothing-threshold=<i>double</i></td>
    <td valign="top">segment an image by analyzing the histograms of the color components and identifying units that are homogeneous</td>
  </tr>

  <tr>
    <td valign="top">SelectiveBlur</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, radius=&gt;<i>double</i>, sigma=&gt;<i>double</i>, threshold=&gt;<i>double</i>, bias=&gt;<i>double</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
    <td valign="top">selectively blur pixels within a contrast threshold.</td>
  </tr>
  <tr>
    <td valign="top">Separate</td>
    <td valign="top">channel=&gt;{Red, RGB, CMYK, Cyan, Green, Magenta, Blue, Yellow, Opacity, Black, or All}</td>
    <td valign="top">separate a channel from the image into a grayscale image</td>
  </tr>

  <tr>
    <td valign="top">Shade</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, azimuth=&gt;<i>double</i>, elevation=&gt;<i>double</i>, gray=&gt;{true, false}</td>
    <td valign="top">shade the image using a distant light source</td>
  </tr>

  <tr>
    <td valign="top">SetPixel</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}, color=&gt;<i>array of float values</i>, x=&gt;<i>integer</i>, y=&gt;<i>integer</i>, color=&gt;<i>array of float values</i></td>
    <td valign="top">set a single pixel.  By default normalized pixel values are expected.</td>
  </tr>

  <tr>
    <td valign="top">Shadow</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, opacity=&gt;<i>double</i>, sigma=&gt;<i>double</i>, x=&gt;<i>integer</i>, y=&gt;<i>integer</i></td>
    <td valign="top">simulate an image shadow</td>
  </tr>

  <tr>
    <td valign="top">Sharpen</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, radius=&gt;<i>double</i>, sigma=&gt;<i>double</i>, bias=&gt;<i>double</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}</td>
    <td valign="top">sharpen the image with a Gaussian operator of the given radius and standard deviation (sigma).</td>
  </tr>

  <tr>
    <td valign="top">Shave</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i></td>
    <td valign="top">shave pixels from the image edges</td>
  </tr>

  <tr>
    <td valign="top">Shear</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, x=&gt;<i>double</i>, y=&gt;<i>double</i> fill=&gt;<i><a href="color.html">color name</a></i></td>
    <td valign="top">shear the image along the X or Y axis by a positive or negative shear angle</td>
  </tr>

  <tr>
    <td valign="top">SigmoidalContrast</td>
    <td valign="top">geometry=&gt;<i>string</i>, 'contrast'=&gt;<i>double</i>, 'mid-point'=&gt;<i>double</i> channel=&gt;{Red, RGB, CMYK, Cyan, Green, Magenta, Blue, Yellow, Opacity, Black, or All}, sharpen=&gt;{True, False}</td>
    <td valign="top">sigmoidal non-lineraity contrast control.  Increase the contrast of the image using a sigmoidal transfer function without saturating highlights or shadows. <em class="option">Contrast</em> indicates how much to increase the contrast (0 is none; 3 is typical; 20 is a lot);  <em class="option">mid-point</em> indicates where midtones fall in the resultant image (0 is white; 50% is middle-gray; 100% is black). To decrease contrast, set sharpen to False.</td>
  </tr>

  <tr>
    <td valign="top">Signature</td>
    <td valign="top"><br /></td>
    <td valign="top">generate an SHA-256 message digest for the image pixel stream</td>
  </tr>

  <tr>
    <td valign="top">Sketch</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, radius=&gt;<i>double</i>, sigma=&gt;<i>double</i>, angle=&gt;<i>double</i></td>
    <td valign="top">sketch the image with a Gaussian operator of the given radius and standard deviation (sigma) at the given angle</td>
  </tr>

  <tr>
    <td valign="top">Solarize</td>
    <td valign="top">geometry=&gt;<i>string</i>,threshold=&gt;<i>double</i></td>
    <td valign="top">negate all pixels above the threshold level</td>
  </tr>

  <tr>
    <td valign="top">SparseColor</td>
    <td valign="top">points=&gt;<i>array of float values</i>, method=&gt;{Barycentric, Bilinear, Shepards, Voronoi}, virtual-pixel=&gt;{Background Black Constant Dither Edge Gray Mirror Random Tile Transparent White}</td>
    <td valign="top">interpolate the image colors around the supplied points</td>
  </tr>

  <tr>
    <td valign="top">Splice</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>, background=&gt;<i><a href="color.html">color name</a></i>, gravity=&gt;{NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast}</td>
    <td valign="top">splice an image</td>
  </tr>

  <tr>
    <td valign="top">Spread</td>
    <td valign="top">radius=&gt;<i>double</i>, interpolate=&gt;{undefined, average, bicubic, bilinear, mesh, nearest-neighbor, spline}</td>
    <td valign="top">displace image pixels by a random amount</td>
  </tr>

  <tr>
    <td valign="top">Statistic</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i>, channel=&gt;{All, Default, Alpha, Black, Blue, CMYK, Cyan, Gray, Green, Index, Magenta, Opacity, Red, RGB, Yellow}, type=&gt;{Median, Mode, Mean, Maximum, Minimum, ReduceNoise}</td>
    <td valign="top">replace each pixel with corresponding statistic from the neighborhood.</td>
  </tr>
  <tr>
    <td valign="top">Stegano</td>
    <td valign="top">image=&gt;<i>image-handle</i>, offset=&gt;<i>integer</i></td>
    <td valign="top">hide a digital watermark within the image</td>
  </tr>

  <tr>
    <td valign="top">Stereo</td>
    <td valign="top">image=&gt;<i>image-handle</i>, x=&gt;<i>integer</i>, y=&gt;<i>integer</i></td>
    <td valign="top">composites two images and produces a single image that is the composite of a left and right image of a stereo pair</td>
  </tr>

  <tr>
    <td valign="top">Strip</td>
    <td valign="top"><br /></td>
    <td valign="top">strip an image of all profiles and comments.</td>
  </tr>

  <tr>
    <td valign="top">Swirl</td>
    <td valign="top">degrees=&gt;<i>double</i>, interpolate=&gt;{undefined, average, bicubic, bilinear, mesh, nearest-neighbor, spline}</td>
    <td valign="top">swirl image pixels about the center</td>
  </tr>

  <tr>
    <td valign="top">Texture</td>
    <td valign="top">texture=&gt;<i>image-handle</i></td>
    <td valign="top">name of texture to tile onto the image background</td>
  </tr>

  <tr>
    <td valign="top">Thumbnail</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, width=&gt;<i>integer</i>, height=&gt;<i>integer</i></td>
    <td valign="top">changes the size of an image to the given dimensions and removes any associated profiles.</td>
  </tr>

  <tr>
    <td valign="top">Threshold</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">threshold the image</td>
  </tr>

  <tr>
    <td valign="top">Tint</td>
    <td valign="top">fill=&gt;<i><a href="color.html">color name</a></i>, blend=&gt;<i>string</i></td>
    <td valign="top">tint the image with the fill color.</td>
  </tr>

  <tr>
    <td valign="top">Transparent</td>
    <td valign="top">color=&gt;<i><a href="color.html">color name</a></i>, invert=&gt;{True, False}</td>
    <td valign="top">make this color transparent within the image</td>
  </tr>

  <tr>
    <td valign="top">Transpose</td>
    <td valign="top"><br /></td>
    <td valign="top">flip image in the vertical direction and rotate 90 degrees</td>
  </tr>

  <tr>
    <td valign="top">Transverse</td>
    <td valign="top"><br /></td>
    <td valign="top">flop image in the horizontal direction and rotate 270 degrees</td>
  </tr>

  <tr>
    <td valign="top">Trim</td>
    <td valign="top"><br /></td>
    <td valign="top">remove edges that are the background color from the image</td>
  </tr>

  <tr>
    <td valign="top">UnsharpMask</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, radius=&gt;<i>double</i>, sigma=&gt;<i>double</i>, amount=&gt;<i>double</i>, threshold=&gt;<i>double</i></td>
    <td valign="top">sharpen the image with the unsharp mask algorithm.</td>
  </tr>

  <tr>
    <td valign="top">Vignette</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, radius=&gt;<i>double</i>, sigma=&gt;<i>double</i>, x=&gt;<i>integer</i>, y=&gt;<i>integer</i>, background=&gt;<i><a href="color.html">color name</a></i></td>
    <td valign="top">offset the edges of the image in vignette style</td>
  </tr>

  <tr>
    <td valign="top">Wave</td>
    <td valign="top">geometry=&gt;<i>geometry</i>, amplitude=&gt;<i>double</i>, wavelength=&gt;<i>double</i>, interpolate=&gt;{undefined, average, bicubic, bilinear, mesh, nearest-neighbor, spline}</td>
    <td valign="top">alter an image along a sine wave</td>
  </tr>

  <tr>
    <td valign="top">WhiteThreshold</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>
</table>

<p>Note, that the <kbd>geometry</kbd> parameter is a short cut for the <kbd>width</kbd> and <kbd>height</kbd> parameters (e.g.  <kbd>geometry=&gt;'106x80'</kbd> is equivalent to <kbd>width=&gt;106, height=&gt;80</kbd> ).</p>

<p>You can specify <kbd>@filename</kbd> in both Annotate() and Draw(). This reads the text or graphic primitive instructions from a file on disk. For example,</p>

<pre class="code">
   $image-&gt;Draw(fill=&gt;'red', primitive=&gt;'rectangle',
     points=&gt;'20,20 100,100  40,40 200,200  60,60 300,300');
</pre>

<p>Is equivalent to</p>

<pre class="code">
   $image-&gt;Draw(fill=&gt;'red', primitive=&gt;'@draw.txt');
</pre>

<p>Where <kbd>draw.txt</kbd> is a file on disk that contains this:</p>

<pre class="text">
  rectangle 20, 20 100, 100
  rectangle 40, 40 200, 200
  rectangle 60, 60 300, 300
</pre>

<p>The <i>text</i> parameter for methods, Annotate(), Comment(), Draw(), and Label() can include the image filename, type, width, height, or other image attribute by embedding these special format characters:</p>

<pre class="text">
   %b   file size
   %c   comment
   %d   directory
   %e   filename extension
   %f   filename
   %g   page geometry
   %h   height
   %i   input filename
   %k   number of unique colors
   %l   label
   %m   magick
   %n   number of scenes
   %o   output filename
   %p   page number
   %q   quantum depth
   %r   image class and colorspace
   %s   scene number
   %t   top of filename
   %u   unique temporary filename
   %w   width
   %x   x resolution
   %y   y resolution
   %z   image depth
   %C   image compression type
   %D   image dispose method
   %H   page height
   %Q   image compression quality
   %T   image delay
   %W   page width
   %X   page x offset
   %Y   page y offset
   %@   bounding box
   %#   signature
   %%   a percent sign
   \n   newline
   \r   carriage return
</pre>

<p>For example,</p>

<pre class="code">
  text=&gt;"%m:%f %wx%h"
</pre>

<p>produces an annotation of <b>MIFF:bird.miff 512x480</b> for an image titled <b>bird.miff</b> and whose width is 512 and height is 480.</p>

<p>You can optionally add <i>Image</i> to any method name. For example, TrimImage() is an alias for method Trim().</p>

<p>Most of the attributes listed above have an analog in <a href="convert.html">convert</a>. See the documentation for a more detailed description of these attributes.</p>

</div>

<h2><a id="set-attribute"></a>Set an Image Attribute</h2>
<div class="doc-section">

<p>Use method Set() to set an image attribute. For example,</p>

<pre class="code">
  $image-&gt;Set(dither=&gt;'True');
  $image-&gt;[$x]-&gt;Set(delay=&gt;3);
</pre>

<p>Where this example uses 'True' and this document says '{True, False}',
you can use the case-insensitive strings 'True' and 'False', or you
can use the integers 1 and 0.</p>

<p>When you call Get() on a Boolean attribute, Image::Magick returns 1 or 0, not a string.</p>

<p>And here is a list of all the image attributes you can set:</p>

<table class="doc">
  <caption>Image Attributes</caption>
  <tbody>
  <tr>
    <th>Attribute</th>
    <th style="width: 40%">Values</th>
    <th style="width: 40%">Description</th>
  </tr>

  <tr>
    <td valign="top">adjoin</td>
    <td valign="top">{True, False}</td>
    <td valign="top">join images into a single multi-image file</td>
  </tr>

  <tr>
    <td valign="top">alpha</td>
    <td valign="top">{On, Off, Opaque, Transparent, Copy, Extract, Set}</td>
    <td valign="top">control of and special operations involving the alpha/matte channel</td>
  </tr>

  <tr>
    <td valign="top">antialias</td>
    <td valign="top">{True, False}</td>
    <td valign="top">remove pixel aliasing</td>
  </tr>

  <tr>
    <td valign="top">area-limit</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">set pixel area resource limit.</td>
  </tr>

  <tr>
    <td valign="top">attenuate</td>
    <td valign="top"><i>double</i></td>
    <td valign="top">lessen (or intensify) when adding noise to an image.</td>
  </tr>

  <tr>
    <td valign="top">authenticate</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">decrypt image with this password.</td>
  </tr>

  <tr>
    <td valign="top">background</td>
    <td valign="top"><i><a href="color.html">color name</a></i></td>
    <td valign="top">image background color</td>
  </tr>

  <tr>
    <td valign="top">blue-primary</td>
    <td valign="top"><i>x-value</i>, <i>y-value</i></td>
    <td valign="top">chromaticity blue primary point (e.g. 0.15, 0.06)</td>
  </tr>

  <tr>
    <td valign="top">bordercolor</td>
    <td valign="top"><i><a href="color.html">color name</a></i></td>
    <td valign="top">set the image border color</td>
  </tr>

  <tr>
    <td valign="top">clip-mask</td>
    <td valign="top"><i>image</i></td>
    <td valign="top">associate a clip mask with the image.</td>
  </tr>

  <tr>
    <td valign="top">colormap[<i>i</i>]</td>
    <td valign="top"><i><a href="color.html">color name</a></i></td>
    <td valign="top">color name (e.g. red) or hex value (e.g. #ccc) at position
<i>i</i></td>
  </tr>

  <tr>
    <td valign="top">comment</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">set the image comment</td>
  </tr>

  <tr>
    <td valign="top">compression</td>
    <td valign="top">{None, BZip, Fax, Group4, JPEG, JPEG2000, LosslessJPEG, LZW, RLE, Zip}</td>
    <td valign="top">type of image compression</td>
  </tr>

  <tr>
    <td valign="top">debug</td>
    <td valign="top">{All, Annotate, Blob, Cache, Coder, Configure, Deprecate, Draw, Exception, Locale, None, Resource, Transform, X11}</td>
    <td valign="top">display copious debugging information</td>
  </tr>

  <tr>
    <td valign="top">delay</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">this many 1/100ths of a second must expire before displaying the next image in a sequence</td>
  </tr>

  <tr>
    <td valign="top">density</td>
    <td valign="top"><i>geometry</i></td>
    <td valign="top">vertical and horizontal resolution in pixels of the image</td>
  </tr>

  <tr>
    <td valign="top">depth</td>
    <td valign="top"><i>integer</i></td>
    <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>
    <td valign="top">set disk resource limit</td>
  </tr>

  <tr>
    <td valign="top">dispose</td>
    <td valign="top"><i>{Undefined, None, Background, Previous}</i></td>
    <td valign="top">layer disposal method</td>
  </tr>

  <tr>
    <td valign="top">dither</td>
    <td valign="top">{True, False}</td>
    <td valign="top">apply error diffusion to the image</td>
  </tr>

  <tr>
    <td valign="top">display</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">specifies the X server to contact</td>
  </tr>

  <tr>
    <td valign="top">extract</td>
    <td valign="top"><i>geometry</i></td>
    <td valign="top">extract area from image</td>
  </tr>

  <tr>
    <td valign="top">file</td>
    <td valign="top"><i>filehandle</i></td>
    <td valign="top">set the image filehandle</td>
  </tr>

  <tr>
    <td valign="top">filename</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">set the image filename</td>
  </tr>

  <tr>
    <td valign="top">fill</td>
    <td valign="top"><i>color</i></td>
    <td valign="top">The fill color paints any areas inside the outline of drawn shape.</td>
  </tr>

  <tr>
    <td valign="top">font</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">use this font when annotating the image with text</td>
  </tr>

  <tr>
    <td valign="top">fuzz</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">colors within this distance are considered equal</td>
  </tr>

  <tr>
    <td valign="top">gamma</td>
    <td valign="top"><i>double</i></td>
    <td valign="top">gamma level of the image</td>
  </tr>

  <tr>
    <td valign="top">Gravity</td>
    <td valign="top">{Forget, NorthWest, North, NorthEast, West, Center, East, SouthWest, South, SouthEast}</td>
    <td valign="top">type of image gravity</td>
  </tr>

  <tr>
    <td valign="top">green-primary</td>
    <td valign="top"><i>x-value</i>, <i>y-value</i></td>
    <td valign="top">chromaticity green primary point (e.g. 0.3, 0.6)</td>
  </tr>

  <tr>
    <td valign="top">index[<i>x</i>, <i>y</i>]</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">colormap index at position (<i>x</i>, <i>y</i>)</td>
  </tr>

  <tr>
    <td valign="top">interlace</td>
    <td valign="top">{None, Line, Plane, Partition, JPEG, GIF, PNG}</td>
    <td valign="top">the type of interlacing scheme</td>
  </tr>

  <tr>
    <td valign="top">iterations</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">add Netscape loop extension to your GIF animation</td>
  </tr>

  <tr>
    <td valign="top">label</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">set the image label</td>
  </tr>

  <tr>
    <td valign="top">loop</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">add Netscape loop extension to your GIF animation</td>
  </tr>

  <tr>
    <td valign="top">magick</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">set the image format</td>
  </tr>

  <tr>
    <td valign="top">map-limit</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">set map resource limit</td>
  </tr>

  <tr>
    <td valign="top">mask</td>
    <td valign="top"><i>image</i></td>
    <td valign="top">associate a mask with the image.</td>
  </tr>

  <tr>
    <td valign="top">matte</td>
    <td valign="top">{True, False}</td>
    <td valign="top">enable the image matte channel</td>
  </tr>

  <tr>
    <td valign="top">mattecolor</td>
    <td valign="top"><i><a href="color.html">color name</a></i></td>
    <td valign="top">set the image matte color</td>
  </tr>

  <tr>
    <td valign="top">memory-limit</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">set memory resource limit</td>
  </tr>

  <tr>
    <td valign="top">monochrome</td>
    <td valign="top">{True, False}</td>
    <td valign="top">transform the image to black and white</td>
  </tr>

  <tr>
    <td valign="top">option</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">associate an option with an image format (e.g.  option=&gt;'ps:imagemask'</td>
  </tr>

  <tr>
    <td valign="top">orientation</td>
    <td valign="top">{top-left, top-right, bottom-right, bottom-left, left-top, right-top, right-bottom, left-bottom}</td>
    <td valign="top">image orientation</td>
  </tr>

  <tr>
    <td valign="top">page</td>
    <td valign="top">{ Letter, Tabloid, Ledger, Legal, Statement, Executive, A3, A4, A5, B4, B5, Folio, Quarto, 10x14} or <i>geometry</i></td>
    <td valign="top">preferred size and location of an image canvas</td>
  </tr>

  <tr>
    <td valign="top">pixel[<i>x</i>, <i>y</i>]</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">hex value (e.g. #ccc) at position (<i>x</i>, <i>y</i>)</td>
  </tr>

  <tr>
    <td valign="top">pointsize</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">pointsize of the Postscript or TrueType font</td>
  </tr>

  <tr>
    <td valign="top">quality</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">JPEG/MIFF/PNG compression level</td>
  </tr>

  <tr>
    <td valign="top">red-primary</td>
    <td valign="top"><i>x-value</i>, <i>y-value</i></td>
    <td valign="top">chromaticity red primary point (e.g. 0.64, 0.33)</td>
  </tr>

  <tr>
    <td valign="top">sampling-factor</td>
    <td valign="top"><i>geometry</i></td>
    <td valign="top">horizontal and vertical sampling factor</td>
  </tr>

  <tr>
    <td valign="top">scene</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">image scene number</td>
  </tr>

  <tr>
    <td valign="top">server</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">specifies the X server to contact</td>
  </tr>

  <tr>
    <td valign="top">size</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">width and height of a raw image</td>
  </tr>

  <tr>
    <td valign="top">stroke</td>
    <td valign="top"><i>color</i></td>
    <td valign="top">The stroke color paints along the outline of a shape.</td>
  </tr>

  <tr>
    <td valign="top">texture</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">name of texture to tile onto the image background</td>
  </tr>

  <tr>
    <td valign="top">tile-offset</td>
    <td valign="top"><i>geometry</i></td>
    <td valign="top">image tile offset</td>
  </tr>

  <tr>
    <td valign="top">time-limit</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">set time resource limit in seconds</td>
  </tr>

  <tr>
    <td valign="top">type</td>
    <td valign="top">{Bilevel, Grayscale, GrayscaleMatte, Palette, PaletteMatte, TrueColor, TrueColorMatte, ColorSeparation, ColorSeparationMatte}</td>
    <td valign="top">image type</td>
  </tr>

  <tr>
    <td valign="top">units</td>
    <td valign="top">{ Undefined, PixelsPerInch, PixelsPerCentimeter}</td>
    <td valign="top">units of image resolution</td>
  </tr>

  <tr>
    <td valign="top">verbose</td>
    <td valign="top">{True, False}</td>
    <td valign="top">print detailed information about the image</td>
  </tr>

  <tr>
    <td valign="top">virtual-pixel</td>
    <td valign="top">{Background Black Constant Dither Edge Gray Mirror Random Tile Transparent White}</td>
    <td valign="top">the virtual pixel method</td>
  </tr>

  <tr>
    <td valign="top">white-point</td>
    <td valign="top"><i>x-value</i>, <i>y-value</i></td>
    <td valign="top">chromaticity white point (e.g. 0.3127, 0.329)</td>
  </tr>
  </tbody>
</table>

<p>Note, that the <kbd>geometry</kbd> parameter is a short cut for the <kbd>width</kbd> and <kbd>height</kbd> parameters (e.g.  <kbd>geometry=&gt;'106x80'</kbd> is equivalent to <kbd>width=&gt;106, height=&gt;80</kbd>).</p>

<p>SetAttribute() is an alias for method Set().</p>

<p>Most of the attributes listed above have an analog in
<a href="convert.html">convert</a>. See the documentation for a more detailed description of these attributes.</p>

</div>

<h2><a id="get-attribute"></a>Get an Image Attribute</h2>
<div class="doc-section">

<p>Use method Get() to get an image attribute. For example,</p>

<pre class="code">
  ($a, $b, $c) = $image-&gt;Get('colorspace', 'magick', 'adjoin');
  $width = $image-&gt;[3]-&gt;Get('columns');
</pre>

<p>In addition to all the attributes listed in <a href="perl-magick.html#set-attribute">Set an Image Attribute</a> , you can get these additional attributes:</p>

<table class="doc">
  <caption>Image Attributes</caption>
  <tbody>
  <tr>
    <th>Attribute</th>
    <th>Values</th>
    <th style="width: 60%">Description</th>
  </tr>

  <tr>
    <td valign="top">area</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">current area resource consumed</td>
  </tr>

  <tr>
    <td valign="top">base-columns</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">base image width (before transformations)</td>
  </tr>

  <tr>
    <td valign="top">base-filename</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">base image filename (before transformations)</td>
  </tr>

  <tr>
    <td valign="top">base-rows</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">base image height (before transformations)</td>
  </tr>

  <tr>
    <td valign="top">class</td>
    <td valign="top">{Direct, Pseudo}</td>
    <td valign="top">image class</td>
  </tr>

  <tr>
    <td valign="top">colors</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">number of unique colors in the image</td>
  </tr>

  <tr>
    <td valign="top">columns</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">image width</td>
  </tr>

  <tr>
    <td valign="top">copyright</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">get PerlMagick's copyright</td>
  </tr>

  <tr>
    <td valign="top">directory</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">tile names from within an image montage</td>
  </tr>

  <tr>
    <td valign="top">elapsed-time</td>
    <td valign="top"><i>double</i></td>
    <td valign="top">elapsed time in seconds since the image was created</td>
  </tr>

  <tr>
    <td valign="top">error</td>
    <td valign="top"><i>double</i></td>
    <td valign="top">the mean error per pixel computed with methods Compare() or Quantize()</td>
  </tr>

  <tr>
    <td valign="top">bounding-box</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">image bounding box</td>
  </tr>

  <tr>
    <td valign="top">disk</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">current disk resource consumed</td>
  </tr>

  <tr>
    <td valign="top">filesize</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">number of bytes of the image on disk</td>
  </tr>

  <tr>
    <td valign="top">format</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">get the descriptive image format</td>
  </tr>

  <tr>
    <td valign="top">geometry</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">image geometry</td>
  </tr>

  <tr>
    <td valign="top">height</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">the number of rows or height of an image</td>
  </tr>

  <tr>
    <td valign="top">id</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">ImageMagick registry id</td>
  </tr>

  <tr>
    <td valign="top">mean-error</td>
    <td valign="top"><i>double</i></td>
    <td valign="top">the normalized mean error per pixel computed with methods Compare() or Quantize()</td>
  </tr>

  <tr>
    <td valign="top">map</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">current memory-mapped resource consumed</td>
  </tr>

  <tr>
    <td valign="top">matte</td>
    <td valign="top">{True, False}</td>
    <td valign="top">whether or not the image has a matte channel</td>
  </tr>

  <tr>
    <td valign="top">maximum-error</td>
    <td valign="top"><i>double</i></td>
    <td valign="top">the normalized max error per pixel computed with methods Compare() or Quantize()</td>
  </tr>

  <tr>
    <td valign="top">memory</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">current memory resource consumed</td>
  </tr>

  <tr>
    <td valign="top">mime</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">MIME of the image format</td>
  </tr>

  <tr>
    <td valign="top">montage</td>
    <td valign="top"><i>geometry</i></td>
    <td valign="top">tile size and offset within an image montage</td>
  </tr>

  <tr>
    <td valign="top">page.x</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">x offset of image virtual canvas</td>
  </tr>

  <tr>
    <td valign="top">page.y</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">y offset of image virtual canvas</td>
  </tr>

  <tr>
    <td valign="top">rows</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">the number of rows or height of an image</td>
  </tr>

  <tr>
    <td valign="top">signature</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">SHA-256 message digest associated with the image pixel stream</td>
  </tr>

  <tr>
    <td valign="top">taint</td>
    <td valign="top">{True, False}</td>
    <td valign="top">True if the image has been modified</td>
  </tr>

  <tr>
    <td valign="top">total-ink-density</td>
    <td valign="top"><i>double</i></td>
    <td valign="top">returns the total ink density for a CMYK image</td>
  </tr>

  <tr>
    <td valign="top">transparent-color</td>
    <td valign="top"><i><a href="color.html">color name</a></i></td>
    <td valign="top">set the image transparent color</td>
  </tr>

  <tr>
    <td valign="top">user-time</td>
    <td valign="top"><i>double</i></td>
    <td valign="top">user time in seconds since the image was created</td>
  </tr>

  <tr>
    <td valign="top">version</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">get PerlMagick's version</td>
  </tr>

  <tr>
    <td valign="top">width</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">the number of columns or width of an image</td>
  </tr>

  <tr>
    <td valign="top">x-resolution</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">x resolution of the image</td>
  </tr>

  <tr>
    <td valign="top">y-resolution</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">y resolution of the image</td>
  </tr>
  </tbody>
</table>

<p>GetAttribute() is an alias for method Get().</p>

<p>Most of the attributes listed above have an analog in
<a href="convert.html">convert</a>. See the documentation for a more detailed description of these attributes.</p>

</div>

<h2><a id="compare"></a>Compare an Image to its Reconstruction</h2>
<div class="doc-section">
</div>

<p>Mathematically and visually annotate the difference between an image and its reconstruction with the Compare() method.  The method supports these parameters:</p>

<table class="doc">
  <caption>Compare Parameters</caption>
  <tbody>
  <tr>
    <th>Parameter</th>
    <th style="width: 40%">Values</th>
    <th style="width: 40%">Description</th>
  </tr>

  <tr>
    <td valign="top">channel</td>
    <td valign="top"><i>double</i></td>
    <td valign="top">select image channels, the default is all channels except alpha.</td>
  </tr>

  <tr>
    <td valign="top">fuzz</td>
    <td valign="top"><i>double</i></td>
    <td valign="top">colors within this distance are considered equal</td>
  </tr>

  <tr>
    <td valign="top">image</td>
    <td valign="top"><i>image-reference</i></td>
    <td valign="top">the image reconstruction</td>
  </tr>

  <tr>
    <td valign="top">metric</td>
    <td valign="top">AE, MAE, MEPP, MSE, PAE, PSNR, RMSE</td>
    <td valign="top">measure differences between images with this metric</td>
  </tr>
  </tbody>
</table>

<p>In this example, we compare the ImageMagick logo to a sharpened reconstruction:</p>

<pre class="code">
  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();
</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>

<h2><a id="montage"></a>Create an Image Montage</h2>
<div class="doc-section">

<p>Use method Montage() to create a composite image by combining several separate images. The images are tiled on the composite image with the name of the image optionally appearing just below the individual tile. For example,</p>

<pre class="code">
  $image-&gt;Montage(geometry=&gt;'160x160', tile=&gt;'2x2', texture=&gt;'granite:');
</pre>

<p>And here is a list of Montage() parameters you can set:</p>

<table class="doc">
  <caption>Montage Parameters</caption>
  <tbody>
  <tr>
    <th>Parameter</th>
    <th style="width: 40%">Values</th>
    <th style="width: 40%">Description</th>
  </tr>

  <tr>
    <td valign="top">background</td>
    <td valign="top"><i><a href="color.html">color name</a></i></td>
    <td valign="top">background color name</td>
  </tr>

  <tr>
    <td valign="top">border</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">image border width</td>
  </tr>

  <tr>
    <td valign="top">filename</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">name of montage image</td>
  </tr>

  <tr>
    <td valign="top">fill</td>
    <td valign="top"><a href="color.html">color name</a></td>
    <td valign="top">fill color for annotations</td>
  </tr>

  <tr>
    <td valign="top">font</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">X11 font name</td>
  </tr>

  <tr>
    <td valign="top">frame</td>
    <td valign="top"><i>geometry</i></td>
    <td valign="top">surround the image with an ornamental border</td>
  </tr>

  <tr>
    <td valign="top">geometry</td>
    <td valign="top"><i>geometry</i></td>
    <td valign="top">preferred tile and border size of each tile of the composite
image (e.g. 120x120+4+3>)</td>
  </tr>

  <tr>
    <td valign="top">gravity</td>
    <td valign="top">NorthWest, North, NorthEast, West, Center, East, SouthWest,
South, SouthEast</td>
    <td valign="top">direction image gravitates to within a tile</td>
  </tr>

  <tr>
    <td valign="top">label</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">assign a label to an image</td>
  </tr>

  <tr>
    <td valign="top">mode</td>
    <td valign="top">Frame, Unframe, Concatenate</td>
    <td valign="top">thumbnail framing options</td>
  </tr>

  <tr>
    <td valign="top">pointsize</td>
    <td valign="top"><i>integer</i></td>
    <td valign="top">pointsize of the Postscript or TrueType font</td>
  </tr>

  <tr>
    <td valign="top">shadow</td>
    <td valign="top">{True, False}</td>
    <td valign="top">add a shadow beneath a tile to simulate depth</td>
  </tr>

  <tr>
    <td valign="top">stroke</td>
    <td valign="top"><a href="color.html">color name</a></td>
    <td valign="top">stroke color for annotations</td>
  </tr>

  <tr>
    <td valign="top">texture</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">name of texture to tile onto the image background</td>
  </tr>

  <tr>
    <td valign="top">tile</td>
    <td valign="top"><i>geometry</i></td>
    <td valign="top">the number of tiles per row and page (e.g. 6x4)</td>
  </tr>

  <tr>
    <td valign="top">title</td>
    <td valign="top">string</td>
    <td valign="top">assign a title to the image montage</td>
  </tr>

  <tr>
    <td valign="top">transparent</td>
    <td valign="top"><i>string</i></td>
    <td valign="top">make this color transparent within the image</td>
  </tr>
  </tbody>
</table>

<p>Note, that the <kbd>geometry</kbd> parameter is a short cut for the <kbd>width</kbd> and <kbd>height</kbd> parameters (e.g.  <kbd>geometry=&gt;'106x80'</kbd> is equivalent to <kbd>width=&gt;106, height=&gt;80</kbd>).</p>

<p>MontageImage() is an alias for method Montage().</p>

<p>Most of the attributes listed above have an analog in <a href="montage.html">montage</a>. See the documentation for a more detailed description of these attributes.</p>

</div>

<h2><a id="blobs"></a>Working with Blobs</h2>
<div class="doc-section">

<p>A blob contains data that directly represent a particular image
format in memory instead of on disk. PerlMagick supports
blobs in any of these image <a href="formats.html">formats</a> and provides methods to convert a blob to or from a particular image format.</p>

<table class="doc">
  <caption>Blob Methods</caption>
  <tbody>
  <tr>
    <th>Method</th>
    <th>Parameters</th>
    <th>Return Value</th>
    <th>Description</th>
  </tr>

  <tr>
    <td valign="top">ImageToBlob</td>
    <td valign="top">any image <a href="perl-magick.html#set-attribute">attribute</a></td>
    <td valign="top">an array of image data in the respective image format</td>
    <td valign="top">convert an image or image sequence to an array of blobs</td>
  </tr>

  <tr>
    <td valign="top">BlobToImage</td>
    <td valign="top">one or more blobs</td>
    <td valign="top">the number of blobs converted to an image</td>
    <td valign="top">convert one or more blobs to an image</td>
  </tr>
  </tbody>
</table>

<p>ImageToBlob() returns the image data in their respective formats. You can then print it, save it to an ODBC database, write it to a file, or pipe it to a display program:</p>

<pre class="code">
  @blobs = $image-&gt;ImageToBlob();
  open(DISPLAY,"| display -") || die;
  binmode DISPLAY;
  print DISPLAY $blobs[0];
  close DISPLAY;
</pre>

<p>Method BlobToImage() returns an image or image sequence converted from the supplied blob:</p>

<pre class="code">
  @blob=$db-&gt;GetImage();
  $image=Image::Magick-&gt;new(magick=&gt;'jpg');
  $image-&gt;BlobToImage(@blob);
</pre>

</div>

<h2><a id="direct-access"></a>Direct-access to Image Pixels</h2>
<div class="doc-section">

<p>Use these methods to obtain direct access to the image pixels:</p>

<table class="doc">
<caption>Direct-access to Image Pixels</caption>
<tbody>
  <tr>
    <th>Method</th>
    <th>Parameters</th>
    <th style="width: 50%">Description</th>
  </tr>

  <tr>
    <td valign="top">GetAuthenticPixels</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></td>
    <td valign="top">return image pixels as a C pointer</td>
  </tr>

  <tr>
    <td valign="top">GetVirtualPixels</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></td>
    <td valign="top">return image pixels as a const C pointer</td>
  </tr>

  <tr>
    <td valign="top">GetAuthenticIndexQueue</td>
    <td valign="top"></td>
    <td valign="top">return image indexes as a C pointer</td>
  </tr>

  <tr>
    <td valign="top">GetVirtualIndexQueue</td>
    <td valign="top"></td>
    <td valign="top">return image indexes as a const C pointer</td>
  </tr>

  <tr>
    <td valign="top">SyncAuthenticPixels</td>
    <td valign="top"></td>
    <td valign="top">sync image pixels to pixel cache</td>
  </tr>

</tbody>
</table>

</div>

<h2><a id="miscellaneous"></a>Miscellaneous Methods</h2>
<div class="doc-section">

<p>The Append() method append a set of images. For example,</p>

<pre class="code">
  $p = $image-&gt;Append(stack=&gt;{true,false});
</pre>

<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 Clone() method copies a set of images. For example,</p>

<pre class="code">
  $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 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>

<pre class="code">
  $p = $images-&gt;Transform(crop=>'100x100+10+60');
</pre>

<p>The Flatten() method flattens a set of images and returns it. For example,</p>

<pre class="code">
  $p = $images-&gt;Flatten(background=&gt;'none');
  $p-&gt;Write('flatten.png');
</pre>

<p>The sequence of images is replaced by a single image created by composing each image after the first over the first image.</p>

<p>The Fx() method applies a mathematical expression to a set of images and returns the results. For example,</p>

<pre class="code">
  $p = $image-&gt;Fx(expression=&gt;'(g+b)/2.0',channel=&gt;'red');
  $p-&gt;Write('fx.miff');
</pre>

<p>replaces the red channel with the average of the green and blue channels.</p>

<p>See <a href="fx.html">FX, The Special Effects Image Operator</a> for a detailed discussion of this method.</p>

<p>Histogram() returns the unique colors in the image and a count for each one. The returned values are an array of red, green, blue, opacity, and count values.</p>

<p>The Morph() method morphs a set of images. Both the image pixels and size are linearly interpolated to give the appearance of a meta-morphosis from one image to the next:</p>

<pre class="code">
  $p = $image-&gt;Morph(frames=&gt;<i>integer</i>);
</pre>

<p>where <i>frames</i> is the number of in-between images to generate.  The default is 1.</p>

<p>Mosaic() creates an mosaic from an image sequence.</p>

<p>Method Mogrify() is a single entry point for the image manipulation methods (<a href="perl-magick.html#manipulate">Manipulate an Image</a>). The parameters are the name of a method followed by any parameters the method may require. For example, these calls are equivalent:</p>

<pre class="code">
  $image-&gt;Crop('340x256+0+0');
  $image-&gt;Mogrify('crop', '340x256+0+0');
</pre>

<p>Method MogrifyRegion() applies a transform to a region of the image. It is similar to Mogrify() but begins with the region geometry. For example, suppose you want to brighten a 100x100 region of your image at location (40, 50):</p>

<pre class="code">
  $image-&gt;MogrifyRegion('100x100+40+50', 'modulate', brightness=&gt;50);
</pre>

<p>Ping() is a convenience method that returns information about an image without having to read the image into memory. It returns the width, height, file size in bytes, and the file format of the image. You can specify more than one filename but only one filehandle:</p>

<pre class="code">
  ($width, $height, $size, $format) = $image-&gt;Ping('logo.png');
  ($width, $height, $size, $format) = $image-&gt;Ping(file=&gt;\*IMAGE);
  ($width, $height, $size, $format) = $image-&gt;Ping(blob=&gt;$blob);
</pre>

<p>This a more efficient and less memory intensive way to query if an image exists and what its characteristics are.  <kbd>PreviewImage()</kbd> tiles 9 thumbnails of the specified image with an image processing operation applied at varying strengths. This may be helpful pin-pointing an appropriate parameter for a particular image processing operation. Choose from these operations: <kbd>Rotate, Shear, Roll, Hue, Saturation, Brightness, Gamma, Spiff, Dull, Grayscale, Quantize, Despeckle, ReduceNoise, AddNoise, Sharpen, Blur, Threshold, EdgeDetect, Spread, Solarize, Shade, Raise, Segment, Swirl, Implode, Wave, OilPaint, CharcoalDrawing, JPEG</kbd>. Here is an example:</p>

<pre class="code">
  $preview = $image-&gt;Preview('Gamma');
  $preview-&gt;Display();
</pre>

<p>To have full control over text positioning you need font metric information. Use</p>

<pre class="code">
  ($x_ppem, $y_ppem, $ascender, $descender, $width, $height, $max_advance)
         = $image-&gt;QueryFontMetrics(<i>parameters</i>);
</pre>

<p>Where <i>parameters</i> is any parameter of the <a href="perl-magick.html#manipulate">Annotate</a> method. The return values are:</p>

<ul>
  <li>character width</li>
  <li>character height</li>
  <li>ascender</li>
  <li>descender</li>
  <li>text width</li>
  <li>text height</li>
  <li>maximum horizontal advance</li>
  <li>bounds: x1</li>
  <li>bounds: y1</li>
  <li>bounds: x2</li>
  <li>bounds: y2</li>
  <li>origin: x</li>
  <li>origin: y</li>
</ul>

<p>Use QueryMultilineFontMetrics() to get the maximum text width and height for multiple lines of text.</p>

<p>Call QueryColor() with no parameters to return a list of known colors names or specify one or more color names to get these attributes: red, green, blue, and opacity value.</p>

<pre class="code">
  @colors = $image-&gt;QueryColor();
  ($red, $green, $blue, $opacity) = $image-&gt;QueryColor('cyan');
  ($red, $green, $blue, $opacity) = $image-&gt;QueryColor('#716bae');
</pre>

<p>QueryColorname() accepts a color value and returns its respective name or hex value;</p>

<pre class="code">
    $name = $image-&gt;QueryColorname('rgba(80,60,0,0)');
</pre>

<p>Call QueryFont() with no parameters to return a list of known fonts or specify one or more font names to get these attributes: font name, description, family, style, stretch, weight, encoding, foundry, format, metrics, and glyphs values.</p>

<pre class="code">
  @fonts = $image-&gt;QueryFont();
  $weight = ($image-&gt;QueryFont('Helvetica'))[5];
</pre>

<p>Call QueryFormat() with no parameters to return a list of known image formats or specify one or more format names to get these attributes: adjoin, blob support, raw, decoder, encoder, description, and module.</p>

<pre class="code">
  @formats = $image-&gt;QueryFormat();
  ($adjoin, $blob_support, $raw, $decoder, $encoder, $description, $module)
            = $image-&gt;QueryFormat('gif');
</pre>

<p>Call MagickToMime() with the image format name to get its MIME type such as <kbd>images/tiff</kbd> from <kbd>tif</kbd>.</p>

<pre class="code">
  $mime = $image-&gt;MagickToMime('tif');
</pre>

<p>Use RemoteCommand() to send a command to an already running <a href="display.html">display</a> or <a href="animate.html">animate</a> application. The only parameter is the name of the image file to display or animate.</p>

<pre class="code">
  $image-&gt;RemoteCommand('image.jpg');
</pre>

<p>The Smush() method smushes a set of images together. For example,</p>

<pre class="code">
  $p = $image-&gt;Smush(stack=&gt;{true,false},offset=&gt;<em>integer</em>);
</pre>

<p>smushes together all the images associated with object <kbd>$image</kbd>. By default, images are smushed left-to-right. Set <kbd>stack</kbd> to True to smushed them top-to-bottom.</p>

<p>Statistics() returns the image statistics for each channel in the image. The returned values are an array of depth, minima, maxima, mean, standard deviation, kurtosis, and skewness values in RGB, CMYK, RGBA, or CMYKA order (depending on the image type).</p>

<pre class="code">
  @statistics = $image-&gt;Statistics();
</pre>

<p>Finally, the Transform() method accepts a fully-qualified geometry specification for cropping or resizing one or more images.  For example,</p>

<pre class="code">
  $p = $image-&gt;Transform(crop=&gt;'100x100+0+0');
</pre>

<p>You can optionally add <i>Image</i> to any method name above. For example, PingImage() is an alias for method Ping().</p>

</div>

<h2><a id="exceptions"></a>Handling Exceptions</h2>
<div class="doc-section">

<p>All PerlMagick methods return an undefined string context upon success. If any problems occur, the error is returned as a string with an embedded numeric status code. A status code less than 400 is a warning. This means that the operation did not complete but was recoverable to some degree. A numeric code greater or equal to 400 is an error and indicates the operation failed completely. Here is how exceptions are returned for the different methods:</p>

<p>Methods which return a number (e.g. Read(), Write()):</p>

<pre class="code">
  $x = $image-&gt;Read(...);
  warn "$x" if "$x";      # print the error message
  $x =~ /(\d+)/;
  print $1;               # print the error number
  print 0+$x;             # print the number of images read
</pre>

<p>Methods which operate on an image (e.g. Resize(), Crop()):</p>

<pre class="code">
  $x = $image-&gt;Crop(...);
  warn "$x" if "$x";      # print the error message
  $x =~ /(\d+)/;
  print $1;               # print the error number
</pre>

<p>Methods which return images (EvaluateSequence(), Montage(), Clone()) should be checked for errors this way:</p>

<pre class="code">
  $x = $image-&gt;Montage(...);
  warn "$x" if !ref($x);  # print the error message
  $x =~ /(\d+)/;
  print $1;               # print the error number
</pre>

<p>Here is an example error message:</p>

<pre class="code">
  Error 400: Memory allocation failed
</pre>

<p>Review the complete list of <a href="exception.html">error and warning codes</a>.</p>

<p>The following illustrates how you can use a numeric status code:</p>

<pre class="code">
  $x = $image-&gt;Read('rose.png');
  $x =~ /(\d+)/;
  die "unable to continue" if ($1 == ResourceLimitError);
</pre>

</div>

<h2><a id="constants"></a>Constants</h2>
<div class="doc-section">

<p>PerlMagick includes these constants:</p>

<pre class="text">
  BlobError
  BlobWarning
  CacheError
  CacheWarning
  CoderError
  CoderWarning
  ConfigureError
  ConfigureWarning
  CorruptImageError
  CorruptImageWarning
  DelegateError
  DelegateWarning
  DrawError
  DrawWarning
  ErrorException
  FatalErrorException
  FileOpenError
  FileOpenWarning
  ImageError
  ImageWarning
  MissingDelegateError
  MissingDelegateWarning
  ModuleError
  ModuleWarning
  Opaque
  OptionError
  OptionWarning
  QuantumDepth
  QuantumRange
  RegistryError
  RegistryWarning
  ResourceLimitError
  ResourceLimitWarning
  StreamError
  StreamWarning
  Success
  Transparent
  TypeError
  TypeWarning
  WarningException
  XServerError
  XServerWarning
</pre>

<p>You can access them like this:</p>

<pre class="code">
  Image::Magick-&gt;QuantumDepth
</pre>

</div>

</div>

<div id="linkbar">
    <span id="linkbar-west">&nbsp;</span>
    <span id="linkbar-center">
      <a href="../discourse-server">Discourse Server</a> &bull;
      <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
    </span>
    <span id="linkbar-east">&nbsp;</span>
  </div>
  <div class="footer">
    <span id="footer-west">&copy; 1999-2012 ImageMagick Studio LLC</span>
    <span id="footer-east"> <a href="contact.html">Contact the Wizards</a></span>
  </div>
  <div style="clear: both; margin: 0; width: 100%; "></div>
  <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-17690367-1']);
    _gaq.push(['_trackPageview']);

    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
  </script>
</body>
</html>