Sophie

Sophie

distrib > Mandriva > mes5 > x86_64 > by-pkgid > 0d81a008159b90d5a3553d84969a208b > files > 27

graphicsmagick-doc-1.2.5-2.3mdvmes5.2.x86_64.rpm

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
<title>GraphicsMagick FAQ</title>
<style type="text/css">

/* magick.css -- default style sheet */

BODY, P, TD, TH, UL, OL  {
	font-family : Verdana, Arial, Helvetica, sans-serif;
	font-size : medium;
}

H1, H2, H3, H4  {
	font-family : Verdana, Arial, Helvetica, sans-serif;
}

H1  {
	font-size : 120%;
}

H2  {
	font-size : 110%;
}

H3, H4  {
	font-size : 105%;
}

A:LINK  {
	text-decoration : underline;
	color : #0085C0;
}

A:VISITED  {
	text-decoration : underline;
	color : Purple;
}

A:HOVER  {
	text-decoration : underline;
	color : #0085C0;
}

A.nav:LINK  {
	text-decoration : none;
	color : #0085C0;
}

A.nav:VISITED  {
	text-decoration : none;
	color : Purple;
}

A.nav:HOVER  {
	text-decoration : underline;
	color : #0085C0;
}

A.leftcolnav:LINK  {
	text-decoration : none;
	color : #0085C0;
}

A.leftcolnav:HOVER  {
	text-decoration : none;
	background : #999999;
	color: black;
}

A.leftcolnav:VISITED  {
	text-decoration : none;
	color : Purple;
}

.stripes  {
	font-size : smaller;
}

.navtopon  {
	background-color : #999999;
	font-size : smaller;
	text-align : center;
	font-weight : bold;
}

.navtopoff  {
	font-size : smaller;
	text-align : center;
	font-weight : bold;
}

.gutter  {
	margin-top : 2mm;
	margin-right : 3mm;
	margin-bottom : 3mm;
	margin-left : 5mm;
}

.bannergutter {
        margin-top : 2mm;
        margin-right : 3mm;
}

.pagebodygutter  {
	margin-top : 2mm;
}

.pagecentergutter  {
        margin-left : 20mm;
        margin-right: 20mm;
        margin-top : 5mm;
        margin-bottom: 2mm;
}

.leftcolgutter  {
	margin-top : 2mm;
	margin-right : 1mm;
	margin-left : 3mm;
}

.textcolgutter  {
	margin-bottom : 1.5mm;
}

.textpromo  {
	font-size : medium;
	margin-top : 2mm;
	margin-right : 1mm;
	margin-left : 2mm;
}

.newscolgutter  {
	margin-left : 1mm;
	margin-top : 2mm;
	margin-bottom : 3mm;
	font-size : medium;
}

.itemgutter  {
	margin-left : 1.5mm;
	font-size : small;
}

.logogutter  {
	margin-top : 3mm;
	margin-bottom : 2mm;
	margin-left : 3mm;
}

.navtext  {
	font-size : smaller;
}

.navlevel2 {
        font-size : 9pt;
}

.navlevel3 {
        font-size : 8pt;
}

.navlevel2on {
        font-size : 9pt;
	background-color : #cccccc;
}

.navlevel3on {
        font-size : 8pt;
        background-color : #cccccc;
}

.navlevel1on {
	background-color : #cccccc;
}

.note  {
	font-style : italic;
	color : gray;
}

.textwhite  {
	color : white;
}

.small  {
	font-size : smaller;
}

.tiny  {
	font-size : smaller;
}

.confirmation  {
	color : Lime;
}

.warning  {
	color : #ffcc66;
}

.error  {
	color : Red;
}

.disclaimer  {
	font-size : smaller;
	color : Gray;
	margin-top : 1em;
	margin-bottom : 1em;
}


.bgwhite {
        background-color: White;
}

.1colgutter {
        margin-top: 2mm;
        margin-right: 3mm;
        margin-left: 3mm;
}

.1colnavgutter {
        margin-right: 1mm;
        margin-left: 1mm;
}

.largeboldfont {
	font-size : 110%;
	font-weight: bold;
}

.redfont {
	color : red;
}


