github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/third_path/graphics-magick/share/doc/GraphicsMagick/www/FAQ.html (about)

     1  <?xml version="1.0" encoding="utf-8" ?>
     2  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     3  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     4  <head>
     5  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     6  <meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
     7  <title>GraphicsMagick FAQ</title>
     8  <link rel="stylesheet" href="docutils-articles.css" type="text/css" />
     9  </head>
    10  <body>
    11  
    12  <div class="banner">
    13  <img src="images/gm-107x76.png" alt="GraphicMagick logo" width="107" height="76" />
    14  <span class="title">GraphicsMagick</span>
    15  <form action="http://www.google.com/search">
    16  	<input type="hidden" name="domains" value="www.graphicsmagick.org" />
    17  	<input type="hidden" name="sitesearch" value="www.graphicsmagick.org" />
    18      <span class="nowrap"><input type="text" name="q" size="25" maxlength="255" />&nbsp;<input type="submit" name="sa" value="Search" /></span>
    19  </form>
    20  </div>
    21  
    22  <div class="navmenu">
    23  <ul>
    24  <li><a href="index.html">Home</a></li>
    25  <li><a href="project.html">Project</a></li>
    26  <li><a href="download.html">Download</a></li>
    27  <li><a href="README.html">Install</a></li>
    28  <li><a href="Hg.html">Source</a></li>
    29  <li><a href="NEWS.html">News</a> </li>
    30  <li><a href="utilities.html">Utilities</a></li>
    31  <li><a href="programming.html">Programming</a></li>
    32  <li><a href="reference.html">Reference</a></li>
    33  </ul>
    34  </div>
    35  <div class="document" id="graphicsmagick-faq">
    36  <h1 class="title">GraphicsMagick FAQ</h1>
    37  
    38  <!-- -*- mode: rst -*- -->
    39  <!-- This text is in reStucturedText format, so it may look a bit odd. -->
    40  <!-- See http://docutils.sourceforge.net/rst.html for details. -->
    41  <!-- URL links -->
    42  <div class="contents topic" id="faq-contents">
    43  <p class="topic-title first">FAQ Contents</p>
    44  <ul class="simple">
    45  <li><a class="reference internal" href="#how-does-graphicsmagick-differ-from-imagemagick" id="id1">How does GraphicsMagick differ from ImageMagick?</a></li>
    46  <li><a class="reference internal" href="#how-often-does-graphicsmagick-pick-up-new-code-from-imagemagick" id="id2">How often does GraphicsMagick pick up new code from ImageMagick?</a></li>
    47  <li><a class="reference internal" href="#are-there-any-plans-to-use-opencl-or-cuda-to-use-a-gpu" id="id3">Are there any plans to use OpenCL or CUDA to use a GPU?</a></li>
    48  <li><a class="reference internal" href="#what-is-the-meaning-of-magick" id="id4">What is the meaning of &quot;magick&quot;?</a></li>
    49  <li><a class="reference internal" href="#how-can-i-process-many-files-at-once" id="id5">How can I process many files at once?</a></li>
    50  <li><a class="reference internal" href="#i-received-the-following-message-delegation-failed-what-does-it-mean" id="id6">I received the following message, &quot;?????? delegation failed ...&quot;. What does it mean?</a></li>
    51  <li><a class="reference internal" href="#how-do-i-set-the-transparency-index-in-a-gif-image-so-it-displays-properly-within-mozilla" id="id7">How do I set the transparency index in a GIF image so it displays properly within Mozilla?</a></li>
    52  <li><a class="reference internal" href="#how-can-i-stop-the-filenames-from-changing-in-the-title-bar-of-the-animate-1-image-window" id="id8">How can I stop the filenames from changing in the title bar of the animate(1) image window?</a></li>
    53  <li><a class="reference internal" href="#the-image-grabbed-by-import-1-does-not-look-like-the-image-on-my-x-server-what-s-wrong" id="id9">The image grabbed by import(1) does not look like the image on my X server. What's wrong?</a></li>
    54  <li><a class="reference internal" href="#how-do-i-animate-a-digital-yuv-image-sequence" id="id10">How do I animate a digital YUV image sequence?</a></li>
    55  <li><a class="reference internal" href="#how-do-i-change-the-default-postscript-page-size" id="id11">How do I change the default <em>PostScript</em> page size?</a></li>
    56  <li><a class="reference internal" href="#i-get-a-memory-allocation-error-what-can-i-do" id="id12">I get a memory allocation error. What can I do?</a></li>
    57  <li><a class="reference internal" href="#how-do-i-concatenate-three-images-left-to-right-with-no-borders-frames-or-text" id="id13">How do I concatenate three images left-to-right with no borders, frames, or text?</a></li>
    58  <li><a class="reference internal" href="#how-do-i-create-a-gif-animation-sequence-to-display-within-firefox" id="id14">How do I create a GIF animation sequence to display within Firefox?</a></li>
    59  <li><a class="reference internal" href="#when-i-display-a-postscript-image-white-borders-are-trimmed" id="id15">When I display a <em>PostScript</em> image, white borders are trimmed.</a></li>
    60  <li><a class="reference internal" href="#what-are-visual-image-directories-how-do-i-use-them" id="id16">What are visual image directories? How do I use them?</a></li>
    61  <li><a class="reference internal" href="#how-can-i-include-the-window-frame-when-importing-a-window" id="id17">How can I include the window frame when importing a window?</a></li>
    62  <li><a class="reference internal" href="#i-displayed-an-image-and-it-appears-as-one-solid-color-what-did-i-do-wrong" id="id18">I displayed an image and it appears as one solid color. What did I do wrong?</a></li>
    63  <li><a class="reference internal" href="#i-received-the-following-message-library-is-not-available" id="id19">I received the following message, &quot;???? library is not available...&quot;.</a></li>
    64  <li><a class="reference internal" href="#i-want-to-inspect-the-values-of-the-matte-channel-within-my-image" id="id20">I want to inspect the values of the matte channel within my image.</a></li>
    65  <li><a class="reference internal" href="#how-can-i-add-one-of-those-cool-bevels-to-my-image-that-i-see-used-on-the-web" id="id21">How can I add one of those cool bevels to my image that I see used on the Web?</a></li>
    66  <li><a class="reference internal" href="#i-try-to-launch-display-from-my-window-manager-and-it-fails-what-s-up" id="id22">I try to launch display from my window manager and it fails. What's up?</a></li>
    67  <li><a class="reference internal" href="#how-can-i-make-postscript-text-look-good" id="id23">How can I make Postscript text look good?</a></li>
    68  <li><a class="reference internal" href="#how-can-i-annotate-an-image-with-text-that-is-2-to-3-inches-tall" id="id24">How can I annotate an image with text that is 2 to 3 inches tall?</a></li>
    69  <li><a class="reference internal" href="#how-can-i-convert-my-gif-animation-sequence-to-individual-image-files" id="id25">How can I convert my GIF animation sequence to individual image files?</a></li>
    70  <li><a class="reference internal" href="#how-can-i-remove-the-background-that-prints-around-my-image-when-i-display-it-with-firefox" id="id26">How can I remove the background that prints around my image when I display it with Firefox?</a></li>
    71  <li><a class="reference internal" href="#how-do-i-create-a-gif-or-png-image-with-web-safe-colors" id="id27">How do I create a GIF or PNG image with Web safe colors?</a></li>
    72  <li><a class="reference internal" href="#how-can-i-add-a-matte-layer-to-my-image" id="id28">How can I add a matte layer to my image?</a></li>
    73  <li><a class="reference internal" href="#how-can-i-draw-with-text-using-convert-under-windows-nt" id="id29">How can I draw with text using 'convert' under Windows NT?</a></li>
    74  <li><a class="reference internal" href="#why-are-my-jpeg-files-larger-than-expected" id="id30">Why are my JPEG files larger than expected?</a></li>
    75  <li><a class="reference internal" href="#how-do-i-extract-a-single-image-from-a-multi-image-file" id="id31">How do I extract a single image from a multi-image file?</a></li>
    76  <li><a class="reference internal" href="#how-can-i-extract-and-combine-cmyk-channels-in-a-cmyk-image" id="id32">How can I extract and combine CMYK channels in a CMYK image?</a></li>
    77  <li><a class="reference internal" href="#how-can-i-create-a-solid-or-patterned-canvas-image" id="id33">How can I create a solid or patterned canvas image?</a></li>
    78  <li><a class="reference internal" href="#what-does-identify-report" id="id34">What does <cite>identify</cite> report?</a></li>
    79  </ul>
    80  </div>
    81  <div class="section" id="how-does-graphicsmagick-differ-from-imagemagick">
    82  <h1><a class="toc-backref" href="#id1">How does GraphicsMagick differ from ImageMagick?</a></h1>
    83  <p><em>GraphicsMagick</em> is originally based on (forked from) ImageMagick
    84  5.5.2 in November 2002, from the version distributed by ImageMagick
    85  Studio LLC, which is itself forked in August 1999 from ImageMagick
    86  developed by E. I. du Pont de Nemours and Company starting in
    87  1992. Other than utilities being executed as sub-commands of the 'gm'
    88  command, the command-line syntax and programming APIs remain entirely
    89  upward compatible with ImageMagick 5.5.2. A better question might be
    90  &quot;<em>How does ImageMagick differ from ImageMagick?</em>&quot; since ImageMagick
    91  continues to alter and evolve its interfaces so they are no longer
    92  completely compatible with earlier versions. While GraphicsMagick also
    93  adds new features, it does so in a way which assures that existing
    94  features work as they did before. ImageMagick focuses on adding new
    95  functionality and features and has dramatically mutated several times
    96  since the fork.</p>
    97  <p>GraphicsMagick maintains a stable release branch, maintains a detailed
    98  ChangeLog, and maintains a stable source repository with complete version
    99  history so that changes are controlled, and changes between releases are
   100  accurately described. GraphicsMagick provides continued support for a
   101  release branch. ImageMagick does not offer any of these things.</p>
   102  <p>Since GraphicsMagick is more stable, more time has been spent optimizing
   103  and debugging its code.</p>
   104  <p>GraphicsMagick is much smaller than ImageMagick and has dramatically
   105  fewer dependencies on external libraries. For example, on the FreeBSD
   106  operating system, a fully-featured install of GraphicsMagick depends
   107  on 36 libraries whereas ImageMagick requires 64.  GraphicsMagick's
   108  installation footprint is 3-5X smaller than ImageMagick.</p>
   109  <p>GraphicsMagick is usually faster than ImageMagick. The baseline execution
   110  overhead for simple commands is much lower, and GraphicsMagick is also
   111  more efficient at dealing with large images.</p>
   112  </div>
   113  <div class="section" id="how-often-does-graphicsmagick-pick-up-new-code-from-imagemagick">
   114  <h1><a class="toc-backref" href="#id2">How often does GraphicsMagick pick up new code from ImageMagick?</a></h1>
   115  <p>GraphicsMagick never picks up new code from ImageMagick as distributed
   116  by ImageMagick Studio LLC. Not long after the GraphicsMagick project
   117  was started in November 2002, ImageMagick from ImageMagick Studio LLC
   118  abandoned the MIT X11 style license it had been using since 1992, and
   119  switched between several different licenses until it ended up with one
   120  based on the Apache license, which is intended to penalize projects
   121  which borrow some of its source code, or fork from it. Since that
   122  time, GraphicsMagick has not incorporated any ImageMagick source code.</p>
   123  <p>On November 27, 2003 ImageMagick Studio LLC applied to register
   124  &quot;ImageMagick&quot; as its trademark, and it was awarded this registered
   125  trademark (serial number 78333969) on August 30, 2005.  Those who
   126  re-distribute modified versions of &quot;ImageMagick&quot; (e.g. patched or
   127  improved) under license as &quot;ImageMagick&quot; now face the risk of
   128  arbitrary trademark infringement claims by ImageMagick Studio LLC.</p>
   129  <p>Authors of new features are encouraged to independently contribute
   130  their work to the GraphicsMagick project so that it can be released
   131  under GraphicsMagick's MIT X11 style license without additional
   132  encumberment.  In order for a work to be accepted, it must have been
   133  developed entirely outside the ImageMagick source base to avoid any
   134  possibility of copyright taint.</p>
   135  </div>
   136  <div class="section" id="are-there-any-plans-to-use-opencl-or-cuda-to-use-a-gpu">
   137  <h1><a class="toc-backref" href="#id3">Are there any plans to use OpenCL or CUDA to use a GPU?</a></h1>
   138  <p>It is well known that some math-intensive algorithms run very quickly
   139  on video-card (and stand-alone) GPUs.  Video card vendors encourage
   140  you to buy an expensive video card with quite a lot of installed RAM
   141  and modify applications to use the GPU via their proprietary or
   142  limited-purpose APIs.  GPUs are quite effective at producing images
   143  for real-time display, such as for video games and virtual reality.
   144  GraphicsMagick has been significantly updated to use multiple CPU
   145  cores to speed up the image processing, and work continues to thread
   146  the few remaining algorithms, or remove inefficiencies in algorithms
   147  which don't see as much speed-up as they should.  Linear speedup as
   148  cores are added is typical for CPU-bound algorithms on well-designed
   149  CPUs.  Regardless, <a class="reference external" href="http://en.wikipedia.org/wiki/Amdal%27s_law">Amdahl's law</a> is a significant factor
   150  in GraphicsMagick, with non-parallelizable code paths often dominating
   151  the time.</p>
   152  <p>It is my belief that stand-alone GPUs are a poor design (expensive,
   153  inefficient, failure-prone, bandwidth bottlenecked, lack
   154  functionality, are insecure, and are not supported in servers) and
   155  that multi-core CPUs will ultimately prevail.  Functionality which
   156  currently works best in a GPU will simply be integrated into
   157  tomorrow's multi-core CPUs and C compilers will naturally support that
   158  functionality.  Once GPU capabilities are integrated into CPUs, there
   159  will be no more need to develop specialized code for a GPU.  Today 16
   160  core CPUs are readily available for purchase in systems at reasonable
   161  prices, and this trend is certain to continue.</p>
   162  <p>Intel's <a class="reference external" href="http://en.wikipedia.org/wiki/Xeon_Phi">Xeon Phi</a> offers a
   163  61 core 'x86 CPU in a GPU-like plugin form-factor which provides over
   164  a TeraFLOP of performance.  Being based on power-hungry plug-in cards,
   165  this solution suffers from many of the issues associated with GPUs.
   166  However, since it supports OpenMP, it may be a suitable target for
   167  executing some GraphicsMagick algorithms. Effective use of Xeon Phi
   168  currently requires use of Intel's development tools so from that
   169  standpoint it is not much more open than GPUs.</p>
   170  <p>Future multi-core CPUs will use a similar amount of power to today's
   171  CPUs, will idle at very low power consumption levels, and will fit
   172  into a very small chassis.  Due to this trend, there is no value
   173  obtained by expending energy toward developing specialized code for
   174  today's GPUs.</p>
   175  </div>
   176  <div class="section" id="what-is-the-meaning-of-magick">
   177  <h1><a class="toc-backref" href="#id4">What is the meaning of &quot;magick&quot;?</a></h1>
   178  <p>According to the infamous British accultist <a class="reference external" href="http://en.wikipedia.org/wiki/Aleister_Crowley">Aleister Crowley</a>, the definition of
   179  <a class="reference external" href="http://en.wikipedia.org/wiki/Magick_(Aleister_Crowley)">magick</a> is
   180  &quot;the science and art of causing change to occur in conformity with the
   181  will&quot;.</p>
   182  </div>
   183  <div class="section" id="how-can-i-process-many-files-at-once">
   184  <h1><a class="toc-backref" href="#id5">How can I process many files at once?</a></h1>
   185  <p>Use 'gm mogrify'.  The 'mogrify' subcommand is designed to operate on
   186  any number of files in one command.  Normally 'mogrify' overwrites the
   187  input files but the <cite>-output-directory</cite> option (which must appear
   188  before any input file names!) allows sending the modified files to a
   189  different directory (which could be in a subdirectory).  For example:</p>
   190  <pre class="literal-block">
   191  gm mogrify -output-directory .thumbs -resize 320x200 *.jpg
   192  </pre>
   193  <p>If you encounter command line length limitations then you can have
   194  GraphicsMagick expand the file list by quoting the wildcard argument
   195  to prevent it from being expanded by your command shell:</p>
   196  <pre class="literal-block">
   197  gm mogrify -output-directory .thumbs -resize 320x200 &quot;*.jpg&quot;
   198  </pre>
   199  <p>and you can also retrieve a list of files to process from a text file
   200  (e.g. named 'files.txt') like:</p>
   201  <pre class="literal-block">
   202  gm mogrify -output-directory .thumbs -resize 320x200 &#64;files.txt
   203  </pre>
   204  <p>where files.txt has one line per file name.  If the input file paths
   205  contain relative sub-directory paths (e.g. &quot;foo/file1&quot;, &quot;bar/file2&quot;),
   206  you can instruct GraphicsMagick to create a similar subdirectory
   207  structure under the output directory by adding the
   208  <cite>-create-directories</cite> option:</p>
   209  <pre class="literal-block">
   210  gm mogrify -output-directory .thumbs -create-directories -resize 320x200 &#64;files.txt
   211  </pre>
   212  <p>Note that the algorithm used to generate output file names is quite
   213  simple.  If -output-directory is &quot;/foo&quot; and the file path is
   214  &quot;bar/none.jpg&quot; then the final path will be &quot;foo/bar/none.jpg&quot;.  Based
   215  on this it should be clear that when <cite>-output-directory</cite> is used, file
   216  paths should be relative paths rather than absolute paths or else the
   217  concatenation won't work.</p>
   218  </div>
   219  <div class="section" id="i-received-the-following-message-delegation-failed-what-does-it-mean">
   220  <h1><a class="toc-backref" href="#id6">I received the following message, &quot;?????? delegation failed ...&quot;. What does it mean?</a></h1>
   221  <p><em>GraphicsMagick</em> uses several freely available packages to perform the
   222  translation of certain image formats (<em>PostScript</em>, <em>MPEG</em>, etc.). Make
   223  sure these packages are available as described in the <a class="reference external" href="README.html">README</a> file. Also
   224  verify that you have plenty of temporary disk space. If not, set the
   225  MAGICK_TMPDIR (or TMPDIR) environment variable to an area where
   226  sufficient space is available. Finally, for <em>PostScript</em>, verify that
   227  Ghostscript supports the <em>pnmraw</em> or <em>ppmraw</em> device (<tt class="docutils literal">gs <span class="pre">-h</span></tt>) and that
   228  the document contains valid <em>PostScript</em> statements (<tt class="docutils literal">gs image.ps</tt>).</p>
   229  </div>
   230  <div class="section" id="how-do-i-set-the-transparency-index-in-a-gif-image-so-it-displays-properly-within-mozilla">
   231  <h1><a class="toc-backref" href="#id7">How do I set the transparency index in a GIF image so it displays properly within Mozilla?</a></h1>
   232  <p>Display your GIF image with <a class="reference external" href="display.html">display</a>. Choose <em>Matte</em> from the <em>Image
   233  Edit</em> command menu and identify a pixel that has the <em>transparency</em>
   234  color. Press <em>Method</em> and select a matte edit method from a pop-up menu.
   235  Choose from these methods:</p>
   236  <ul class="simple">
   237  <li>point</li>
   238  <li>replace</li>
   239  <li>floodfill</li>
   240  </ul>
   241  <p>The <em>point</em> method changes the matte value of any pixel selected with the
   242  pointer until the button is is released. The <em>replace</em> method changes the
   243  matte value of any pixel that matches the color of the pixel you select
   244  with a button press. <em>Floodfill</em> changes the matte value of any pixel
   245  that matches the color of the pixel you select with a button press and is
   246  a neighbor.</p>
   247  <p>Select your transparent pixel with the pointer and press a button. The
   248  image is redisplayed with any transparent pixels recolored to the
   249  background color. You can select other pixels or areas to force to
   250  transparent. When you are satisfied, press Return.</p>
   251  <p>Finally, choose <em>Save</em> from the command menu and write your GIF image to
   252  a file. <strong>Note that setting transparency works best on a TrueColor or
   253  DirectColor visual</strong>. If your server only exports colormapped visuals you
   254  will need to use a <em>Standard Colormap</em> to set transparency.</p>
   255  <pre class="literal-block">
   256  xstdcmap -best
   257  gm display -map list image.gif
   258  [ choose Matte Edit ]
   259  [ select your transparent pixel then press Return ]
   260  [ choose Save '
   261  </pre>
   262  <p>If you do not have the <em>xstdcmap(1)</em> program, try</p>
   263  <pre class="literal-block">
   264  gm display -visual TrueColor image.gif
   265  </pre>
   266  </div>
   267  <div class="section" id="how-can-i-stop-the-filenames-from-changing-in-the-title-bar-of-the-animate-1-image-window">
   268  <h1><a class="toc-backref" href="#id8">How can I stop the filenames from changing in the title bar of the animate(1) image window?</a></h1>
   269  <p><a class="reference external" href="animate.html">Animate</a> updates the image file name in the title bar of the image window
   270  as each image is displayed from the image sequence. To display just a
   271  single name that will not change, use <em>-title</em>:</p>
   272  <pre class="literal-block">
   273  gm animate -title &quot;My Image Sequence&quot; images.
   274  </pre>
   275  </div>
   276  <div class="section" id="the-image-grabbed-by-import-1-does-not-look-like-the-image-on-my-x-server-what-s-wrong">
   277  <h1><a class="toc-backref" href="#id9">The image grabbed by import(1) does not look like the image on my X server. What's wrong?</a></h1>
   278  <p>Use the <em>-descend</em> option:</p>
   279  <pre class="literal-block">
   280  gm import -descend image.miff
   281  </pre>
   282  <p>or set this X resource:</p>
   283  <pre class="literal-block">
   284  gm import.descend: True
   285  </pre>
   286  <p>By default, <a class="reference external" href="import.html">import</a> quickly grabs the image from the X server. However,
   287  it may not always have the correct colors in some areas. This can happen
   288  when a subwindow has a different colormap than its parent. With
   289  <em>-descend</em>, <a class="reference external" href="import.html">import</a> descends the window hierarchy. Descending involves
   290  grabbing the image and colormap of each window or subwindow associated
   291  with the window you select and compositing it on a blank canvas. This can
   292  be significantly slower than just grabbing the top-level window but
   293  ensures the correct image.</p>
   294  </div>
   295  <div class="section" id="how-do-i-animate-a-digital-yuv-image-sequence">
   296  <h1><a class="toc-backref" href="#id10">How do I animate a digital YUV image sequence?</a></h1>
   297  <p>Suppose your sequence is 72 352x240 frames titled frame0.Y, frame0.U,
   298  frame0.V, frame1.Y, frame1.U, etc. Use this command:</p>
   299  <pre class="literal-block">
   300  gm animate -geometry 352x240 -scene 0-71 yuv3:frame%d
   301  </pre>
   302  </div>
   303  <div class="section" id="how-do-i-change-the-default-postscript-page-size">
   304  <h1><a class="toc-backref" href="#id11">How do I change the default <em>PostScript</em> page size?</a></h1>
   305  <p>The default dimensions of a <em>PostScript</em> page is 612x792. If you prefer
   306  another default, change the page geometries (PSPageGeometry) in
   307  <cite>magick/image.h</cite> and recompile.</p>
   308  </div>
   309  <div class="section" id="i-get-a-memory-allocation-error-what-can-i-do">
   310  <h1><a class="toc-backref" href="#id12">I get a memory allocation error. What can I do?</a></h1>
   311  <p>Memory allocation is a complex topic in GraphicsMagick and image
   312  processing requires a lot of memory. GraphicsMagick tries to take best
   313  advantage of the resources available by optimizing its use of <em>virtual</em>
   314  memory. Virtual memory is normally the amount of RAM (Random Access
   315  Memory) available to the process plus the amount of free space in the
   316  system paging area (known as &quot;swap&quot; under Unix, or a &quot;page file&quot; under
   317  Windows). In addition to the RAM and the paging area, GraphicsMagick is
   318  able to expand the amount of virtual memory available by using
   319  memory-mapped files which cause the file to be treated as extra memory. A
   320  piece of hardware known as the Memory Management Unit (MMU) performs the
   321  magic which allows the system paging area and memory-mapped files to be
   322  treated as more memory by your system's CPU.</p>
   323  <p>Usually when a memory allocation error occurs, it is because the system's
   324  paging area is full, or the programs memory (heap) is fragmented badly
   325  enough that there is no large-enough block of memory available to satisfy
   326  the request. In some cases the operating system may artificially limit
   327  the memory available to the program. Failures of small memory allocations
   328  are generally considered fatal by GraphicsMagick. If it is impossible to
   329  allocate even a little bit of memory, then there is no point in
   330  continuing. When large memory allocations associated with allocating
   331  memory for image pixels fail, GraphicsMagick uses that as a key to know
   332  that it should start using memory-mapped temporary files to increase
   333  virtual memory. Under Unix and other POSIX-compliant systems, these
   334  memory-mapped temporary files are created in either the system default
   335  location (e.g. <cite>/var/tmp</cite>) or the directory set by the TMPDIR environment
   336  variable. Under Windows, temporary files are created in the directory set
   337  by the TEMP or TMP environment variable. Use the MAGICK_TMPDIR
   338  environment variable to specify a directory for GraphicsMagick to write
   339  its temporary files.</p>
   340  <p>If the temporary file directory is too small, or is itself mapped to the
   341  system's paging area (no win!), then GraphicsMagick will fail to allocate
   342  more virtual memory via the temporary file and will return an error.</p>
   343  <p>The single biggest factor in how much memory is required by
   344  GraphicsMagick is the QuantumDepth setting when it was compiled. The
   345  amount of memory (in bytes) required to store a single image in memory is
   346  may be calculated via the equation (QuantumDepth*Rows*Columns*5)/8. As a
   347  means of example, the following table shows the amount of memory consumed
   348  by a single 1024x768 image using the supported QuantumDepth settings:</p>
   349  <blockquote>
   350  <table border="1" class="docutils">
   351  <colgroup>
   352  <col width="46%" />
   353  <col width="54%" />
   354  </colgroup>
   355  <thead valign="bottom">
   356  <tr><th class="head">QuantumDepth</th>
   357  <th class="head">Virtual Memory</th>
   358  </tr>
   359  </thead>
   360  <tbody valign="top">
   361  <tr><td>8</td>
   362  <td>3MB</td>
   363  </tr>
   364  <tr><td>16</td>
   365  <td>8MB</td>
   366  </tr>
   367  <tr><td>32</td>
   368  <td>15MB</td>
   369  </tr>
   370  </tbody>
   371  </table>
   372  </blockquote>
   373  <p>Performing an image processing operation may require that several images
   374  be in memory at one time. In the case of animations, hundreds of images
   375  may be in memory at one time.</p>
   376  <p><em>GraphicsMagick</em> is designed to be general purpose. It can display many
   377  image storage formats (<em>Monochrome</em>, <em>PseudoColor</em>, or <em>TrueColor</em>) on
   378  many different types of X visuals (<em>StaticGray, StaticColor, PseudoColor,
   379  GrayScale, DirectColor,</em> or <em>TrueColor</em>). To support all these
   380  combinations of image storage formats and X visuals, extra memory is
   381  required. Additionally, <a class="reference external" href="animate.html">animate</a> and <a class="reference external" href="montage.html">montage</a> store an entire image
   382  sequence in memory.</p>
   383  <p>It is recommended that systems used to run <em>GraphicsMagick</em> have at least
   384  96MB of RAM and 140MB free in their paging area. Systems used to process
   385  large images (do the math!) may require considerably more memory to
   386  operate efficiently. GraphicsMagick is proven to be far more efficient at
   387  processing huge images when it is compiled as a 64-bit application on a
   388  64-bit capable CPU. RAM is typically 1000 times faster than disk, so it
   389  is important to keep as much data in RAM as possible (buy lots of RAM).
   390  The temporary file area should have plenty of free space. The size of the
   391  temporary file area is usually the deciding factor as to whether
   392  GraphicsMagick is able to complete an operation. With sufficient free
   393  disk space, GraphicsMagick is primarily limited by your CPU, your
   394  operating system's ability to address memory, and your degree of
   395  patience. GraphicsMagick has been used to process RGB images 64K by 64K
   396  pixels in size!</p>
   397  </div>
   398  <div class="section" id="how-do-i-concatenate-three-images-left-to-right-with-no-borders-frames-or-text">
   399  <h1><a class="toc-backref" href="#id13">How do I concatenate three images left-to-right with no borders, frames, or text?</a></h1>
   400  <p>Assume your three images are called image1.ppm, image2.ppm, and
   401  image3.ppm. Type</p>
   402  <pre class="literal-block">
   403  gm montage -mode concatenate -tile 3x1 image1.ppm image2.ppm \
   404    image3.ppm concatenated.miff
   405  </pre>
   406  <p>To concatenate the images top-to-bottom, use -tile 1x3.</p>
   407  <p>For more control over the placement of an image, use <a class="reference external" href="composite.html">composite</a>. First
   408  create a matte image and position your images onto the matte. For
   409  example,</p>
   410  <pre class="literal-block">
   411  gm convert -size 350x500 xc:black composite.miff
   412  gm composite -geometry +0+0 composite.miff image1.gif composite.miff
   413  gm composite -geometry &quot;+1&quot;00+0 composite.miff image2.gif composite.miff
   414  gm composite -geometry +0+300 composite.miff image3.gif composite.miff
   415  gm composite -geometry +0+375 composite.miff image4.gif composite.miff
   416  </pre>
   417  </div>
   418  <div class="section" id="how-do-i-create-a-gif-animation-sequence-to-display-within-firefox">
   419  <h1><a class="toc-backref" href="#id14">How do I create a GIF animation sequence to display within Firefox?</a></h1>
   420  <p>Use <a class="reference external" href="convert.html">convert</a> with the <em>-delay</em> and <em>-page</em> options. The <em>-delay</em> option
   421  is used to specify the delay in <em>1/100ths of a second</em> between the
   422  display of each frame of the animation. For example,</p>
   423  <pre class="literal-block">
   424  gm convert -delay 20 frame*.gif animation.gif
   425  </pre>
   426  <p>You can also declare specific delays for each frame of the image
   427  sequence. For example, if the delay was 20, 10, and 5, use</p>
   428  <pre class="literal-block">
   429  gm convert -delay 20 frame1.gif -delay 10 frame2.gif \
   430    -delay 5 frame3.gif animation.gif
   431  </pre>
   432  <p>Use <em>-page</em> to specify the <em>left</em> and <em>top</em> locations of the image frame</p>
   433  <pre class="literal-block">
   434  gm convert frame1.gif -page +50&quot;+1&quot;00 frame2.gif -page +0&quot;+1&quot;00 \
   435    frame3.gif animation.gif
   436  </pre>
   437  <p>Finally, if you want the image to loop within <em>FireFox</em>, use <em>-loop</em></p>
   438  <pre class="literal-block">
   439  gm convert -loop 50 frame*.gif animation.gif
   440  </pre>
   441  <p>Note, that all the images are composited into a single multi-image GIF
   442  animation. If you want a single image produced for each frame, use
   443  <em>+adjoin</em></p>
   444  <pre class="literal-block">
   445  gm convert +adjoin images.* frames%d.gif
   446  </pre>
   447  </div>
   448  <div class="section" id="when-i-display-a-postscript-image-white-borders-are-trimmed">
   449  <h1><a class="toc-backref" href="#id15">When I display a <em>PostScript</em> image, white borders are trimmed.</a></h1>
   450  <p><em>GraphicsMagick</em> automatically trims any <em>PostScript</em> image as defined by
   451  the bounding box. To preempt this behavior, remove the bounding box
   452  statement from the <em>Postscript</em> or explicitly set the page size. For
   453  example,</p>
   454  <pre class="literal-block">
   455  gm display -page letter image.ps
   456  </pre>
   457  </div>
   458  <div class="section" id="what-are-visual-image-directories-how-do-i-use-them">
   459  <h1><a class="toc-backref" href="#id16">What are visual image directories? How do I use them?</a></h1>
   460  <p>A visual image directory (VID) is an image that contains thumbnails of
   461  one or more images in a file directory. Rather than displaying each
   462  individual image at its full resolution, you can browse the visual image
   463  directory and choose an image to display. You can create a VID with
   464  either of these commands:</p>
   465  <pre class="literal-block">
   466  gm montage *.jpg directory.vid
   467  gm convert 'vid:*.jpg' directory.vid
   468  </pre>
   469  <p>Of course you can substitute any filenames you desire. <a class="reference external" href="montage.html">Montage</a> has many
   470  relevant command line options. You can exercise more control over the
   471  appearance of the VID than with <a class="reference external" href="convert.html">convert</a>.</p>
   472  <p>Next display the directory:</p>
   473  <pre class="literal-block">
   474  gm display directory.vid
   475  </pre>
   476  <p>Finally browse and select an image to display. Move the pointer to the
   477  image and press button 3.</p>
   478  <p>You can create the VID directory with this command:</p>
   479  <pre class="literal-block">
   480  gm display 'vid:*.jpg'
   481  </pre>
   482  <p>You can also select <em>Visual Image...</em> from the <em>File</em> menu of the command
   483  widget.</p>
   484  <p><em>Note, that creating a VID is time consuming</em>. Creating them on-the-fly
   485  within <a class="reference external" href="display.html">display</a> may be less convenient than using <a class="reference external" href="montage.html">montage</a> or <a class="reference external" href="convert.html">convert</a> .
   486  Also, if you create them with <a class="reference external" href="montage.html">montage</a>. or <a class="reference external" href="convert.html">convert</a>, you can reuse them
   487  as often as necessary.</p>
   488  <p>Note that a visual image directory is useful for looking at individual
   489  frames of an image sequence:</p>
   490  <pre class="literal-block">
   491  gm display vid:movie.mpg
   492  </pre>
   493  </div>
   494  <div class="section" id="how-can-i-include-the-window-frame-when-importing-a-window">
   495  <h1><a class="toc-backref" href="#id17">How can I include the window frame when importing a window?</a></h1>
   496  <p>I use the window ID reported by <em>xwininfo(1)</em> with import and it does not
   497  include the window manager frame as expected. How can I save the window
   498  with its frame?</p>
   499  <p>By default, <em>xwininfo(1)</em> returns the ID of the window you click on. Use
   500  the <em>-frame</em> option to get the reparented window ID:</p>
   501  <pre class="literal-block">
   502  xwininfo -frame
   503  </pre>
   504  <p>You can then use the returned window ID with <a class="reference external" href="import.html">import</a>:</p>
   505  <pre class="literal-block">
   506  gm import -frame -window ID window.miff
   507  </pre>
   508  </div>
   509  <div class="section" id="i-displayed-an-image-and-it-appears-as-one-solid-color-what-did-i-do-wrong">
   510  <h1><a class="toc-backref" href="#id18">I displayed an image and it appears as one solid color. What did I do wrong?</a></h1>
   511  <p>A blank image generally means that the image is either corrupt or it has
   512  a matte channel and the matte values are all zero. <em>GraphicsMagick</em>
   513  treats a matte value of zero as completely transparent. To determine if
   514  this is the problem, try</p>
   515  <pre class="literal-block">
   516  gm display +matte image.miff
   517  </pre>
   518  </div>
   519  <div class="section" id="i-received-the-following-message-library-is-not-available">
   520  <h1><a class="toc-backref" href="#id19">I received the following message, &quot;???? library is not available...&quot;.</a></h1>
   521  <p><em>GraphicsMagick</em> requires source libraries not included with the
   522  distribution to view or convert certain image formats such as JPEG or
   523  TIFF. The above message means you did not compile the required library
   524  and link with the <em>GraphicsMagick</em> utilities. See <a class="reference external" href="README.html">README</a> for the
   525  location of these libraries and compiling instructions.</p>
   526  </div>
   527  <div class="section" id="i-want-to-inspect-the-values-of-the-matte-channel-within-my-image">
   528  <h1><a class="toc-backref" href="#id20">I want to inspect the values of the matte channel within my image.</a></h1>
   529  <p>View the matte image as a gray scale image. Suppose you have a TIFF image
   530  that has a matte channel and is 640 pixels in width and 480 in height.
   531  Type:</p>
   532  <pre class="literal-block">
   533  gm convert image.tiff image.matte
   534  gm display -size 640x480 gray:image.matte
   535  </pre>
   536  </div>
   537  <div class="section" id="how-can-i-add-one-of-those-cool-bevels-to-my-image-that-i-see-used-on-the-web">
   538  <h1><a class="toc-backref" href="#id21">How can I add one of those cool bevels to my image that I see used on the Web?</a></h1>
   539  <p>There are four types of ornamental borders you can add to your image
   540  with GraphicsMagick. Each is listed below with the procedure to use
   541  them with your image.</p>
   542  <ul>
   543  <li><p class="first">Surround the image with a border of color</p>
   544  <p>Use -border followed by the width and height of the border. Set the
   545  color of the border with -bordercolor. For example, to surround your
   546  image with a red border that is 25 pixels wide on each side, use</p>
   547  <pre class="literal-block">
   548  gm convert -bordercolor red -border 25x25 image.jpg image.gif
   549  </pre>
   550  </li>
   551  <li><p class="first">Lighten or darken image edges to create a 3-D effect</p>
   552  <p>Use -raise followed by the width of the image edge. For example, to
   553  create a raised edge effect of 25 pixels, use</p>
   554  <pre class="literal-block">
   555  gm convert -raise 25 image.jpg image.gif
   556  </pre>
   557  </li>
   558  <li><p class="first">Surround the image with an ornamental frame</p>
   559  <p>Use -frame followed by the width and height of the frame. Set the
   560  color of the border with -mattecolor. For example, to surround your
   561  image with a gray frame that is 25 pixels wide on each side, use</p>
   562  <pre class="literal-block">
   563  gm convert -mattecolor gray -frame 25x25 image.jpg image.gif
   564  </pre>
   565  </li>
   566  <li><p class="first">Surround the image with a raised or sunken bevel</p>
   567  <p>Use -frame followed by the width and height of the bevel. Set the
   568  color of the border with -mattecolor. This is just like the
   569  description above except you specify a bevel width that matches the
   570  frame width. For example, to surround your image with a gray bevel
   571  that is 25 pixels wide on each side, use</p>
   572  <pre class="literal-block">
   573  gm convert -mattecolor gray -frame 25x25+0+25 image.jpg image.gif
   574  gm convert -mattecolor gray -frame 25x25+25+0 image.jpg image.gif
   575  </pre>
   576  </li>
   577  </ul>
   578  </div>
   579  <div class="section" id="i-try-to-launch-display-from-my-window-manager-and-it-fails-what-s-up">
   580  <h1><a class="toc-backref" href="#id22">I try to launch display from my window manager and it fails. What's up?</a></h1>
   581  <p><a class="reference external" href="display.html">Display</a> determines if it is executing interactively and behaves
   582  differently depending on the result. To convince display &lt;display.html&gt;
   583  you are running in an interactive environment when launching from a
   584  window manager, use either of</p>
   585  <pre class="literal-block">
   586  display logo:Untitled
   587  display &lt; /dev/console
   588  </pre>
   589  <p>Note that this issue no longer exists as of GraphicsMagick 1.2.</p>
   590  </div>
   591  <div class="section" id="how-can-i-make-postscript-text-look-good">
   592  <h1><a class="toc-backref" href="#id23">How can I make Postscript text look good?</a></h1>
   593  <p>Simple. Increase the dots-per-inch when converting and sub-sample:</p>
   594  <pre class="literal-block">
   595  gm convert -density 288 -geometry 25% image.ps image.gif
   596  </pre>
   597  <p>Change the density to 144 and geometry to 50% if the above command fails
   598  due to insufficient memory. Alternatively, see the Ghostscript
   599  documentation about using high-quality fonts.</p>
   600  <p>The -density option increases the number of pixels (or dots) generated by
   601  Ghostscript when processing the input postscript file. However as all
   602  other images formats are generally displayed on screens which are
   603  typically about 72 to 100 dots per inch, the output image will be larger.</p>
   604  <p>The <em>-geometry</em> option reduces the large image output of ghostscript
   605  image back to a normal 72 dpi resolution (25% of 288 dpi gives 72 dpi)
   606  but in the process anti-aliases (or smooths) the fonts and lines of the
   607  image so as to remove the jaggies you would otherwise get from a normal
   608  postscript to image conversion.</p>
   609  </div>
   610  <div class="section" id="how-can-i-annotate-an-image-with-text-that-is-2-to-3-inches-tall">
   611  <h1><a class="toc-backref" href="#id24">How can I annotate an image with text that is 2 to 3 inches tall?</a></h1>
   612  <p>If you do not access to a particular named font that is large, try
   613  scalable fonts. First see if you have any scalable fonts. Type</p>
   614  <pre class="literal-block">
   615  xlsfonts -fn '*-0-0-0-0-*'
   616  </pre>
   617  <p>Or if you are using <a class="reference external" href="display.html">display</a>, use the font pattern above within the Font
   618  Browser (see Image Edit-&gt;Annotate). Next substitute the appropriate
   619  resolution. Keep in mind that a scalable font must be fully qualified to
   620  work. That is, all 14 fields must be specified. Here is one example where
   621  we annotate an image with large <em>Helvetica</em> text:</p>
   622  <pre class="literal-block">
   623  gm convert -font '-*-helvetica-*-*-*--300-300-*-*-*-*-iso8859-1' \
   624    -fill green -draw 'text 50,300 Magick' image.gif annotated.gif
   625  </pre>
   626  <p>If you have the FreeType support built into GraphicsMagick, just
   627  increase your pointsize and/or density:</p>
   628  <pre class="literal-block">
   629  gm convert -font Helvetica -pointsize 100 -density 300 ...
   630  </pre>
   631  </div>
   632  <div class="section" id="how-can-i-convert-my-gif-animation-sequence-to-individual-image-files">
   633  <h1><a class="toc-backref" href="#id25">How can I convert my GIF animation sequence to individual image files?</a></h1>
   634  <p>Use the scene embedded file format with <a class="reference external" href="convert.html">convert</a>:</p>
   635  <pre class="literal-block">
   636  gm convert animation.gif +adjoin frame%02d.gif
   637  </pre>
   638  <p>The resulting image files are titled frame01.gif, frame02.gif,
   639  frame03.gif, etc.</p>
   640  </div>
   641  <div class="section" id="how-can-i-remove-the-background-that-prints-around-my-image-when-i-display-it-with-firefox">
   642  <h1><a class="toc-backref" href="#id26">How can I remove the background that prints around my image when I display it with Firefox?</a></h1>
   643  <p>Use the +page option of the <a class="reference external" href="convert.html">convert</a> command:</p>
   644  <pre class="literal-block">
   645  gm convert +page alpha.gif beta.gif
   646  </pre>
   647  <p>GIF allows for a page offset relative to some background. The page
   648  offset information may have been in your GIF image already or it
   649  could have been introduced by GraphicsMagick. Either way, +page
   650  removes the unwanted page offset and FireFox should behave as
   651  expected.</p>
   652  </div>
   653  <div class="section" id="how-do-i-create-a-gif-or-png-image-with-web-safe-colors">
   654  <h1><a class="toc-backref" href="#id27">How do I create a GIF or PNG image with Web safe colors?</a></h1>
   655  <p>Web safe colors are not normally needed any more since almost all
   656  computers now have true color displays. However, this FAQ may still be
   657  useful since it demonstrates how a colormap from an image may be
   658  applied to another image..</p>
   659  <p>Use the -map option of the <a class="reference external" href="convert.html">convert</a> command:</p>
   660  <pre class="literal-block">
   661  gm convert -map netscape: alpha.gif beta.gif
   662  </pre>
   663  <p>Netscape predefines 216 colors for colormapped displays. Use the above
   664  command to ensure only these predefined colors are used. Otherwise
   665  Netscape dithers your image with varying degrees of image fidelity.</p>
   666  </div>
   667  <div class="section" id="how-can-i-add-a-matte-layer-to-my-image">
   668  <h1><a class="toc-backref" href="#id28">How can I add a matte layer to my image?</a></h1>
   669  <p>One way is to use a bitmap as your transparency mask First, use the
   670  -matte option to add an all-opaque opacity channel, then use the
   671  composite utility to copy the graylevel samples from the mask file
   672  into your new opacity channel:</p>
   673  <pre class="literal-block">
   674  gm convert image.gif -matte temp.miff
   675  gm composite -compose CopyOpacity mask.xbm temp.miff transparent.gif
   676  </pre>
   677  <p>Note, GIF is limited to one transparent color. If your mask has
   678  variable opacity, use a format like MIFF, TIFF, or PNG as your output
   679  image format.</p>
   680  </div>
   681  <div class="section" id="how-can-i-draw-with-text-using-convert-under-windows-nt">
   682  <h1><a class="toc-backref" href="#id29">How can I draw with text using 'convert' under Windows NT?</a></h1>
   683  <p>The problem is that NT interprets the command line differently than
   684  Unix does, causing the documented command to fail. The following
   685  command has been reported to work correctly (all on one line):</p>
   686  <pre class="literal-block">
   687  gm convert -font Arial -fill blue -draw &quot;text 10,10 'your text here'&quot; \
   688     d:\test.tif png:d:\test.png
   689  </pre>
   690  <p>and here is another example which is reported to work (which relies
   691  on Ghostscript's 'gs' program to installed):</p>
   692  <pre class="literal-block">
   693  gm convert.exe -pointsize 18 -draw &quot;text 0,0 &quot;This is my text!&quot;&quot; \
   694    C:\blank.gif c:\text.gif
   695  </pre>
   696  </div>
   697  <div class="section" id="why-are-my-jpeg-files-larger-than-expected">
   698  <h1><a class="toc-backref" href="#id30">Why are my JPEG files larger than expected?</a></h1>
   699  <p>Your JPEG files may contain embedded &quot;profiles&quot; such as Exif or IPTC,
   700  or they may contain uncompressed thumbnails. You can use the <cite>+profile
   701  &quot;*&quot;</cite> commandline option or an equivalent API method to remove them.</p>
   702  </div>
   703  <div class="section" id="how-do-i-extract-a-single-image-from-a-multi-image-file">
   704  <h1><a class="toc-backref" href="#id31">How do I extract a single image from a multi-image file?</a></h1>
   705  <p>Use a square-bracket syntax to indicate which frame or frames you
   706  want. For example,</p>
   707  <pre class="literal-block">
   708  gm convert &quot;Image.gif[0]&quot; first.gif
   709  </pre>
   710  <p>Will extract the first image (scene 0) from a GIF animation. Be sure
   711  to surround the file specification with quotation marks, to prevent
   712  the shell from interpreting the square brackets.</p>
   713  </div>
   714  <div class="section" id="how-can-i-extract-and-combine-cmyk-channels-in-a-cmyk-image">
   715  <h1><a class="toc-backref" href="#id32">How can I extract and combine CMYK channels in a CMYK image?</a></h1>
   716  <p>GraphicsMagick 1.2.2 and later support combining multiple channels in of
   717  any image file format in order to create a CMYK image file.  For example,
   718  starting with a CMYK JPEG file, we can create a set of separate files
   719  with one file per channel:</p>
   720  <pre class="literal-block">
   721  gm convert cmyk.jpg -channel cyan cyan.tiff
   722  gm convert cmyk.jpg -channel magenta magenta.tiff
   723  gm convert cmyk.jpg -channel yellow yellow.tiff
   724  gm convert cmyk.jpg -channel black black.tiff
   725  </pre>
   726  <p>and then we can join them back together:</p>
   727  <pre class="literal-block">
   728  gm composite -compose CopyMagenta magenta.tiff cyan.tiff result.tiff
   729  gm composite -compose CopyYellow yellow.tiff result.tiff result.tiff
   730  gm composite -compose CopyBlack black.tiff result.tiff result.tiff
   731  </pre>
   732  <p>Perhaps it is possible to accomplish this in one composite command. We
   733  will leave that as an exercise for later. Note that it is possible to
   734  extract just one channel, manipulate it, and then insert it back into the
   735  original image file.</p>
   736  <p>There is also built-in support for a <em>Partition</em> interlace format which
   737  can split to a set of files, and join a set of files, but the only
   738  supported format is a raw format which is not easy to deal with.</p>
   739  </div>
   740  <div class="section" id="how-can-i-create-a-solid-or-patterned-canvas-image">
   741  <h1><a class="toc-backref" href="#id33">How can I create a solid or patterned canvas image?</a></h1>
   742  <p>Canvas images may be created using the 'XC:' or 'TILE:' pseudo-image
   743  formats. XC produces solid color images based on an color you specify
   744  while TILE produces a tiled image based on an an image you specify. Both
   745  of these require that the desired size be specified, and the desired
   746  image type may be specified as well.</p>
   747  <p>To create a solid red canvas image:</p>
   748  <pre class="literal-block">
   749  gm convert -size 640x480 xc:red canvas.tiff
   750  </pre>
   751  <p>or using hex syntax to specify the color:</p>
   752  <pre class="literal-block">
   753  gm convert -size 640x480 &quot;xc:#f00&quot; canvas.tiff
   754  </pre>
   755  <p>To create a solid red canvas image using truecolor pixels:</p>
   756  <pre class="literal-block">
   757  gm convert -size 640x480 -type TrueColor xc:red canvas.tiff
   758  </pre>
   759  <p>To create a patterned canvas image using a built-in crosshatch pattern:</p>
   760  <pre class="literal-block">
   761  gm convert -size 640x480 tile:image:CROSSHATCH45 canvas.tiff
   762  </pre>
   763  <p>To create a patterned canvas image using a user-supplied image:</p>
   764  <pre class="literal-block">
   765  gm convert -size 640x480 tile:myimage.tiff canvas.tiff
   766  </pre>
   767  </div>
   768  <div class="section" id="what-does-identify-report">
   769  <h1><a class="toc-backref" href="#id34">What does <cite>identify</cite> report?</a></h1>
   770  <p>GraphicsMagick is sophisticated image handling software supporting
   771  perhaps a hundred formats, and hundreds of subformats, yet it needs to
   772  be able to apply image processing algorithms in a consistent way, and
   773  save to many output formats.  Some image types are radically different
   774  from others.  Due to this, GraphicsMagick normalizes images it reads
   775  into only nine internal in-memory formats (see the description of
   776  -type) which are a specialization of just two internal formats.  The
   777  <cite>identify</cite> command reports the characteristics of one of those
   778  internal formats rather than the genuine properties of the input image
   779  file.  In fact, if the properties of all the input files were to be
   780  reported, it would require a book to describe all of the properties.
   781  For example, the WMF vector-drawing format is much different from the
   782  PNG image file format, yet GraphicsMagick can read both.</p>
   783  <p>Only limited original properties are preserved, and it depends on how
   784  GraphicsMagick was built.  For example, a &quot;Q8&quot; build can only report
   785  up to a depth of 8 bits, but a &quot;Q32&quot; build can report a depth of up to
   786  32 bits.  The original image depth is reported if it is at least 8
   787  bits, and equal to or less than the build depth.</p>
   788  <p>By default <cite>identify</cite> reports only the most basic properties:</p>
   789  <pre class="literal-block">
   790  % gm identify seaworld.jpg
   791  seaworld.jpg JPEG 1530x1020+0+0 DirectClass 8-bit 204.0K 0.000u 0:01
   792  </pre>
   793  <p>but with -verbose it can report on a large number of properties.</p>
   794  <hr class="docutils" />
   795  <p>Copyright © GraphicsMagick Group 2002 - 2020</p>
   796  </div>
   797  </div>
   798  </body>
   799  </html>