1
2
3
4
5<!DOCTYPE html>
6<html lang="en">
7<head>
8    <title>ImageMagick: Command-line Tools: Import</title>
9  <meta charset="utf-8" />
10  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
11  <meta name="viewport" content="width=device-width, initial-scale=1" />
12  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
13  <meta name="application-name" content="ImageMagick"/>
14  <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves."/>
15  <meta name="application-url" content="http://www.imagemagick.org"/>
16  <meta name="generator" content="PHP"/>
17  <meta name="keywords" content="command-line, tools:, import, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/>
18  <meta name="rating" content="GENERAL"/>
19  <meta name="robots" content="INDEX, FOLLOW"/>
20  <meta name="generator" content="ImageMagick Studio LLC"/>
21  <meta name="author" content="ImageMagick Studio LLC"/>
22  <meta name="revisit-after" content="2 DAYS"/>
23  <meta name="resource-type" content="document"/>
24  <meta name="copyright" content="Copyright (c) 1999-2016 ImageMagick Studio LLC"/>
25  <meta name="distribution" content="Global"/>
26  <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
27  <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
28  <link rel="icon" href="../images/wand.png"/>
29  <link rel="shortcut icon" href="../images/wand.ico"/>
30  <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:900,400,400italic,700,700italic,300,300italic|Open+Sans:300italic,400italic,700italic,300,400,600,700">
31  <link rel="stylesheet" href="css/magick.css"/>
32</head>
33<body>
34<div class="main">
35<div class="magick-masthead">
36  <div class="container">
37    <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
38         style="display:block"
39         data-ad-client="ca-pub-3129977114552745"
40         data-ad-slot="6345125851"
41         data-ad-format="auto"></ins>
42    <script>
43      (adsbygoogle = window.adsbygoogle || []).push({});
44    </script>
45    <nav class="magick-nav">
46      <a class="magick-nav-item " href="../index.html">Home</a>
47      <a class="magick-nav-item " href="binary-releases.html">Download</a>
48      <a class="magick-nav-item " href="command-line-tools.html">Tools</a>
49      <a class="magick-nav-item " href="command-line-processing.html">Command-line</a>
50      <a class="magick-nav-item " href="resources.html">Resources</a>
51      <a class="magick-nav-item " href="api.html">Develop</a>
52      <a class="magick-nav-item " href="http://www.imagemagick.org/script/search.php">Search</a>
53      <a class="magick-nav-item pull-right" href="https://www.imagemagick.org/discourse-server/">Community</a>
54    </nav>
55  </div>
56</div>
57<div class="container">
58<div class="magick-header">
59<p class="text-center"><a href="import.html#usage">Example Usage</a> • <a href="import.html#options">Option Summary</a></p>
60
61<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. 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>
62
63<h2 class="magick-header"><a id="usage"></a>Example Usage</h2>
64
65<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 in the JPEG format:</p>
66
67<pre>
68import rose.jpg
69</pre>
70
71<p>To capture the entire X server screen in the Postscript image format:</p>
72
73<pre>
74import -window root screen.ps
75</pre>
76
77<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="http://www.imagemagick.org/Usage/">Examples of ImageMagick Usage</a>.</p>
78
79
80<h2 class="magick-header"><a id="options"></a>Option Summary</h2>
81
82<p>The <code>import</code> command recognizes these options.  Click on an option to get more details about how that option works.</p>
83
84<table class="table table-condensed table-striped">
85  <tbody>
86  <tr>
87    <th align="left">Option</th>
88    <th align="left">Description</th>
89  </tr>
90
91  <tr>
92    <td><a href="command-line-options.html#adjoin">-adjoin</a></td>
93    <td>join images into a single multi-image file</td>
94  </tr>
95
96  <tr>
97    <td><a href="command-line-options.html#annotate">-annotate <var>geometry text</var></a></td>
98    <td>annotate the image with text</td>
99  </tr>
100
101  <tr>
102    <td><a href="command-line-options.html#border">-border</a></td>
103    <td>include window border in the output image</td>
104  </tr>
105
106  <tr>
107    <td><a href="command-line-options.html#channel">-channel <var>type</var></a></td>
108    <td>apply option to select image channels</td>
109  </tr>
110
111  <tr>
112    <td><a href="command-line-options.html#colors">-colors <var>value</var></a></td>
113    <td>preferred number of colors in the image</td>
114  </tr>
115
116  <tr>
117    <td><a href="command-line-options.html#colorspace">-colorspace <var>type</var></a></td>
118    <td>set image colorspace</td>
119  </tr>
120
121  <tr>
122    <td><a href="command-line-options.html#comment">-comment <var>string</var></a></td>
123    <td>annotate image with comment</td>
124  </tr>
125
126  <tr>
127    <td><a href="command-line-options.html#compress">-compress <var>type</var></a></td>
128    <td>image compression type</td>
129  </tr>
130
131  <tr>
132    <td><a href="command-line-options.html#contrast">-contrast</a></td>
133    <td>enhance or reduce the image contrast</td>
134  </tr>
135
136  <tr>
137    <td><a href="command-line-options.html#crop">-crop <var>geometry</var></a></td>
138    <td>preferred size and location of the cropped image</td>
139  </tr>
140
141  <tr>
142    <td><a href="command-line-options.html#debug">-debug <var>events</var></a></td>
143    <td>import copious debugging information</td>
144  </tr>
145
146  <tr>
147    <td><a href="command-line-options.html#define">-define <var>format:option</var></a></td>
148    <td>define one or more image format options</td>
149  </tr>
150
151  <tr>
152    <td><a href="command-line-options.html#delay">-delay <var>value</var></a></td>
153    <td>import the next image after pausing</td>
154  </tr>
155
156  <tr>
157    <td><a href="command-line-options.html#density">-density <var>geometry</var></a></td>
158    <td>horizontal and vertical density of the image</td>
159  </tr>
160
161  <tr>
162    <td><a href="command-line-options.html#depth">-depth <var>value</var></a></td>
163    <td>image depth</td>
164  </tr>
165
166  <tr>
167    <td><a href="command-line-options.html#despeckle">-descend</a></td>
168    <td>obtain image by descending window hierarchy</td>
169  </tr>
170
171  <tr>
172    <td><a href="command-line-options.html#display">-display <var>server</var></a></td>
173    <td>get image or font from this X server</td>
174  </tr>
175
176  <tr>
177    <td><a href="command-line-options.html#dispose">-dispose <var>method</var></a></td>
178    <td>layer disposal method</td>
179  </tr>
180
181  <tr>
182    <td><a href="command-line-options.html#dither">-dither  <var>method</var></a></td>
183    <td>apply error diffusion to image</td>
184  </tr>
185
186  <tr>
187    <td><a href="command-line-options.html#encipher">-encipher <var>filename</var></a></td>
188    <td>convert plain pixels to cipher pixels</td>
189  </tr>
190
191  <tr>
192    <td><a href="command-line-options.html#encoding">-encoding <var>type</var></a></td>
193    <td>text encoding type</td>
194  </tr>
195
196  <tr>
197    <td><a href="command-line-options.html#endian">-endian <var>type</var></a></td>
198    <td>endianness (MSB or LSB) of the image</td>
199  </tr>
200
201  <tr>
202    <td><a href="command-line-options.html#filter">-filter <var>type</var></a></td>
203    <td>use this filter when resizing an image</td>
204  </tr>
205
206  <tr>
207    <td><a href="command-line-options.html#frame">-frame</a></td>
208    <td>include window manager frame</td>
209  </tr>
210
211  <tr>
212    <td><a href="command-line-options.html#geometry">-geometry <var>geometry</var></a></td>
213    <td>preferred size or location of the image</td>
214  </tr>
215
216  <tr>
217    <td><a href="command-line-options.html#gravity">-gravity <var>type</var></a></td>
218    <td>horizontal and vertical text placement</td>
219  </tr>
220
221  <tr>
222    <td><a href="command-line-options.html#help">-help</a></td>
223    <td>print program options</td>
224  </tr>
225
226  <tr>
227    <td><a href="command-line-options.html#identify">-identify</a></td>
228    <td>identify the format and characteristics of the image</td>
229  </tr>
230
231  <tr>
232    <td><a href="command-line-options.html#interlace">-interlace <var>type</var></a></td>
233    <td>type of image interlacing scheme</td>
234  </tr>
235
236  <tr>
237    <td><a href="command-line-options.html#interpolate">-interpolate <var>method</var></a></td>
238    <td>pixel color interpolation method</td>
239  </tr>
240
241  <tr>
242    <td><a href="command-line-options.html#label">-label <var>name</var></a></td>
243    <td>assign a label to an image</td>
244  </tr>
245
246  <tr>
247    <td><a href="command-line-options.html#limit">-limit <var>type value</var></a></td>
248    <td>pixel cache resource limit</td>
249  </tr>
250
251  <tr>
252    <td><a href="command-line-options.html#log">-log <var>format</var></a></td>
253    <td>format of debugging information</td>
254  </tr>
255
256  <tr>
257    <td><a href="command-line-options.html#monitor">-monitor</a></td>
258    <td>monitor progress</td>
259  </tr>
260
261  <tr>
262    <td><a href="command-line-options.html#monochrome">-monochrome</a></td>
263    <td>transform image to black and white</td>
264  </tr>
265
266  <tr>
267    <td><a href="command-line-options.html#negate">-negate</a></td>
268    <td>replace each pixel with its complementary color </td>
269  </tr>
270
271  <tr>
272    <td><a href="command-line-options.html#page">-page <var>geometry</var></a></td>
273    <td>size and location of an image canvas (setting)</td>
274  </tr>
275
276  <tr>
277    <td><a href="command-line-options.html#pause">-pause <var>seconds</var></a></td>
278    <td>seconds delay between snapshots</td>
279  </tr>
280
281  <tr>
282    <td><a href="command-line-options.html#quality">-quality <var>value</var></a></td>
283    <td>JPEG/MIFF/PNG compression level</td>
284  </tr>
285
286  <tr>
287    <td><a href="command-line-options.html#quantize">-quantize <var>colorspace</var></a></td>
288    <td>reduce image colors in this colorspace</td>
289  </tr>
290
291  <tr>
292    <td><a href="command-line-options.html#quiet">-quiet</a></td>
293    <td>suppress all warning messages</td>
294  </tr>
295
296  <tr>
297    <td><a href="command-line-options.html#quiet">-quiet</a></td>
298    <td>suppress all warning messages</td>
299  </tr>
300
301  <tr>
302    <td><a href="command-line-options.html#regard-warnings">-regard-warnings</a></td>
303    <td>pay attention to warning messages.</td>
304  </tr>
305
306  <tr>
307    <td><a href="command-line-options.html#repage">-repage <var>geometry</var></a></td>
308    <td>size and location of an image canvas</td>
309  </tr>
310
311  <tr>
312    <td><a href="command-line-options.html#resize">-resize <var>geometry</var></a></td>
313    <td>resize the image</td>
314  </tr>
315
316  <tr>
317    <td><a href="command-line-options.html#respect-parentheses">-respect-parentheses</a></td>
318    <td>settings remain in effect until parenthesis boundary.</td>
319  </tr>
320
321  <tr>
322    <td><a href="command-line-options.html#rotate">-rotate <var>degrees</var></a></td>
323    <td>apply Paeth rotation to the image</td>
324  </tr>
325
326  <tr>
327    <td><a href="command-line-options.html#sampling-factor">-sampling-factor <var>geometry</var></a></td>
328    <td>horizontal and vertical sampling factor</td>
329  </tr>
330
331  <tr>
332    <td><a href="command-line-options.html#scene">-scene <var>value</var></a></td>
333    <td>image scene number</td>
334  </tr>
335
336  <tr>
337    <td><a href="command-line-options.html#screen">-screen</a></td>
338    <td>select image from root window</td>
339  </tr>
340
341  <tr>
342    <td><a href="command-line-options.html#seed">-seed <var>value</var></a></td>
343    <td>seed a new sequence of pseudo-random numbers</td>
344  </tr>
345
346  <tr>
347    <td><a href="command-line-options.html#set">-set <var>attribute value</var></a></td>
348    <td>set an image attribute</td>
349  </tr>
350
351  <tr>
352    <td><a href="command-line-options.html#sharpen">-silent</a></td>
353    <td>operate silently, i.e. don't ring any bells</td>
354  </tr>
355
356  <tr>
357    <td><a href="command-line-options.html#strip">-strip</a></td>
358    <td>strip image of all profiles and comments</td>
359  </tr>
360
361  <tr>
362    <td><a href="command-line-options.html#synchronize">-synchronize</a></td>
363    <td>synchronize image to storage device</td>
364  </tr>
365
366  <tr>
367    <td><a href="command-line-options.html#taint">-taint</a></td>
368    <td>mark the image as modified</td>
369  </tr>
370
371  <tr>
372    <td><a href="command-line-options.html#transparent-color">-transparent-color <var>color</var></a></td>
373    <td>transparent color</td>
374  </tr>
375
376  <tr>
377    <td><a href="command-line-options.html#trim">-trim</a></td>
378    <td>trim image edges</td>
379  </tr>
380
381  <tr>
382    <td><a href="command-line-options.html#update">-type <var>type</var></a></td>
383    <td>image type</td>
384  </tr>
385
386  <tr>
387    <td><a href="command-line-options.html#verbose">-verbose</a></td>
388    <td>print detailed information about the image</td>
389  </tr>
390
391  <tr>
392    <td><a href="command-line-options.html#version">-version</a></td>
393    <td>print version information</td>
394  </tr>
395
396  <tr>
397    <td><a href="command-line-options.html#virtual-pixel">-virtual-pixel <var>method</var></a></td>
398    <td>access method for pixels outside the boundaries of the image</td>
399  </tr>
400
401  <tr>
402    <td><a href="command-line-options.html#write">-window <var>id</var></a></td>
403    <td>select window with this id or name</td>
404  </tr>
405
406  </tbody>
407</table>
408
409</div>
410  <footer class="magick-footer">
411    <p><a href="support.html">Donate</a> •
412     <a href="sitemap.html">Sitemap</a> •
413    <a href="links.html">Related</a> •
414    <a href="architecture.html">Architecture</a>
415</p>
416    <p><a href="import.html#">Back to top</a> •
417    <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
418    <a href="http://www.imagemagick.org/script/contact.php">Contact Us</a></p>
419        <p><small>©  1999-2016 ImageMagick Studio LLC</small></p>
420  </footer>
421</div><!-- /.container -->
422
423  <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
424  <script src="../js/magick.html"></script>
425</div>
426</body>
427</html>
428