</style>
</head>
<body>
<div class="document" id="graphicsmagick-faq">
<h1 class="title">GraphicsMagick FAQ</h1>
<!-- This text is in reStucturedText format, so it may look a bit odd. -->
<!-- See http://docutils.sourceforge.net/rst.html for details. -->
<!-- URL links -->
<div class="contents topic">
<p class="topic-title first"><a id="faq-contents" name="faq-contents">FAQ Contents</a></p>
<ul class="simple">
<li><a class="reference" href="#how-does-graphicsmagick-differ-from-imagemagick" id="id1" name="id1">1) How does GraphicsMagick differ from ImageMagick?</a></li>
<li><a class="reference" href="#i-received-the-following-message-delegation-failed-what-does-it-mean" id="id2" name="id2">2) I received the following message, &quot;?????? delegation failed ...&quot;. What does it mean?</a></li>
<li><a class="reference" href="#how-can-i-improve-the-appearance-of-24-bit-images-displayed-on-my-colormapped-x-server" id="id3" name="id3">3) How can I improve the appearance of 24-bit images displayed on my colormapped /X server/?</a></li>
<li><a class="reference" href="#how-do-i-set-the-transparency-index-in-a-gif-image-so-it-displays-properly-within-mozilla" id="id4" name="id4">4) How do I set the transparency index in a GIF image so it displays properly within Mozilla?</a></li>
<li><a class="reference" href="#how-can-i-stop-the-filenames-from-changing-in-the-title-bar-of-the-animate-1-image-window" id="id5" name="id5">5) How can I stop the filenames from changing in the title bar of the animate(1) image window?</a></li>
<li><a class="reference" href="#the-image-grabbed-by-import-1-does-not-look-like-the-image-on-my-x-server-what-s-wrong" id="id6" name="id6">6) The image grabbed by import(1) does not look like the image on my X server. What's wrong?</a></li>
<li><a class="reference" href="#how-do-i-animate-a-digital-yuv-image-sequence" id="id7" name="id7">7) How do I animate a digital YUV image sequence?</a></li>
<li><a class="reference" href="#how-do-i-view-only-the-red-channel-of-an-rgb-image" id="id8" name="id8">8) How do I view only the red channel of an RGB image?</a></li>
<li><a class="reference" href="#how-do-i-change-the-default-postscript-page-size" id="id9" name="id9">9) How do I change the default <em>PostScript</em> page size?</a></li>
<li><a class="reference" href="#when-i-display-or-convert-an-image-i-get-memory-allocation-error-what-can-i-do" id="id10" name="id10">10) When I display or convert an image, I get Memory allocation error. What can I do?</a></li>
<li><a class="reference" href="#how-do-i-concatenate-three-images-left-to-right-with-no-borders-frames-or-text" id="id11" name="id11">11) How do I concatenate three images left-to-right with no borders, frames, or text?</a></li>
<li><a class="reference" href="#how-do-i-create-a-gif-animation-sequence-to-display-within-netscape" id="id12" name="id12">12) How do I create a GIF animation sequence to display within Netscape?</a></li>
<li><a class="reference" href="#when-i-display-a-postscript-image-white-borders-are-trimmed" id="id13" name="id13">13) When I display a <em>PostScript</em> image, white borders are trimmed.</a></li>
<li><a class="reference" href="#what-are-visual-image-directories-how-do-i-use-them" id="id14" name="id14">14) What are visual image directories? How do I use them?</a></li>
<li><a class="reference" href="#how-can-i-include-the-window-frame-when-importing-a-window" id="id15" name="id15">15) How can I include the window frame when importing a window?</a></li>
<li><a class="reference" href="#i-displayed-an-image-and-it-appears-as-one-solid-color-what-did-i-do-wrong" id="id16" name="id16">16) I displayed an image and it appears as one solid color. What did I do wrong?</a></li>
<li><a class="reference" href="#i-received-the-following-message-library-is-not-available" id="id17" name="id17">17) I received the following message, &quot;???? library is not available...&quot;.</a></li>
<li><a class="reference" href="#i-want-to-inspect-the-values-of-the-matte-channel-within-my-image" id="id18" name="id18">18) I want to inspect the values of the matte channel within my image.</a></li>
<li><a class="reference" href="#how-can-i-add-one-of-those-cool-bevels-to-my-image-that-i-see-used-on-the-web" id="id19" name="id19">19) How can I add one of those cool bevels to my image that I see used on the Web?</a></li>
<li><a class="reference" href="#i-try-to-launch-display-from-my-window-manager-and-it-fails-what-s-up" id="id20" name="id20">20) I try to launch display from my window manager and it fails. What's up?</a></li>
<li><a class="reference" href="#how-can-i-make-postscript-text-look-good" id="id21" name="id21">21)  How can I make Postscript text look good?</a></li>
<li><a class="reference" href="#how-can-i-annotate-an-image-with-text-that-is-2-to-3-inches-tall" id="id22" name="id22">22) How can I annotate an image with text that is 2 to 3 inches tall?</a></li>
<li><a class="reference" href="#how-can-i-convert-my-gif-animation-sequence-to-individual-image-files" id="id23" name="id23">23) How can I convert my GIF animation sequence to individual image files?</a></li>
<li><a class="reference" href="#how-can-i-remove-the-background-that-prints-around-my-image-when-i-display-it-with-netscape" id="id24" name="id24">24) How can I remove the background that prints around my image when I display it with Netscape?</a></li>
<li><a class="reference" href="#how-do-i-create-a-gif-or-png-image-with-web-safe-colors" id="id25" name="id25">25) How do I create a GIF or PNG image with Web safe colors?</a></li>
<li><a class="reference" href="#how-come-adobe-acrobat-2-1-can-t-read-graphicsmagick-s-pdf-format" id="id26" name="id26">26) How come Adobe Acrobat 2.1 can't read GraphicsMagick's PDF format?</a></li>
<li><a class="reference" href="#how-can-i-add-a-matte-layer-to-my-image" id="id27" name="id27">27) How can I add a matte layer to my image?</a></li>
<li><a class="reference" href="#how-can-i-draw-with-text-using-convert-under-windows-nt" id="id28" name="id28">28) How can I draw with text using 'convert' under Windows NT?</a></li>
<li><a class="reference" href="#why-are-my-jpeg-files-larger-than-expected" id="id29" name="id29">29) Why are my JPEG files larger than expected?</a></li>
<li><a class="reference" href="#how-do-i-extract-a-single-image-from-a-multi-image-file" id="id30" name="id30">30) How do I extract a single image from a multi-image file?</a></li>
</ul>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id1" id="how-does-graphicsmagick-differ-from-imagemagick" name="how-does-graphicsmagick-differ-from-imagemagick">1) How does GraphicsMagick differ from ImageMagick?</a></h1>
<p><em>GraphicsMagick</em> is originally based on ImageMagick 5.5.2. Other than
utilities being executed as sub-commands of the 'gm' command, the
command-line syntax and programming APIs remain entirely upward
compatible with ImageMagick 5.5.2. A better question might be &quot;<em>How does
ImageMagick differ from ImageMagick?</em>&quot; since ImageMagick continues to
alter and evolve its interfaces so they are no longer completely
compatible with earlier versions. While GraphicsMagick also adds new
features, it does so in a way which assures that existing features work
as they did before. GraphicsMagick maintains a stable release branch,
maintains a detailed ChangeLog, and maintains a stable source repository
with complete version history so that changes are controlled, and changes
between releases are accurately described. ImageMagick does not offer
this. Since GraphicsMagick is more stable, more time has been spent
optimizing and debugging its code. GraphicsMagick is often faster than
ImageMagick. ImageMagick focuses on adding new functionality and features.</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id2" id="i-received-the-following-message-delegation-failed-what-does-it-mean" name="i-received-the-following-message-delegation-failed-what-does-it-mean">2) I received the following message, &quot;?????? delegation failed ...&quot;. What does it mean?</a></h1>
<p><em>GraphicsMagick</em> uses several freely available packages to perform the
translation of certain image formats (<em>PostScript</em>, <em>MPEG</em>, etc.). Make
sure these packages are available as described in the <a class="reference" href="README.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 <em>PostScript</em>, verify that Ghostscript supports the <em>pnmraw</em> or
<em>ppmraw</em> device (<tt class="docutils literal"><span class="pre">gs</span> <span class="pre">-h</span></tt>) and that the document contains valid
<em>PostScript</em> statements (<tt class="docutils literal"><span class="pre">gs</span> <span class="pre">image.ps</span></tt>).</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id3" id="how-can-i-improve-the-appearance-of-24-bit-images-displayed-on-my-colormapped-x-server" name="how-can-i-improve-the-appearance-of-24-bit-images-displayed-on-my-colormapped-x-server">3) How can I improve the appearance of 24-bit images displayed on my colormapped /X server/?</a></h1>
<p>If you have a colormapped X server, 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 class="reference" 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 X server. The colors in your image may
be very different than the shared colors and the results may be visually
unsatisfactory. Try</p>
<pre class="literal-block">
gm 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>If you intend to view an image frequently, reduce the number of colors to
match the resolution of your X server once and write to a new image. Then
display this new image. For example,</p>
<pre class="literal-block">
gm convert -colors 256 -dither image.jpeg image.miff
gm 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>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id4" id="how-do-i-set-the-transparency-index-in-a-gif-image-so-it-displays-properly-within-mozilla" name="how-do-i-set-the-transparency-index-in-a-gif-image-so-it-displays-properly-within-mozilla">4) How do I set the transparency index in a GIF image so it displays properly within Mozilla?</a></h1>
<p>Display your GIF image with <a class="reference" href="display.html">display</a>. Choose <em>Matte</em> from the <em>Image
Edit</em> command menu and identify a pixel that has the <em>transparency</em>
color. Press <em>Method</em> and select a matte edit method from a pop-up menu.
Choose from these methods:</p>
<ul class="simple">
<li>point</li>
<li>replace</li>
<li>floodfill</li>
</ul>
<p>The <em>point</em> method changes the matte value of any pixel selected with the
pointer until the button is is released. The <em>replace</em> method changes the
matte value of any pixel that matches the color of the pixel you select
with a button press. <em>Floodfill</em> 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 <em>Save</em> from the command menu and write your GIF image to
a file. <strong>Note that setting transparency works best on a TrueColor or
DirectColor visual</strong>. If your server only exports colormapped visuals you
will need to use a <em>Standard Colormap</em> to set transparency.</p>
<pre class="literal-block">
xstdcmap -best
gm display -map list image.gif
[ choose Matte Edit ]
[ select your transparent pixel then press Return ]
[ choose Save '
</pre>
<p>If you do not have the <em>xstdcmap(1)</em> program, try</p>
<pre class="literal-block">
gm display -visual TrueColor image.gif
</pre>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id5" id="how-can-i-stop-the-filenames-from-changing-in-the-title-bar-of-the-animate-1-image-window" name="how-can-i-stop-the-filenames-from-changing-in-the-title-bar-of-the-animate-1-image-window">5) How can I stop the filenames from changing in the title bar of the animate(1) image window?</a></h1>
<p><a class="reference" 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 <em>-title</em>:</p>
<pre class="literal-block">
gm animate -title &quot;My Image Sequence&quot; images.
</pre>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id6" id="the-image-grabbed-by-import-1-does-not-look-like-the-image-on-my-x-server-what-s-wrong" name="the-image-grabbed-by-import-1-does-not-look-like-the-image-on-my-x-server-what-s-wrong">6) The image grabbed by import(1) does not look like the image on my X server. What's wrong?</a></h1>
<p>Use the <em>-descend</em> option:</p>
<pre class="literal-block">
gm import -descend image.miff
</pre>
<p>or set this X resource:</p>
<pre class="literal-block">
gm import.descend: True
</pre>
<p>By default, <a class="reference" href="import.html">import</a> quickly grabs the image from the X server. 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
<em>-descend</em>, <a class="reference" 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>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id7" id="how-do-i-animate-a-digital-yuv-image-sequence" name="how-do-i-animate-a-digital-yuv-image-sequence">7) How do I animate a digital YUV image sequence?</a></h1>
<p>Suppose your sequence is 72 352x240 frames titled frame0.Y, frame0.U,
frame0.V, frame1.Y, frame1.U, etc. Use this command:</p>
<pre class="literal-block">
gm animate -geometry 352x240 -scene 0-71 yuv3:frame%d
</pre>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id8" id="how-do-i-view-only-the-red-channel-of-an-rgb-image" name="how-do-i-view-only-the-red-channel-of-an-rgb-image">8) How do I view only the red channel of an RGB image?</a></h1>
<p>Use the <em>-gamma</em> option, for example,</p>
<pre class="literal-block">
gm display -gamma 1.0,0.0,0.0 image.miff
</pre>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id9" id="how-do-i-change-the-default-postscript-page-size" name="how-do-i-change-the-default-postscript-page-size">9) How do I change the default <em>PostScript</em> page size?</a></h1>
<p>The default dimensions of a <em>PostScript</em> page is 612x792. If you prefer
another default, change the page geometries (PSPageGeometry) in
<cite>magick/image.h</cite> and recompile.</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id10" id="when-i-display-or-convert-an-image-i-get-memory-allocation-error-what-can-i-do" name="when-i-display-or-convert-an-image-i-get-memory-allocation-error-what-can-i-do">10) When I display or convert an image, I get Memory allocation error. What can I do?</a></h1>
<p>Memory allocation is a complex topic in GraphicsMagick and image
processing requires a lot of memory. GraphicsMagick tries to take best
advantage of the resources available by optimizing its use of <em>virtual</em>
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 &quot;swap&quot; under Unix, or a &quot;page file&quot; under
Windows). In addition to the RAM and the paging area, GraphicsMagick 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.</p>
<p>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. Failures of small memory allocations
are generally considered fatal by GraphicsMagick. 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, GraphicsMagick 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. <cite>/var/tmp</cite>) 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. Use the MAGICK_TMPDIR
environment variable to specify a directory for GraphicsMagick to write
its temporary files.</p>
<p>If the temporary file directory is too small, or is itself mapped to the
system's paging area (no win!), then GraphicsMagick will fail to allocate
more virtual memory via the temporary file and will return an error.</p>
<p>The single biggest factor in how much memory is required by
GraphicsMagick 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:</p>
<blockquote>
<table border="1" class="docutils">
<colgroup>
<col width="46%" />
<col width="54%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">QuantumDepth</th>
<th class="head">Virtual Memory</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>8</td>
<td>3MB</td>
</tr>
<tr><td>16</td>
<td>8MB</td>
</tr>
<tr><td>32</td>
<td>15MB</td>
</tr>
</tbody>
</table>
</blockquote>
<p>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.</p>
<p><em>GraphicsMagick</em> is designed to be general purpose. It can display many
image storage formats (<em>Monochrome</em>, <em>PseudoColor</em>, or <em>TrueColor</em>) on
many different types of X visuals (<em>StaticGray, StaticColor, PseudoColor,
GrayScale, DirectColor,</em> or <em>TrueColor</em>). To support all these
combinations of image storage formats and X visuals, extra memory is
required. Additionally, <a class="reference" href="animate.html">animate</a> and <a class="reference" href="montage.html">montage</a> store an entire image
sequence in memory.</p>
<p>It is recommended that systems used to run <em>GraphicsMagick</em> 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. GraphicsMagick is proven to be far more efficient at
processing huge images when it is compiled as a 64-bit application on a
64-bit capable CPU. 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
GraphicsMagick is able to complete an operation. With sufficient free
disk space, GraphicsMagick is primarily limited by your CPU, your
operating system's ability to address memory, and your degree of
patience. GraphicsMagick has been used to process RGB images 64K by 64K
pixels in size!</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id11" id="how-do-i-concatenate-three-images-left-to-right-with-no-borders-frames-or-text" name="how-do-i-concatenate-three-images-left-to-right-with-no-borders-frames-or-text">11) How do I concatenate three images left-to-right with no borders, frames, or text?</a></h1>
<p>Assume your three images are called image1.ppm, image2.ppm, and
image3.ppm. Type</p>
<pre class="literal-block">
gm montage -mode concatenate -tile 3x1 image1.ppm image2.ppm \
  image3.ppm concatenated.miff
