Home | History | Annotate | Download | only in www
      1 
      2 
      3 
      4 
      5 <!DOCTYPE html>
      6 <html lang="en">
      7 <head>
      8   <meta charset="utf-8"  />
      9   <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,shrink-to-fit=no"  />
     10   <title>Command-line Tools: Import @ ImageMagick</title>
     11   <meta name="application-name" content="ImageMagick" />
     12   <meta name="description" content="Use ImageMagick to create, edit, compose, or convert bitmap images. You can resize your image, crop it, change its shades and colors, add captions, among other operations." />
     13   <meta name="application-url" content="https://imagemagick.org" />
     14   <meta name="generator" content="PHP" />
     15   <meta name="keywords" content="command-line, tools:, import, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert" />
     16   <meta name="rating" content="GENERAL" />
     17   <meta name="robots" content="INDEX, FOLLOW" />
     18   <meta name="generator" content="ImageMagick Studio LLC" />
     19   <meta name="author" content="ImageMagick Studio LLC" />
     20   <meta name="revisit-after" content="2 DAYS" />
     21   <meta name="resource-type" content="document" />
     22   <meta name="copyright" content="Copyright (c) 1999-2019 ImageMagick Studio LLC" />
     23   <meta name="distribution" content="Global" />
     24   <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" />
     25   <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
     26   <link href="../www/import.html" rel="canonical" />
     27   <link href="../images/wand.png" rel="icon" />
     28   <link href="../images/wand.ico" rel="shortcut icon" />
     29   <link href="assets/magick.css" rel="stylesheet" />
     30 </head>
     31 <body>
     32   <header>
     33   <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
     34     <a class="navbar-brand" href="../index.html"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../images/wand.ico"/></a>
     35     <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsMagick" aria-controls="navbarsMagick" aria-expanded="false" aria-label="Toggle navigation">
     36       <span class="navbar-toggler-icon"></span>
     37     </button>
     38 
     39     <div class="navbar-collapse collapse" id="navbarsMagick" style="">
     40     <ul class="navbar-nav mr-auto">
     41       <li class="nav-item ">
     42         <a class="nav-link" href="../index.html">Home <span class="sr-only">(current)</span></a>
     43       </li>
     44       <li class="nav-item ">
     45         <a class="nav-link" href="download.html">Download</a>
     46       </li>
     47       <li class="nav-item ">
     48         <a class="nav-link" href="command-line-tools.html">Tools</a>
     49       </li>
     50       <li class="nav-item ">
     51         <a class="nav-link" href="command-line-processing.html">Command-line</a>
     52       </li>
     53       <li class="nav-item ">
     54         <a class="nav-link" href="resources.html">Resources</a>
     55       </li>
     56       <li class="nav-item ">
     57         <a class="nav-link" href="develop.html">Develop</a>
     58       </li>
     59       <li class="nav-item">
     60         <a class="nav-link" target="_blank" href="https://imagemagick.org/discourse-server/">Community</a>
     61       </li>
     62     </ul>
     63     <form class="form-inline my-2 my-lg-0" action="https://imagemagick.org/script/search.php">
     64       <input class="form-control mr-sm-2" type="text" name="q" placeholder="Search" aria-label="Search">
     65       <button class="btn btn-outline-success my-2 my-sm-0" type="submit" name="sa">Search</button>
     66     </form>
     67     </div>
     68   </nav>
     69   <div class="container">
     70    <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
     71          style="display:block"
     72          data-ad-client="ca-pub-3129977114552745"
     73          data-ad-slot="6345125851"
     74          data-ad-format="auto"></ins>
     75     <script>
     76       (adsbygoogle = window.adsbygoogle || []).push({});
     77     </script>
     78 
     79   </div>
     80   </header>
     81   <main class="container">
     82     <div class="magick-template">
     83 <div class="magick-header">
     84 <p class="text-center"><a href="import.html#usage">Example Usage</a>  <a href="import.html#options">Option Summary</a></p>
     85 
     86 <p class="lead magick-description">Use the <code>import</code> program to capture some or all of an X server screen and save the image to a file. <code>import</code> captures the window selected by clicking or program argument. See <a href="command-line-processing.html">Command Line Processing</a> for advice on how to structure your <code>import</code> command or see below for example usages of the command.</p>
     87 
     88 <h2><a class="anchor" id="usage"></a>Example Usage</h2>
     89 
     90 <p>We list a few examples of the <code>import</code> command here to illustrate its usefulness and ease of use.  To get started, lets import an image of an X11 window in the JPEG format:</p>
     91 
     92 <pre class="highlight"><code>magick import rose.jpg
     93 </code></pre>
     94 
     95 <p>To capture the entire X server screen in the Postscript image format:</p>
     96 
     97 <pre class="highlight"><code>magick import -window root screen.ps
     98 </code></pre>
     99 
    100 <p>You can find additional examples of using <code>import</code> in <a href="http://www.ibm.com/developerworks/library/l-graf/?ca=dnt-428">Graphics from the Command Line</a>.  Further discussion is available in  <a href="http://www.ibm.com/developerworks/library/l-graf2/?ca=dgr-lnxw15GraphicsLine">More Graphics from the Command Line</a> and <a href="../Usage/">Examples of ImageMagick Usage</a>.</p>
    101 
    102 
    103 <h2><a class="anchor" id="options"></a>Option Summary</h2>
    104 
    105 <p>The <code>import</code> command recognizes these options.  Click on an option to get more details about how that option works.</p>
    106 
    107 <table class="table table-sm table-striped">
    108   <tbody>
    109   <tr>
    110     <th align="left">Option</th>
    111     <th align="left">Description</th>
    112   </tr>
    113 
    114   <tr>
    115     <td><a href="command-line-options.html#adjoin">-adjoin</a></td>
    116     <td>join images into a single multi-image file</td>
    117   </tr>
    118 
    119   <tr>
    120     <td><a href="command-line-options.html#annotate">-annotate <var>geometry text</var></a></td>
    121     <td>annotate the image with text</td>
    122   </tr>
    123 
    124   <tr>
    125     <td><a href="command-line-options.html#border">-border</a></td>
    126     <td>include window border in the output image</td>
    127   </tr>
    128 
    129   <tr>
    130     <td><a href="command-line-options.html#channel">-channel <var>type</var></a></td>
    131     <td>apply option to select image channels</td>
    132   </tr>
    133 
    134   <tr>
    135     <td><a href="command-line-options.html#colors">-colors <var>value</var></a></td>
    136     <td>preferred number of colors in the image</td>
    137   </tr>
    138 
    139   <tr>
    140     <td><a href="command-line-options.html#colorspace">-colorspace <var>type</var></a></td>
    141     <td>set image colorspace</td>
    142   </tr>
    143 
    144   <tr>
    145     <td><a href="command-line-options.html#comment">-comment <var>string</var></a></td>
    146     <td>annotate image with comment</td>
    147   </tr>
    148 
    149   <tr>
    150     <td><a href="command-line-options.html#compress">-compress <var>type</var></a></td>
    151     <td>image compression type</td>
    152   </tr>
    153 
    154   <tr>
    155     <td><a href="command-line-options.html#contrast">-contrast</a></td>
    156     <td>enhance or reduce the image contrast</td>
    157   </tr>
    158 
    159   <tr>
    160     <td><a href="command-line-options.html#crop">-crop <var>geometry</var></a></td>
    161     <td>preferred size and location of the cropped image</td>
    162   </tr>
    163 
    164   <tr>
    165     <td><a href="command-line-options.html#debug">-debug <var>events</var></a></td>
    166     <td>import copious debugging information</td>
    167   </tr>
    168 
    169   <tr>
    170     <td><a href="command-line-options.html#define">-define <var>format:option</var></a></td>
    171     <td>define one or more image format options</td>
    172   </tr>
    173 
    174   <tr>
    175     <td><a href="command-line-options.html#delay">-delay <var>value</var></a></td>
    176     <td>import the next image after pausing</td>
    177   </tr>
    178 
    179   <tr>
    180     <td><a href="command-line-options.html#density">-density <var>geometry</var></a></td>
    181     <td>horizontal and vertical density of the image</td>
    182   </tr>
    183 
    184   <tr>
    185     <td><a href="command-line-options.html#depth">-depth <var>value</var></a></td>
    186     <td>image depth</td>
    187   </tr>
    188 
    189   <tr>
    190     <td><a href="command-line-options.html#despeckle">-descend</a></td>
    191     <td>obtain image by descending window hierarchy</td>
    192   </tr>
    193 
    194   <tr>
    195     <td><a href="command-line-options.html#display">-display <var>server</var></a></td>
    196     <td>get image or font from this X server</td>
    197   </tr>
    198 
    199   <tr>
    200     <td><a href="command-line-options.html#dispose">-dispose <var>method</var></a></td>
    201     <td>layer disposal method</td>
    202   </tr>
    203 
    204   <tr>
    205     <td><a href="command-line-options.html#dither">-dither  <var>method</var></a></td>
    206     <td>apply error diffusion to image</td>
    207   </tr>
    208 
    209   <tr>
    210     <td><a href="command-line-options.html#encipher">-encipher <var>filename</var></a></td>
    211     <td>convert plain pixels to cipher pixels</td>
    212   </tr>
    213 
    214   <tr>
    215     <td><a href="command-line-options.html#encoding">-encoding <var>type</var></a></td>
    216     <td>text encoding type</td>
    217   </tr>
    218 
    219   <tr>
    220     <td><a href="command-line-options.html#endian">-endian <var>type</var></a></td>
    221     <td>endianness (MSB or LSB) of the image</td>
    222   </tr>
    223 
    224   <tr>
    225     <td><a href="command-line-options.html#filter">-filter <var>type</var></a></td>
    226     <td>use this filter when resizing an image</td>
    227   </tr>
    228 
    229   <tr>
    230     <td><a href="command-line-options.html#frame">-frame</a></td>
    231     <td>include window manager frame</td>
    232   </tr>
    233 
    234   <tr>
    235     <td><a href="command-line-options.html#geometry">-geometry <var>geometry</var></a></td>
    236     <td>preferred size or location of the image</td>
    237   </tr>
    238 
    239   <tr>
    240     <td><a href="command-line-options.html#gravity">-gravity <var>type</var></a></td>
    241     <td>horizontal and vertical text placement</td>
    242   </tr>
    243 
    244   <tr>
    245     <td><a href="command-line-options.html#help">-help</a></td>
    246     <td>print program options</td>
    247   </tr>
    248 
    249   <tr>
    250     <td><a href="command-line-options.html#identify">-identify</a></td>
    251     <td>identify the format and characteristics of the image</td>
    252   </tr>
    253 
    254   <tr>
    255     <td><a href="command-line-options.html#interlace">-interlace <var>type</var></a></td>
    256     <td>type of image interlacing scheme</td>
    257   </tr>
    258 
    259   <tr>
    260     <td><a href="command-line-options.html#interpolate">-interpolate <var>method</var></a></td>
    261     <td>pixel color interpolation method</td>
    262   </tr>
    263 
    264   <tr>
    265     <td><a href="command-line-options.html#label">-label <var>name</var></a></td>
    266     <td>assign a label to an image</td>
    267   </tr>
    268 
    269   <tr>
    270     <td><a href="command-line-options.html#limit">-limit <var>type value</var></a></td>
    271     <td>pixel cache resource limit</td>
    272   </tr>
    273 
    274   <tr>
    275     <td><a href="command-line-options.html#log">-log <var>format</var></a></td>
    276     <td>format of debugging information</td>
    277   </tr>
    278 
    279   <tr>
    280     <td><a href="command-line-options.html#monitor">-monitor</a></td>
    281     <td>monitor progress</td>
    282   </tr>
    283 
    284   <tr>
    285     <td><a href="command-line-options.html#monochrome">-monochrome</a></td>
    286     <td>transform image to black and white</td>
    287   </tr>
    288 
    289   <tr>
    290     <td><a href="command-line-options.html#negate">-negate</a></td>
    291     <td>replace each pixel with its complementary color </td>
    292   </tr>
    293 
    294   <tr>
    295     <td><a href="command-line-options.html#page">-page <var>geometry</var></a></td>
    296     <td>size and location of an image canvas (setting)</td>
    297   </tr>
    298 
    299   <tr>
    300     <td><a href="command-line-options.html#pause">-pause <var>seconds</var></a></td>
    301     <td>seconds delay between snapshots</td>
    302   </tr>
    303 
    304   <tr>
    305     <td><a href="command-line-options.html#quality">-quality <var>value</var></a></td>
    306     <td>JPEG/MIFF/PNG compression level</td>
    307   </tr>
    308 
    309   <tr>
    310     <td><a href="command-line-options.html#quantize">-quantize <var>colorspace</var></a></td>
    311     <td>reduce image colors in this colorspace</td>
    312   </tr>
    313 
    314   <tr>
    315     <td><a href="command-line-options.html#quiet">-quiet</a></td>
    316     <td>suppress all warning messages</td>
    317   </tr>
    318 
    319   <tr>
    320     <td><a href="command-line-options.html#quiet">-quiet</a></td>
    321     <td>suppress all warning messages</td>
    322   </tr>
    323 
    324   <tr>
    325     <td><a href="command-line-options.html#regard-warnings">-regard-warnings</a></td>
    326     <td>pay attention to warning messages.</td>
    327   </tr>
    328 
    329   <tr>
    330     <td><a href="command-line-options.html#repage">-repage <var>geometry</var></a></td>
    331     <td>size and location of an image canvas</td>
    332   </tr>
    333 
    334   <tr>
    335     <td><a href="command-line-options.html#resize">-resize <var>geometry</var></a></td>
    336     <td>resize the image</td>
    337   </tr>
    338 
    339   <tr>
    340     <td><a href="command-line-options.html#respect-parentheses">-respect-parentheses</a></td>
    341     <td>settings remain in effect until parenthesis boundary.</td>
    342   </tr>
    343 
    344   <tr>
    345     <td><a href="command-line-options.html#rotate">-rotate <var>degrees</var></a></td>
    346     <td>apply Paeth rotation to the image</td>
    347   </tr>
    348 
    349   <tr>
    350     <td><a href="command-line-options.html#sampling-factor">-sampling-factor <var>geometry</var></a></td>
    351     <td>horizontal and vertical sampling factor</td>
    352   </tr>
    353 
    354   <tr>
    355     <td><a href="command-line-options.html#scene">-scene <var>value</var></a></td>
    356     <td>image scene number</td>
    357   </tr>
    358 
    359   <tr>
    360     <td><a href="command-line-options.html#screen">-screen</a></td>
    361     <td>select image from root window</td>
    362   </tr>
    363 
    364   <tr>
    365     <td><a href="command-line-options.html#seed">-seed <var>value</var></a></td>
    366     <td>seed a new sequence of pseudo-random numbers</td>
    367   </tr>
    368 
    369   <tr>
    370     <td><a href="command-line-options.html#set">-set <var>attribute value</var></a></td>
    371     <td>set an image attribute</td>
    372   </tr>
    373 
    374   <tr>
    375     <td><a href="command-line-options.html#sharpen">-silent</a></td>
    376     <td>operate silently, i.e. don't ring any bells</td>
    377   </tr>
    378 
    379   <tr>
    380     <td><a href="command-line-options.html#strip">-strip</a></td>
    381     <td>strip image of all profiles and comments</td>
    382   </tr>
    383 
    384   <tr>
    385     <td><a href="command-line-options.html#synchronize">-synchronize</a></td>
    386     <td>synchronize image to storage device</td>
    387   </tr>
    388 
    389   <tr>
    390     <td><a href="command-line-options.html#taint">-taint</a></td>
    391     <td>mark the image as modified</td>
    392   </tr>
    393 
    394   <tr>
    395     <td><a href="command-line-options.html#transparent-color">-transparent-color <var>color</var></a></td>
    396     <td>transparent color</td>
    397   </tr>
    398 
    399   <tr>
    400     <td><a href="command-line-options.html#trim">-trim</a></td>
    401     <td>trim image edges</td>
    402   </tr>
    403 
    404   <tr>
    405     <td><a href="command-line-options.html#update">-type <var>type</var></a></td>
    406     <td>image type</td>
    407   </tr>
    408 
    409   <tr>
    410     <td><a href="command-line-options.html#verbose">-verbose</a></td>
    411     <td>print detailed information about the image</td>
    412   </tr>
    413 
    414   <tr>
    415     <td><a href="command-line-options.html#version">-version</a></td>
    416     <td>print version information</td>
    417   </tr>
    418 
    419   <tr>
    420     <td><a href="command-line-options.html#virtual-pixel">-virtual-pixel <var>method</var></a></td>
    421     <td>access method for pixels outside the boundaries of the image</td>
    422   </tr>
    423 
    424   <tr>
    425     <td><a href="command-line-options.html#write">-window <var>id</var></a></td>
    426     <td>select window with this id or name</td>
    427   </tr>
    428 
    429   </tbody>
    430 </table>
    431 
    432 </div>
    433     </div>
    434   </main><!-- /.container -->
    435   <footer class="magick-footer">
    436     <p><a href="security-policy.html">Security</a> 
    437     <a href="architecture.html">Architecture</a> 
    438     <a href="links.html">Related</a> 
    439      <a href="sitemap.html">Sitemap</a>
    440        
    441     <a href="import.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../images/wand.ico"/></a>
    442        
    443     <a href="http://pgp.mit.edu/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> 
    444     <a href="support.html">Donate</a> 
    445     <a href="https://imagemagick.org/script/contact.php">Contact Us</a>
    446     <br/>
    447     <small> 1999-2019 ImageMagick Studio LLC</small></p>
    448   </footer>
    449 
    450   <!-- Javascript assets -->
    451   <script src="assets/magick.js" crossorigin="anonymous"></script>
    452   <script>window.jQuery || document.write('<script src="https://localhost/ajax/libs/jquery/3.3.1/jquery.min.js"><\/script>')</script>
    453 </body>
    454 </html>
    455 <!-- Magick Cache 5th January 2019 11:43 -->