import
Capture and save X server screen
TLDR
View documentation for the original command
SYNOPSIS
import [ options ] filename
PARAMETERS
-window id
Selects a specific window by its ID to capture. The ID can be specified as 'root' to capture the root window.
-screen
Captures the entire screen.
-display host:display.screen
Specifies the X server to connect to.
-depth value
Specifies the color depth of the captured image.
-colors value
Reduces the number of colors in the image.
-delay seconds
Adds a delay in seconds before capturing the image. Useful for capturing menus or transient elements.
-quality value
Specifies the JPEG compression quality (0-100).
-frame
Includes the window manager decorations (borders, title bar) in the capture.
-silent
Suppresses informational messages.
-version
Displays the version number and copyright information.
-format type
Specify the image format type (e.g., PNG, JPG, GIF).
DESCRIPTION
The import command is a utility for capturing images from an X server and saving them into image files. It allows users to grab a specific window, a rectangular region of the screen, or the entire screen. import supports various image formats and provides options to customize the capture, such as specifying the image quality, adding a delay before capture, and selecting a specific display to capture from. It's part of the ImageMagick suite of tools and is commonly used for creating screenshots or capturing graphical elements for documentation or web content. The output format of the image file is automatically determined from its name unless explicitly specified with the `-format` parameter. import is a powerful tool for capturing visual data on Unix-like systems.
It is important to note that running the import command will override existing files if the same filename is used. Users should exercise caution when using import to avoid unintended data loss.
CAVEATS
import requires a running X server and may not function in a headless environment. It also needs proper X11 authorization to access the display. Some window managers may interfere with the capture process. You must have ImageMagick installed.
INTERACTIVE USAGE
Without specific window or screen options, import enters an interactive mode. The cursor changes to a crosshair, and the user can select a rectangular region on the screen to capture by clicking and dragging. This is useful for capturing only a portion of a window or the screen.
COMMON USE CASES
import is commonly used to automate screenshot creation within scripts, capture specific application windows for documentation, or quickly grab images for sharing online.
HISTORY
import has been developed as part of the ImageMagick suite for a long time. import usage increase with time as desktop enviroments became more available for linux. Before import , xwd was common used to capture a window.