</pre>
<p>To concatenate the images top-to-bottom, use -tile 1x3.</p>
<p>For more control over the placement of an image, use <a class="reference" href="composite.html">composite</a>. First
create a matte image and position your images onto the matte. For
example,</p>
<pre class="literal-block">
gm convert -size 350x500 xc:black composite.miff
gm composite -geometry +0+0 composite.miff image1.gif composite.miff
gm composite -geometry &quot;+1&quot;00+0 composite.miff image2.gif composite.miff
gm composite -geometry +0+300 composite.miff image3.gif composite.miff
gm composite -geometry +0+375 composite.miff image4.gif composite.miff
</pre>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id12" id="how-do-i-create-a-gif-animation-sequence-to-display-within-netscape" name="how-do-i-create-a-gif-animation-sequence-to-display-within-netscape">12) How do I create a GIF animation sequence to display within Netscape?</a></h1>
<p>Use <a class="reference" href="convert.html">convert</a> with the <em>-delay</em> and <em>-page</em> options. The <em>-delay</em> option
is used to specify the delay in <em>1/100ths of a second</em> between the
display of each frame of the animation. For example,</p>
<pre class="literal-block">
gm 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 class="literal-block">
gm convert -delay 20 frame1.gif -delay 10 frame2.gif \
  -delay 5 frame3.gif animation.gif
