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
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<title>ImageMagick - Frequently Asked Questions</title>
<meta name="Description"
content="ImageMagick is a robust collection of tools and libraries to read, write, and manipulate an image in many image formats including popular formats like TIFF, JPEG, PNG, PDF, PhotoCD, and GIF. With ImageMagick you can create images dynamically, making it suitable for Web applications. You can also resize, rotate, sharpen, color reduce, or add special effects to an image or image sequence and save your completed work in the same or differing image format. Image processing operations are available from the command line, as well as through C, C++, Perl, or Java programming interfaces." />
<meta name="Keywords"
content="ImageMagick,PerlMagick,Magick++,Image,Magick,Magic,Pixel,Graphics,Perl,Wand" />
<meta name="Resource-type" content="document" />
<meta name="Robots" content="ALL" />
<link rel="stylesheet" type="text/css" href="../www/magick.css" />
</head>
<body marginheight="1" marginwidth="1" topmargin="1"
leftmargin="1">
<a name="top" id="top"></a>
<table border="0" cellpadding="0" cellspacing="0" summary="Masthead" width="100%">
<tbody>
<tr>
<td bgcolor="#003399" width="25%" height="118" background="../images/background.gif"><a href="http://www.imagemagick.org/"><img src="../images/script.gif" width="278" height="118" border="0" alt="" /></a></td>
<td bgcolor="#003399" width="60%" height="118" background="../images/background.gif"><a href="http://www.networkeleven.com/direct.php?magick_all"><img src="../images/promote.png" border="0" width="186" height="52" vspace="29" alt="Powered by NetworkEleven" /></a></td>
<td bgcolor="#003399" width="114" height="118" align="right"><img src="../images/sprite.png" width="114" height="118" alt="" /></td>
<td bgcolor="#003399" width="114" height="118" align="right"><a href="http://www.imagemagick.net"><img src="../images/logo.png" width="114" height="118" border="0" alt="ImageMagick logo" /></a></td>
</tr></tbody></table>
<table align="left" border="0" cellpadding="2" cellspacing="2"
summary="Navigation buttons" width="20%">
<tr>
<td>
<form target="_self" action="../index.html"><input type="submit"
title="ImageMagick Home" value=" Home"
style="background-color: #1947A3; background-image:url('../images/background.gif'); color:#fbc713; font-weight:bold" />
</form></td>
<td>
<form target="_self" action="../www/apis.html"><input type="submit"
title="ImageMagick API " value=" API "
style="background-color: #1947A3; background-image:url('../images/background.gif'); color:#fbc713; font-weight:bold" />
</form></td>
<td>
<form target="_self" action="../www/download.html">
<input type="submit" title="ImageMagick Download" value="Download"
style="background-color: #1947A3; background-image:url('../images/background.gif'); color:#fbc713; font-weight:bold" />
</form></td></tr></table>
<div align="right" style="margin-top:3px; padding-right:4px">
<form action="http://studio.imagemagick.org/Sage/scripts/Sage.cgi">
<input type="TEXT" name="query" size="32" maxlength="255" />
<input type="SUBMIT" name="sa" value="Search"
style="background-color: #1947A3; background-image:url('../images/background.gif'); bgcolor:#003399; color:#fbc713; font-weight:bold" />
</form></div>
<table align="left" border="0" cellpadding="10" cellspacing="0"
style="margin-top:-17px" width="100%">
<tr>
<br />
<td>
<ol>
<li>
<p style="margin-bottom: 0.08in"><a href="#C1">I received the
following message, "?????? delegation failed ...". What does it
mean?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C2">How can I improve
the appearance of 24-bit images displayed on my colormapped <i>X
server</i>?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C3">How do I set the
transparency index in a GIF image so it displays properly within
Mozilla?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C4">How can I stop the
filenames from changing in the title bar of the animate(1) image
window?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C5">The image grabbed by
import(1) does not look like the image on my <i>X server</i>.
What's wrong</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C6">How do I animate a
digital YUV image sequence?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C7">How do I view only
the red channel of an RGB image?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C8">How do I change the
default <i>PostScript</i> page size?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C9">When I display or
convert an image, I get <i>Memory allocation error</i>. What can I
do?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C10">How do I
concatenate three images left-to-right with no borders, frames, or
text?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C11">How do I create a
GIF animation sequence to display within Netscape?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C12">When I display a
<i>PostScript</i> image it appears to be trimmed. I would like to
display the entire page, including any white space.</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C13">What are visual
image directories? How do I use them?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C14">I have an HP. How
do I take advantage of the Color Recovery option?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C15">I use the window ID
reported by <i>xwininfo(1)</i> with import and it does include the
window manager frame as expected. How can I save the window with
its frame?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C16">I displayed an
image and it appears as one solid color. What did I do
wrong?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C17">I received the
following message, "???? library is not available ...". What does
it mean?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C18">I want to inspect
the values of the matte channel within my image. How can I do
that?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C19">Convert in.gif
out.png" says "Invalid Parameter - out.png"</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C20">How can I add one
of those cool bevels to my image that I see used on the
Web?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C21">I try to launch
display from my window manager and it fails. What's
up?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C22">When I convert
Postscript to another format, how can I improve the appearance of
the text?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C23">How can I annotate
an image with text that is 2 to 3 inches tall?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C24">How can I convert
my GIF animation sequence to individual image files?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C25">How can I remove
the background that prints around my image when I display it with
Netscape?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C26">How do I create a
GIF or PNG image with Web safe colors?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C27">How come Adobe
Acrobat 2.1 can't read ImageMagick's PDF format?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C28">How can I add a
matte layer to my image?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C29">How can I draw with
text using 'convert' under Windows NT?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C30">Why are my GIF
files larger than expected?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C31">Why are my JPEG
files larger than expected?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C32">How do I extract a
single image from a multi-image file?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C33">How do I make a
blank image?</a></p></li>
<li>
<p style="margin-bottom: 0.08in"><a href="#C34">What happened to
the "combine" utility?</a></p></li></ol>
<p style="border-top: none; border-bottom: 3.55pt double #808080; border-left: none; border-right: none; padding-top: 0in; padding-bottom: 0.02in; padding-left: 0in; padding-right: 0in">
</p>
<br />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C1" id="C1"></a><b>1. I
received the following message, "?????? delegation failed ...".
What does it mean?</b></dt></dl>
<dl>
<dd style="margin-left: 0in"><b>ImageMagick</b> uses several freely
available packages to perform the translation of certain image
formats (<i>PostScript</i>, <i>MPEG</i>, etc.). Make sure these
packages are available as described in the
<a href="install.html">README</a> file. Also verify that you have
plenty of temporary disk space. If not, set the TMPDIR environment
variable to an area where space is available. Finally, for
<i>PostScript</i>, verify that Ghostscript supports the
<b>pnmraw</b> or <b>ppmraw</b> device (<tt>gs -h</tt>) and that the
document contains valid <i>PostScript</i> statements (<tt>gs
image.ps</tt>).</dd></dl>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C2" id="C2"></a><b>2. How
can I improve the appearance of 24-bit images displayed on my
colormapped <i>X server</i>?</b></dt></dl>
<p>If you have a colormapped <i>X server</i>, the number of unique
colors in an image must first be reduced to match the requirements
of your server before it can be displayed.
<a href="display.html">Display</a> tries to make the color reduced
image closely resemble the original. However, there are some
options that may improve the appearance.</p>
<p>You can use a private colormap. By default, your image must
share colors with existing applications on your <i>X server</i>.
The colors in your image may be very different than the shared
colors and the results may be visually unsatisfactory. Try</p>
<pre style="margin-bottom: 0.2in">
display -colormap private image.miff
</pre>
<p>The disadvantage is the annoying colormap loading and unloading
as you move your pointer in and out of the image window.</p>
<p>The YCbCr colorspace may give better results when color reducing
images of people faces. Try</p>
<pre style="margin-bottom: 0.2in">
display -colorspace YCbCr image.miff
</pre>
<p>If you intend to view an image frequently, reduce the number of
colors to match the resolution of your <i>X server</i> once and
write to a new image. Then display this new image. For example,</p>
<pre>
convert -colors 256 -dither image.jpeg image.miff
display image.miff
</pre>
<p>This forces the time-consuming process of color reducing the
image to one-time, rather than each time the image is
displayed.</p>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C3" id="C3"></a><b>3. How
do I set the transparency index in a GIF image so it displays
properly within Mozilla?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">Display your GIF
image with <a href="display.html">display</a>. Choose <b>Matte</b>
from the <b>Image Edit</b> command menu and identify a pixel that
has the <i>transparency</i> color. Press <b>Method</b> and select a
matte edit method from a pop-up menu. Choose from these
methods:</dd></dl>
<pre>
point
replace
floodfill
</pre>
<p>The <b>point</b> method changes the matte value of any pixel
selected with the pointer until the button is is released. The
<b>replace</b> method changes the matte value of any pixel that
matches the color of the pixel you select with a button press.
<b>Floodfill</b> changes the matte value of any pixel that matches
the color of the pixel you select with a button press and is a
neighbor.</p>
<p>Select your transparent pixel with the pointer and press a
button. The image is redisplayed with any transparent pixels
recolored to the background color. You can select other pixels or
areas to force to transparent. When you are satisfied, press
Return.</p>
<p>Finally, choose <b>Save</b> from the command menu and write your
GIF image to a file. <i>Note that setting transparency works best
on a TrueColor or DirectColor visual</i>. If your server only
exports colormapped visuals you will need to use a <b>Standard
Colormap</b> to set transparency.</p>
<pre>
xstdcmap -best
display -map list image.gif
<i>choose Matte Edit</i>
<i>select your transparent pixel then press Return</i>
<i>choose Save</i>
</pre>
<p>If you do not have the <i>xstdcmap(1)</i> program, try</p>
<pre style="margin-bottom: 0.2in">
display -visual TrueColor image.gif
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C4" id="C4"></a><b>4. How
can I stop the filenames from changing in the title bar of the
animate(1) image window?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">
<a href="animate.html">Animate</a> updates the image file name in
the title bar of the image window as each image is displayed from
the image sequence. To display just a single name that will not
change, use <i>-title</i>:</dd></dl>
<pre style="margin-bottom: 0.2in">
animate -title "My Image Sequence" images.
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C5" id="C5"></a><b>5. The
image grabbed by import(1) does not look like the image on my <i>X
server</i>. What's wrong?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">Use the
<i>-descend</i> option:</dd></dl>
<pre style="margin-bottom: 0.2in">
import -descend image.miff
</pre>
<p>or set this <i>X resource</i>:</p>
<pre style="margin-bottom: 0.2in">
import.descend: True
</pre>
<p>By default, <a href="import.html">import</a> quickly grabs the
image from the <i>X server</i>. However, it may not always have the
correct colors in some areas. This can happen when a subwindow has
a different colormap than its parent. With <i>-descend</i>,
<a href="import.html">import</a> descends the window hierarchy.
Descending involves grabbing the image and colormap of each window
or subwindow associated with the window you select and compositing
it on a blank canvas. This can be significantly slower than just
grabbing the top-level window but ensures the correct image.</p>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C6" id="C6"></a><b>6. How
do I animate a digital YUV image sequence?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">Suppose your
sequence is 72 352x240 frames titled frame0.Y, frame0.U, frame0.V,
frame1.Y, frame1.U, etc. Use this command:</dd></dl>
<pre style="margin-bottom: 0.2in">
animate -geometry 352x240 -scene 0-71 yuv3:frame%d
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C7" id="C7"></a><b>7. How
do I view only the red channel of an RGB image?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">Use the
<i>-gamma</i> option, for example,</dd></dl>
<pre style="margin-bottom: 0.2in">
display -gamma 1.0,0.0,0.0 image.miff
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C8" id="C8"></a><b>8. How
do I change the default <i>PostScript</i> page size?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">The default
dimensions of a <i>PostScript</i> page is 612x792. If you prefer
another default, change the page geometries (PSPageGeometry) in
<i>magick/image.h</i> and recompile.</dd></dl>
<dl>
<dt style="margin-bottom: 0.2in"><a name="C9" id="C9"></a><b>9.
When I display or convert an image, I get <i>Memory allocation
error</i>. What can I do?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">Memory
allocation is a complex topic in ImageMagick and image processing
requires a lot of memory. ImageMagick tries to take best advantage
of the resources available by optimizing its use of <i>virtual</i>
memory. Virtual memory is normally the amount of RAM (Random Access
Memory) available to the process plus the amount of free space in
the system paging area (known as "swap" under Unix, or a "page
file" under Windows). In addition to the RAM and the paging area,
ImageMagick is able to expand the amount of virtual memory
available by using memory-mapped files which cause the file to be
treated as extra memory. A piece of hardware known as the Memory
Management Unit (MMU) performs the magic which allows the system
paging area and memory-mapped files to be treated as more memory by
your system's CPU.</dd>
<dd style="margin-left: 0in; margin-bottom: 0.2in">Usually when a
memory allocation error occurs, it is because the system's paging
area is full, or the programs memory (heap) is fragmented badly
enough that there is no large-enough block of memory available to
satisfy the request. In some cases the operating system may
artificially limit the memory available to the program.</dd>
<dd style="margin-left: 0in; margin-bottom: 0.2in">Failures of
small memory allocations are generally considered fatal by
ImageMagick. If it is impossible to allocate even a little bit of
memory, then there is no point in continuing. When large memory
allocations associated with allocating memory for image pixels
fail, ImageMagick uses that as a key to know that it should start
using memory-mapped temporary files to increase virtual memory.
Under Unix and other POSIX-compliant systems, these memory-mapped
temporary files are created in either the system default location
(e.g. /var/tmp) or the directory set by the TMPDIR environment
variable. Under Windows, temporary files are created in the
directory set by the TEMP or TMP environment variable.</dd>
<dd style="margin-left: 0in; margin-bottom: 0.2in">If the temporary
file directory is too small, or is itself mapped to the system's
paging area (no win!), then ImageMagick will fail to allocate more
virtual memory via the temporary file and will return an
error.</dd>
<dd style="margin-left: 0in; margin-bottom: 0.2in">The single
biggest factor in how much memory is required by ImageMagick is the
QuantumDepth setting when it was compiled. The amount of memory (in
bytes) required to store a single image in memory is may be
calculated via the equation (QuantumDepth*Rows*Columns*5)/8. As a
means of example, the following table shows the amount of memory
consumed by a single 1024x768 image using the supported
QuantumDepth settings:</dd></dl>
<table width="356" border="1" cellpadding="4" cellspacing="3">
<col width="162" />
<col width="167" />
<thead>
<tr valign="top">
<th width="162">
<p>QuantumDepth</p></th>
<th width="167">
<p>Virtual Memory</p></th></tr></thead>
<tbody>
<tr>
<td width="162" valign="bottom" sdval="8" sdnum="1033;">
<p align="center">8</p></td>
<td width="167" valign="top">
<p align="center">3MB</p></td></tr>
<tr>
<td width="162" valign="bottom" sdval="16" sdnum="1033;">
<p align="center">16</p></td>
<td width="167" valign="top">
<p align="center">8MB</p></td></tr>
<tr>
<td width="162" valign="bottom" sdval="32" sdnum="1033;">
<p align="center">32</p></td>
<td width="167" valign="top">
<p align="center">15MB</p></td></tr></tbody></table>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">Performing an
image processing operation may require that several images be in
memory at one time. In the case of animations, hundreds of images
may be in memory at one time.</dd></dl>
<p><b>ImageMagick</b> is designed to be general purpose. It can
display many image storage formats (<i>Monochrome</i>,
<i>PseudoColor</i>, or <i>TrueColor</i>) on many different types of
<i>X visuals</i> (<i>StaticGray, StaticColor, PseudoColor,
GrayScale, DirectColor,</i> or <i>TrueColor</i>). To support all
these combinations of image storage formats and X visuals, extra
memory is required. Additionally,
<a href="animate.html">animate</a> and
<a href="montage.html">montage</a> store an entire image sequence
in memory.</p>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">It is
recommended that systems used to run <b>ImageMagick</b> have at
least 96MB of RAM and 140MB free in their paging area. Systems used
to process large images (do the math!) may require considerably
more memory to operate efficiently. RAM is typically 1000 times
faster than disk, so it is important to keep as much data in RAM as
possible (buy lots of RAM). The temporary file area should have
plenty of free space. The size of the temporary file area is
usually the deciding factor as to whether ImageMagick is able to
complete an operation. With sufficient free disk space, ImageMagick
is primarily limited by your CPU and operating system's ability to
address memory. ImageMagick has been used to process images 20K by
20K pixels in size!</dd></dl>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C10" id="C10"></a><b>10.
How do I concatenate three images left-to-right with no borders,
frames, or text?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">Assume your
three images are called <tt>image1.ppm</tt>, <tt>image2.ppm</tt>,
and <tt>image3.ppm</tt>. Type</dd></dl>
<pre>
convert +append image1.ppm image2.ppm \
image3.ppm side_by_side.miff
</pre>
<p>To concatenate the images top-to-bottom, use
<tt>-append</tt>.</p>
<p>For more control over the placement of an image, use
<a href="composite.html">composite</a>. First create a matte image
and position your images onto the matte. For example,</p>
<pre>
convert -size 350x500 xc:black composite.miff
composite -geometry +0+0 composite.miff image1.gif composite.miff
composite -geometry +100+0 composite.miff image2.gif composite.miff
composite -geometry +0+300 composite.miff image3.gif composite.miff
composite -geometry +0+375 composite.miff image4.gif composite.miff
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C11" id="C11"></a><b>11.
How do I create a GIF animation sequence to display within
Netscape?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">Use
<a href="convert.html">convert</a> with the <b>-delay</b> and
<b>-page</b> options. The <b>-delay</b> option is used to specify
the delay in <b>1/100ths of a second</b> between the display of
each frame of the animation. For example,</dd></dl>
<pre style="margin-bottom: 0.2in">
convert -delay 20 frame*.gif animation.gif
</pre>
<p>You can also declare specific delays for each frame of the image
sequence. For example, if the delay was 20, 10, and 5, use</p>
<pre>
convert -delay 20 frame1.gif -delay 10 frame2.gif \
-delay 5 frame3.gif animation.gif
</pre>
<p>Use <b>-page</b> to specify the <i>left</i> and <i>top</i>
locations of the image frame:</p>
<pre>
convert frame1.gif -page +50+100 frame2.gif -page +0+100 \
frame3.gif animation.gif
</pre>
<p>Finally, if you want the image to loop within <b>Netscape</b>,
use <b>-loop</b>:</p>
<pre style="margin-bottom: 0.2in">
convert -loop 50 frame*.gif animation.gif
</pre>
<p>For further information about GIF animation, see
<a href="http://members.aol.com/royalef.pngmake.htm">GIF Animation
on the WWW</a>.</p>
<p>Note, that all the images are composited into a single
multi-image GIF animation. If you want a single image produced for
each frame, use <b>+adjoin</b>:</p>
<pre style="margin-bottom: 0.2in">
convert +adjoin images.* frames%d.gif
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C12" id="C12"></a><b>12.
When I display a <i>PostScript</i> image it appears to be trimmed.
I would like to display the entire page, including any white
space.</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">
<b>ImageMagick</b> automatically trims any <i>PostScript</i> image
as defined by the bounding box. To preempt this behavior, remove
the bounding box statement from the Postscrpt or explicitly set the
page size. For example,</dd></dl>
<pre style="margin-bottom: 0.2in">
display -page letter image.ps
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C13" id="C13"></a><b>13.
What are visual image directories? How do I use them?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">A visual image
directory (VID) is an image that contains thumbnails of one or more
images in a file directory. Rather than displaying each individual
image at its full resolution, you can browse the visual image
directory and choose an image to display. You can create a VID with
either of these commands:</dd></dl>
<pre>
montage *.jpg directory.vid
convert 'vid:*.jpg' directory.vid
</pre>
<p>Of course you can substitute any filenames you desire.
<a href="montage.html">Montage</a> has many relevant command line
options. You can exercise more control over the appearance of the
VID than with <a href="convert.html">convert</a>.</p>
<p>Next display the directory:</p>
<pre style="margin-bottom: 0.2in">
display directory.vid
</pre>
<p>Finally browse and select an image to display. Move the pointer
to the image and press button 3.</p>
<p>You can create the VID directory with this command:</p>
<pre style="margin-bottom: 0.2in">
display 'vid:*.jpg'
</pre>
<p>You can also select <b>Visual Image...</b> from the <b>File</b>
menu of the command widget.</p>
<p><i>Note, that creating a VID is time consuming</i>. Creating
them on-the-fly within <a href="display.html">display</a> may be
less convenient than using <a href="montage.html">montage</a> or
<a href="convert.html">convert</a> . Also, if you create them with
<a href="montage.html">montage</a>. or
<a href="convert.html">convert</a>, you can reuse them as often as
necessary.</p>
<p>Note that a visual image directory is useful for looking at
individual frames of an image sequence:</p>
<pre style="margin-bottom: 0.2in">
display vid:movie.mpg
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C14" id="C14"></a><b>14.
I have an HP. How do I take advantage of the Color Recovery
option?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">Type</dd></dl>
<pre style="margin-bottom: 0.2in">
display -map list image.miff
</pre>
<p>If you want to use
<a href="http://www.hp.com/workstations/support/documentation/manuals/user_guides/graphics/GAG11/3_XWindows11.html#HPColorRecovery">
Color Recovery</a> all the time, put this in your X defaults
file:</p>
<pre style="margin-bottom: 0.2in">
display.map: list
</pre>
<p>Now if you need to turn off Color Recovery temporarily, type</p>
<pre style="margin-bottom: 0.2in">
display +dither image.miff
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C15" id="C15"></a><b>15.
I use the window ID reported by <i>xwininfo(1)</i> with import and
it does include the window manager frame as expected. How can I
save the window with its frame?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">By default,
<i>xwininfo(1)</i> returns the ID of the window you click on. Use
the <i>-frame</i> option to get the reparented window ID:</dd></dl>
<pre style="margin-bottom: 0.2in">
xwininfo -frame
</pre>
<p>You can then use the returned window ID with
<a href="import.html">import</a>:</p>
<pre style="margin-bottom: 0.2in">
import -frame -window ID window.miff
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C16" id="C16"></a><b>16.
I displayed an image and it appears as one solid color. What did I
do wrong?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">A blank image
generally means that the image is either corrupt or it has a matte
channel and the matte values are all zero. <b>ImageMagick</b>
treats a matte value of zero as completely transparent. To
determine if this is the problem, try</dd></dl>
<pre style="margin-bottom: 0.2in">
display +matte image.miff
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C17" id="C17"></a><b>17.
I received the following message, "???? library is not available
...". What does it mean?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">
<b>ImageMagick</b> requires source libraries not included with the
distribution to view or convert certain image formats such as JPEG
or TIFF. The above message means you did not compile the required
library and link with the <b>ImageMagick</b> utilities. See
<a href="install.html">README</a> for the location of these
libraries and compiling instructions.</dd></dl>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C18" id="C18"></a><b>18.
I want to inspect the values of the matte channel within my image.
How can I do that?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">View the matte
image as a gray scale image. Suppose you have a TIFF image that has
a matte channel and is 640 pixels in width and 480 in height.
Type:</dd></dl>
<pre>
convert image.tiff image.matte
display -size 640x480 gray:image.matte
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C19" id="C19"></a><b>19.
"Convert in.gif out.png" says "Invalid Parameter -
out.png"</b></dt></dl>
<dl>
<dd style="margin-left: 0in">You have inadvertently run the
Microsoft Windows program called convert.exe, rather than the
ImageMagick program of the same name. The Windows convert.exe
program is used to convert a system boot disk from MS-DOS "FAT"
format to NTFS format. As such it can only be used one time in the
life of a system.</dd>
<dd style="margin-left: 0in; margin-bottom: 0.2in">You
can</dd></dl>
<ul>
<li>
<dl>
<dd>rename either the MS convert.exe or the ImageMagick
convert.exe</dd></dl></li>
<li>
<dl>
<dd>revise your PATH to put ImageMagick's convert.exe ahead of MS
convert.exe</dd></dl></li>
<li>
<dl>
<dd style="margin-bottom: 0.2in">edit your Windows Registry as
explained in
<a href="http://savage.net.au/index.html/Install-convert.html">http://savage.net.au/index.html/Install-convert.html</a></dd></dl></li></ul>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C20" id="C20"></a><b>20.
How can I add one of those cool bevels to my image that I see used
on the Web?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">There are four
types of ornamental borders you can add to your image with
ImageMagick. Each is listed below with the procedure to use them
with your image.</dd></dl>
<p><i>Surround the image with a border of color</i>: Use
<tt>-border</tt> followed by the width and height of the border.
Set the color of the border with <tt>-bordercolor</tt>. For
example, to surround your image with a red border that is 25 pixels
wide on each side, use:</p>
<pre style="margin-bottom: 0.2in">
convert -bordercolor red -border 25x25 image.jpg image.gif
</pre>
<ul class="noindent"></ul>
<p><i>Lighten or darken image edges to create a 3-D effect</i>: Use
<tt>-raise</tt> followed by the width of the image edge. For
example, to create a raised edge effect of 25 pixels, use:</p>
<pre style="margin-bottom: 0.2in">
convert -raise 25 image.jpg image.gif
</pre>
<ul class="noindent"></ul>
<p><i>Surround the image with an ornamental frame</i>: Use
<tt>-frame</tt> followed by the width and height of the frame. Set
the color of the border with <tt>-mattecolor</tt>. For example, to
surround your image with a gray frame that is 25 pixels wide on
each side, use:</p>
<pre style="margin-bottom: 0.2in">
convert -mattecolor gray -frame 25x25 image.jpg image.gif
</pre>
<ul class="noindent"></ul>
<p><i>Surround the image with a raised or sunken bevel</i>: Use
<tt>-frame</tt> followed by the width and height of the bevel. Set
the color of the border with <tt>-mattecolor</tt>. This is just
like the description above except you specify a bevel width that
matches the frame width. For example, to surround your image with a
gray bevel that is 25 pixels wide on each side, use:</p>
<pre>
convert -mattecolor gray -frame 25x25+0+25 image.jpg image.gif
convert -mattecolor gray -frame 25x25+25+0 image.jpg image.gif
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C21" id="C21"></a><b>21.
I try to launch display from my window manager and it fails. What's
up?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">
<a href="display.html">Display</a> determines if it is executing
interactively and behaves differently depending on the result. To
convince <a href="display.html">display</a> you are running in an
interactive environment when launching from a window manager, use
either of</dd></dl>
<pre>
display logo:Untitled
display < /dev/console
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C22" id="C22"></a><b>22.
When I convert Postscript to another format, how can I improve the
appearance of the text?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">Simple. Increase
the dots-per-inch when converting and sub-sample:</dd></dl>
<pre style="margin-bottom: 0.2in">
convert -density 288 -geometry 25% image.ps image.gif
</pre>
<p>Change the density to 144 and geometry to 50% if the above
command fails due to insufficient memory. Alternatively, see the
Ghostscript documentation about using high-quality fonts.</p>
<p>The <tt>-density</tt> option increases the number of pixels (or
dots) generated by Ghostscript when processing the input postscript
file. However as all other images formats are generally displayed
on screens which are typically about 72 to 100 dots per inch, the
output image will be larger.</p>
<p>The <i>-geometry</i> option reduces the large image output of
ghostscript image back to a normal 72 dpi resolution (25% of 288
dpi gives 72 dpi) but in the process anti-aliases (or smooths) the
fonts and lines of the image so as to remove the <i>jaggies</i> you
would otherwise get from a normal postscript to image
conversion.</p>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C23" id="C23"></a><b>23.
How can I annotate an image with text that is 2 to 3 inches
tall?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">If you do not
access to a particular named font that is large, try scalable
fonts. First see if you have any scalable fonts. Type</dd></dl>
<pre style="margin-bottom: 0.2in">
xlsfonts -fn '*-0-0-0-0-*'
</pre>
<dl>
<dd style="margin-left: 0in; margin-bottom: 0.2in">Or if you are
using <a href="display.html">display</a>, use the font pattern
above within the Font Browser (see Image Edit->Annotate). Next
substitute the appropriate resolution. Keep in mind that a scalable
font must be fully qualified to work. That is, all 14 fields must
be specified. Here is one example where we annotate an image with
large <i>Helvetica</i> text:</dd></dl>
<pre>
convert -font '-*-helvetica-*-*-*--300-300-*-*-*-*-iso8859-1' \
-fill green -draw 'text 50,300 Magick' image.gif annotated.gif
</pre>
<p>If you have the FreeType support built into ImageMagick, just
increase your pointsize and/or density:</p>
<pre style="margin-bottom: 0.2in">
convert -font Helvetica -pointsize 100 -density 300 ...
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C24" id="C24"></a><b>24.
How can I convert my GIF animation sequence to individual image
files?</b></dt></dl>
<dl>
<dd style="margin-left: 0in">Use the scene embedded file format
with <a href="convert.html">convert</a>:</dd>
<dd style="margin-left: 0in"><tt>convert animation.gif
frame%02d.gif</tt></dd>
<dd style="margin-left: 0in; margin-bottom: 0.2in">The resulting
image files are titled <tt>frame01.gif</tt>, <tt>frame02.gif</tt>,
<tt>frame03.gif</tt>, etc.</dd></dl>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C25" id="C25"></a><b>25.
How can I remove the background that prints around my image when I
display it with Netscape?</b></dt></dl>
<dl>
<dd style="margin-left: 0in">Use the <tt>+page</tt> option of the
<a href="convert.html">convert</a> command:</dd>
<dd style="margin-left: 0in"><tt>convert +page alpha.gif
beta.gif</tt></dd>
<dd style="margin-left: 0in; margin-bottom: 0.2in">GIF allows for a
page offset relative to some background. The page offset
information may have been in your GIF image already or it could
have been introduced by ImageMagick. Either way, <tt>+page</tt>
removes the unwanted page offset and Netscape should behave as
expected.</dd></dl>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C26" id="C26"></a><b>26.
How do I create a GIF or PNG image with Web safe
colors?</b></dt></dl>
<dl>
<dd style="margin-left: 0in">Use the <tt>-map</tt> option of the
<a href="convert.html">convert</a> command:</dd>
<dd style="margin-left: 0in"><tt>convert -map netscape: alpha.gif
beta.gif</tt></dd>
<dd style="margin-left: 0in">Netscape predefines 216 colors for
colormapped displays. Use the above command to ensure only these
predefined colors are used. Otherwise Netscape dithers your image
with varying degrees of image fidelity.</dd></dl>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C27" id="C27"></a><b>27.
How come Adobe Acrobat 2.1 can't read ImageMagick's PDF
format?</b></dt></dl>
<dl>
<dd style="margin-left: 0in">The default PDF compression is
<i>Zip</i>. You need Acrobat 3.0 and above to read Zip compressed
PDF. Instead use no compression or LZW compression when you create
the PDF file:</dd>
<dd style="margin-left: 0in"><tt>convert +compress images.tiff
image.pdf</tt></dd></dl>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C28" id="C28"></a><b>28.
How can I add a matte layer to my image?</b></dt></dl>
<dl>
<dd style="margin-left: 0in">One way is to use a bitmap as your
transparency mask</dd>
<dd style="margin-left: 0in; margin-bottom: 0.2 in">First, use the
<tt>-matte</tt> option to add an all-opaque opacity channel, then
use the <tt>composite</tt> utility to copy the graylevel samples
from the mask file into your new opacity channel:</dd>
<dd style="margin-left: 0in"><tt>convert image.gif -matte
temp.miff</tt></dd>
<dd style="margin-left: 0in" margin-bottom:="" in=""><tt>composite
-compose CopyOpacity mask.xbm temp.miff transparent.gif</tt></dd>
<dd style="margin-left: 0in; margin-bottom: 0.2in">Note, GIF is
limited to one transparent color. If your mask has variable
opacity, use a format like MIFF, TIFF, or PNG as your output image
format.</dd></dl>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C29" id="C29"></a><b>29.
How can I draw with text using 'convert' under Windows
NT?</b></dt></dl>
<dl>
<dd style="margin-left: 0in">The problem is that NT interprets the
command line differently than Unix does, causing the documented
command to fail. The following command has been reported to work
correctly (all on one line):</dd>
<dd style="margin-left: 0in"><tt>convert -font Arial -fill blue
-draw "text 10,10 'your text here'" d:\test.tif
png:d:\test.png</tt></dd>
<dd style="margin-left: 0in">and here is another example which is
reported to work (which relies on Ghostscript's 'gs' program to
installed):</dd>
<dd style="margin-left: 0in"><tt>convert.exe -pointsize 18 -draw
"text 0,0 "This is my text!"" C:\blank.gif
c:\text.gif</tt></dd></dl>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C30" id="C30"></a><b>30.
Why are my GIF files larger than expected?</b></dt></dl>
<dl>
<dd style="margin-left: 0in">LZW-compression was not enabled when
ImageMagick was built. Grab the source and configure with the
--enable-lzw option.</dd></dl>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C31" id="C31"></a><b>31.
Why are my JPEG files larger than expected?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; font-weight: medium">Your JPEG files
may contain embedded "profiles" such as Exif or IPTC, or they may
contain uncompressed thumbnails. You can use the
<font face="Cumberland">+profile "*"</font> commandline option or
an equivalent API method to remove them.<br /></dd></dl>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C32" id="C32"></a><b>32.
How do I extract a single image from a multi-image
file?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; font-weight: medium">Use a
square-bracket syntax to indicate which frame or frames you want.
For example,</dd></dl>
<pre>
convert "Image.gif[0]" first.gif
</pre>
<p>Will extract the first image (scene 0) from a GIF animation. Be
sure to surround the file specification with quotation marks, to
prevent the shell from interpreting the square brackets.</p>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C33" id="C33"></a><b>33.
How do I make a blank image?</b></dt></dl>
<dl>
<dd style="margin-left: 0in; font-weight: medium">There are several
ways of making a blank image:</dd></dl>
<pre>
convert -size 800x600 xc:"#ddddff" ltblue.ppm
convert -size 800x600 null:white white.ppm
</pre>
<dl>
<dd style="margin-left: 0in; font-weight: medium">or, to make a
black image whose dimensions are the same as those of an existing
image,</dd></dl>
<pre>
convert in.png -threshold 100% black.ppm
</pre>
<hr size="5" />
<dl>
<dt style="margin-bottom: 0.2in"><a name="C34" id="C34"></a><b>34.
There used to be a "combine" utility but it's gone.</b></dt></dl>
<dl>
<dd style="margin-left: 0in; font-weight: medium">It was replaced
by the "composite" utility. The commandline parameters have been
rearranged.</dd></dl>
<hr />
<a href="#top"><img src="../images/top.gif" border="0" width="42"
height="42" align="right" alt="Top of page" /></a>
<form action="http://studio.imagemagick.org/magick/"
style="margin-top:5px"><input type="submit" title="Help!"
value="Help!"
style="background-color: #1947A3; background-image:url('../images/background.gif'); color:#fbc713; font-weight:bold" />
<small>"Image manipulation software that works like
magick"</small></form></td></tr></table>
</body>
</html>
|