Back to Imagemagick

ImageMagick

www/import.html

7.1.2-217.0 KB
Original Source

Example UsageOption Summary

Use the import program to capture some or all of an X server screen and save the image to a file. import captures the window selected by clicking or program argument. See Command Line Processing for advice on how to structure your import command or see below for example usages of the command.

Example Usage

We list a few examples of the import 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:

magick import rose.jpg

To select the area you want to capture, move the cursor to the desired window and click (or click and drag) the left mouse button. To cancel the capture, click the right mouse button.

To capture the entire X server screen in the Postscript image format:

magick import -window root screen.ps

This command enables you to select a specific area on your screen and copy the selection to your clipboard. You can use this feature to conveniently post images on applications that support image uploading:

magick import clipboard:

You can find additional examples of using import in Examples of ImageMagick Usage.

Option Summary

The import command recognizes these options. Click on an option to get more details about how that option works.

OptionDescription
-adjoinjoin images into a single multi-image file
-annotate geometry textannotate the image with text
-borderinclude window border in the output image
-channel typeapply option to select image channels
-colors valuepreferred number of colors in the image
-colorspace typeset image colorspace
-comment stringannotate image with comment
-compress typeimage compression type
-contrastenhance or reduce the image contrast
-crop geometrypreferred size and location of the cropped image
-debug eventsimport copious debugging information
-define format:optiondefine one or more image format options
-delay centisecondsimport the next image after pausing
-density geometryhorizontal and vertical density of the image
-depth valueimage depth
-descendobtain image by descending window hierarchy
-display serverget image or font from this X server
-dispose methodlayer disposal method
-dither methodapply error diffusion to image
-encipher filenameconvert plain pixels to cipher pixels
-encoding typetext encoding type
-endian typeendianness (MSB or LSB) of the image
-filter typeuse this filter when resizing an image
-frameinclude window manager frame
-geometry geometrypreferred size or location of the image
-gravity typehorizontal and vertical text placement
-helpprint program options
-identifyidentify the format and characteristics of the image
-interlace typetype of image interlacing scheme
-interpolate methodpixel color interpolation method
-label nameassign a label to an image
-limit type valuepixel cache resource limit
-log formatformat of debugging information
-monitormonitor progress
-monochrometransform image to black and white
-negatereplace each pixel with its complementary color
-page geometrysize and location of an image canvas (setting)
-pause secondsseconds delay between snapshots
-quality valueJPEG/MIFF/PNG compression level
-quantize colorspacereduce image colors in this colorspace
-quietsuppress all warning messages
-quietsuppress all warning messages
-regard-warningspay attention to warning messages.
-repage geometrysize and location of an image canvas
-resize geometryresize the image
-respect-parenthesessettings remain in effect until parenthesis boundary.
-rotate degreesapply Paeth rotation to the image
-sampling-factor geometryhorizontal and vertical sampling factor
-scene valueimage scene number
-screenselect image from root window
-seed valueseed a new sequence of pseudo-random numbers
-set attribute valueset an image attribute
-silentoperate silently, i.e. don't ring any bells
-stripstrip image of all profiles and comments
-synchronizesynchronize image to storage device
-taintmark the image as modified
-transparent-color colortransparent color
-trimtrim image edges
-type typeimage type
-verboseprint detailed information about the image
-versionprint version information
-virtual-pixel methodaccess method for pixels outside the boundaries of the image
-window idselect window with this id or name