</pre>
<p>Use <em>-page</em> to specify the <em>left</em> and <em>top</em> locations of the image frame</p>
<pre class="literal-block">
gm convert frame1.gif -page +50&quot;+1&quot;00 frame2.gif -page +0&quot;+1&quot;00 \
  frame3.gif animation.gif
</pre>
<p>Finally, if you want the image to loop within <em>Netscape</em>, use <em>-loop</em></p>
<pre class="literal-block">
gm convert -loop 50 frame*.gif animation.gif
</pre>
<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
<em>+adjoin</em></p>
<pre class="literal-block">
gm convert +adjoin images.* frames%d.gif
</pre>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id13" id="when-i-display-a-postscript-image-white-borders-are-trimmed" name="when-i-display-a-postscript-image-white-borders-are-trimmed">13) When I display a <em>PostScript</em> image, white borders are trimmed.</a></h1>
<p><em>GraphicsMagick</em> automatically trims any <em>PostScript</em> image as defined by
the bounding box. To preempt this behavior, remove the bounding box
statement from the <em>Postscript</em> or explicitly set the page size. For
example,</p>
<pre class="literal-block">
gm display -page letter image.ps
</pre>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id14" id="what-are-visual-image-directories-how-do-i-use-them" name="what-are-visual-image-directories-how-do-i-use-them">14) What are visual image directories? How do I use them?</a></h1>
<p>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:</p>
<pre class="literal-block">
gm montage *.jpg directory.vid
gm convert 'vid:*.jpg' directory.vid
</pre>
<p>Of course you can substitute any filenames you desire. <a class="reference" 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 class="reference" href="convert.html">convert</a>.</p>
<p>Next display the directory:</p>
<pre class="literal-block">
gm 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 class="literal-block">
gm display 'vid:*.jpg'
</pre>
<p>You can also select <em>Visual Image...</em> from the <em>File</em> menu of the command
widget.</p>
<p><em>Note, that creating a VID is time consuming</em>. Creating them on-the-fly
within <a class="reference" href="display.html">display</a> may be less convenient than using <a class="reference" href="montage.html">montage</a> or <a class="reference" href="convert.html">convert</a> .
Also, if you create them with <a class="reference" href="montage.html">montage</a>. or <a class="reference" 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 class="literal-block">
gm display vid:movie.mpg
</pre>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id15" id="how-can-i-include-the-window-frame-when-importing-a-window" name="how-can-i-include-the-window-frame-when-importing-a-window">15) How can I include the window frame when importing a window?</a></h1>
<p>I use the window ID reported by <em>xwininfo(1)</em> with import and it does not
include the window manager frame as expected. How can I save the window
with its frame?</p>
<p>By default, <em>xwininfo(1)</em> returns the ID of the window you click on. Use
the <em>-frame</em> option to get the reparented window ID:</p>
<pre class="literal-block">
xwininfo -frame
</pre>
<p>You can then use the returned window ID with <a class="reference" href="import.html">import</a>:</p>
<pre class="literal-block">
gm import -frame -window ID window.miff
</pre>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id16" id="i-displayed-an-image-and-it-appears-as-one-solid-color-what-did-i-do-wrong" name="i-displayed-an-image-and-it-appears-as-one-solid-color-what-did-i-do-wrong">16) I displayed an image and it appears as one solid color. What did I do wrong?</a></h1>
<p>A blank image generally means that the image is either corrupt or it has
a matte channel and the matte values are all zero. <em>GraphicsMagick</em>
treats a matte value of zero as completely transparent. To determine if
this is the problem, try</p>
<pre class="literal-block">
gm display +matte image.miff
</pre>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id17" id="i-received-the-following-message-library-is-not-available" name="i-received-the-following-message-library-is-not-available">17) I received the following message, &quot;???? library is not available...&quot;.</a></h1>
<p><em>GraphicsMagick</em> 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 <em>GraphicsMagick</em> utilities. See <a class="reference" href="README.html">README</a> for the
location of these libraries and compiling instructions.</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id18" id="i-want-to-inspect-the-values-of-the-matte-channel-within-my-image" name="i-want-to-inspect-the-values-of-the-matte-channel-within-my-image">18) I want to inspect the values of the matte channel within my image.</a></h1>
<p>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:</p>
<pre class="literal-block">
gm convert image.tiff image.matte
gm display -size 640x480 gray:image.matte
</pre>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id19" id="how-can-i-add-one-of-those-cool-bevels-to-my-image-that-i-see-used-on-the-web" name="how-can-i-add-one-of-those-cool-bevels-to-my-image-that-i-see-used-on-the-web">19) How can I add one of those cool bevels to my image that I see used on the Web?</a></h1>
<p>There are four types of ornamental borders you can add to your image
with GraphicsMagick. Each is listed below with the procedure to use
them with your image.</p>
<ul>
<li><p class="first">Surround the image with a border of color</p>
<p>Use -border followed by the width and height of the border. Set the
color of the border with -bordercolor. For example, to surround your
image with a red border that is 25 pixels wide on each side, use</p>
<pre class="literal-block">
gm convert -bordercolor red -border 25x25 image.jpg image.gif
</pre>
</li>
<li><p class="first">Lighten or darken image edges to create a 3-D effect</p>
<p>Use -raise followed by the width of the image edge. For example, to
create a raised edge effect of 25 pixels, use</p>
<pre class="literal-block">
gm convert -raise 25 image.jpg image.gif
</pre>
</li>
<li><p class="first">Surround the image with an ornamental frame</p>
<p>Use -frame followed by the width and height of the frame. Set the
color of the border with -mattecolor. For example, to surround your
image with a gray frame that is 25 pixels wide on each side, use</p>
<pre class="literal-block">
gm convert -mattecolor gray -frame 25x25 image.jpg image.gif
</pre>
</li>
<li><p class="first">Surround the image with a raised or sunken bevel</p>
<p>Use -frame followed by the width and height of the bevel. Set the
color of the border with -mattecolor. 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 class="literal-block">
gm convert -mattecolor gray -frame 25x25+0+25 image.jpg image.gif
gm convert -mattecolor gray -frame 25x25+25+0 image.jpg image.gif
</pre>
</li>
</ul>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id20" id="i-try-to-launch-display-from-my-window-manager-and-it-fails-what-s-up" name="i-try-to-launch-display-from-my-window-manager-and-it-fails-what-s-up">20) I try to launch display from my window manager and it fails. What's up?</a></h1>
<p><a class="reference" href="display.html">Display</a> determines if it is executing interactively and behaves
differently depending on the result. To convince display &lt;display.html&gt;
you are running in an interactive environment when launching from a
window manager, use either of</p>
<pre class="literal-block">
display logo:Untitled
display &lt; /dev/console
</pre>
<p>Note that this issue no longer exists as of GraphicsMagick 1.2.</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id21" id="how-can-i-make-postscript-text-look-good" name="how-can-i-make-postscript-text-look-good">21)  How can I make Postscript text look good?</a></h1>
<p>Simple. Increase the dots-per-inch when converting and sub-sample:</p>
<pre class="literal-block">
gm 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 -density 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 <em>-geometry</em> 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 jaggies you would otherwise get from a normal
postscript to image conversion.</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id22" id="how-can-i-annotate-an-image-with-text-that-is-2-to-3-inches-tall" name="how-can-i-annotate-an-image-with-text-that-is-2-to-3-inches-tall">22) How can I annotate an image with text that is 2 to 3 inches tall?</a></h1>
<p>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</p>
<pre class="literal-block">
xlsfonts -fn '*-0-0-0-0-*'
</pre>
<p>Or if you are using <a class="reference" href="display.html">display</a>, use the font pattern above within the Font
Browser (see Image Edit-&gt;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 <em>Helvetica</em> text:</p>
<pre class="literal-block">
gm 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 GraphicsMagick, just
increase your pointsize and/or density:</p>
<pre class="literal-block">
gm convert -font Helvetica -pointsize 100 -density 300 ...
</pre>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id23" id="how-can-i-convert-my-gif-animation-sequence-to-individual-image-files" name="how-can-i-convert-my-gif-animation-sequence-to-individual-image-files">23) How can I convert my GIF animation sequence to individual image files?</a></h1>
<p>Use the scene embedded file format with <a class="reference" href="convert.html">convert</a>:</p>
<pre class="literal-block">
gm convert animation.gif frame%02d.gif
</pre>
<p>The resulting image files are titled frame01.gif, frame02.gif,
frame03.gif, etc.</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id24" id="how-can-i-remove-the-background-that-prints-around-my-image-when-i-display-it-with-netscape" name="how-can-i-remove-the-background-that-prints-around-my-image-when-i-display-it-with-netscape">24) How can I remove the background that prints around my image when I display it with Netscape?</a></h1>
<p>Use the +page option of the <a class="reference" href="convert.html">convert</a> command:</p>
<pre class="literal-block">
gm convert +page alpha.gif beta.gif
</pre>
<p>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 GraphicsMagick. Either way, +page
removes the unwanted page offset and Netscape should behave as
expected.</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id25" id="how-do-i-create-a-gif-or-png-image-with-web-safe-colors" name="how-do-i-create-a-gif-or-png-image-with-web-safe-colors">25) How do I create a GIF or PNG image with Web safe colors?</a></h1>
<p>Web safe colors are not normally needed any more since almost all
computers now have true color displays. However, this FAQ may still be
useful.</p>
<p>Use the -map option of the <a class="reference" href="convert.html">convert</a> command:</p>
<pre class="literal-block">
gm convert -map netscape: alpha.gif beta.gif
</pre>
<p>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.</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id26" id="how-come-adobe-acrobat-2-1-can-t-read-graphicsmagick-s-pdf-format" name="how-come-adobe-acrobat-2-1-can-t-read-graphicsmagick-s-pdf-format">26) How come Adobe Acrobat 2.1 can't read GraphicsMagick's PDF format?</a></h1>
<p>The default PDF compression is <em>Zip</em>. 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:</p>
<pre class="literal-block">
gm convert +compress images.tiff image.pdf
</pre>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id27" id="how-can-i-add-a-matte-layer-to-my-image" name="how-can-i-add-a-matte-layer-to-my-image">27) How can I add a matte layer to my image?</a></h1>
<p>One way is to use a bitmap as your transparency mask First, use the
-matte option to add an all-opaque opacity channel, then use the
composite utility to copy the graylevel samples from the mask file
into your new opacity channel:</p>
<pre class="literal-block">
gm convert image.gif -matte temp.miff
gm composite -compose CopyOpacity mask.xbm temp.miff transparent.gif
</pre>
<p>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.</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id28" id="how-can-i-draw-with-text-using-convert-under-windows-nt" name="how-can-i-draw-with-text-using-convert-under-windows-nt">28) How can I draw with text using 'convert' under Windows NT?</a></h1>
<p>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):</p>
<pre class="literal-block">
gm convert -font Arial -fill blue -draw &quot;text 10,10 'your text here'&quot; \
   d:\test.tif png:d:\test.png
</pre>
<p>and here is another example which is reported to work (which relies
on Ghostscript's 'gs' program to installed):</p>
<pre class="literal-block">
gm convert.exe -pointsize 18 -draw &quot;text 0,0 &quot;This is my text!&quot;&quot; \
  C:\blank.gif c:\text.gif
</pre>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id29" id="why-are-my-jpeg-files-larger-than-expected" name="why-are-my-jpeg-files-larger-than-expected">29) Why are my JPEG files larger than expected?</a></h1>
<p>Your JPEG files may contain embedded &quot;profiles&quot; such as Exif or IPTC,
or they may contain uncompressed thumbnails. You can use the <cite>+profile
&quot;*&quot;</cite> commandline option or an equivalent API method to remove them.</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id30" id="how-do-i-extract-a-single-image-from-a-multi-image-file" name="how-do-i-extract-a-single-image-from-a-multi-image-file">30) How do I extract a single image from a multi-image file?</a></h1>
<p>Use a square-bracket syntax to indicate which frame or frames you
want. For example,</p>
<pre class="literal-block">
gm convert &quot;Image.gif[0]&quot; 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 class="docutils" />
<div class="line-block">
<div class="line">Copyright (C) 2002 - 2008 GraphicsMagick Group</div>
<div class="line">Copyright (C) 2002 ImageMagick Studio</div>
<div class="line">Copyright (C) 1999 E. I. du Pont de Nemours and Company</div>
</div>
<p>This program is covered by multiple licenses, which are described in
Copyright.txt. You should have received a copy of Copyright.txt with this
package; otherwise see <a class="reference" href="http://www.graphicsmagick.org/www/Copyright.html">http://www.graphicsmagick.org/www/Copyright.html</a>.</p>
</div>
</div>
<div class="footer">
<hr class="footer" />
Generated on: 2008-03-10 03:31 UTC.

</div>
</body>
</html>