displaySection: User Commands (1)Updated: Date: 2002/02/15 01:00:00 Index NAMEdisplay - display an image on any workstation running X SYNOPSISdisplay [ options ...] file [options...]file DESCRIPTIONDisplay is a machine architecture independent image processing and display program. It can display an image on any workstation screen running an X server. Display can read and write many of the more popular image formats (e.g. JPEG, TIFF, PNM, Photo CD, etc.). With display, you can perform these functions on an image:
EXAMPLESTo scale an image of a cockatoo to exactly 640 pixels in width and 480 pixels in height and position the window at location (200,200), use:
To display an image of a cockatoo without a border centered on a backdrop, use:
To tile a slate texture onto the root window, use:
To display a visual image directory of all your JPEG images, use:
To display a MAP image that is 640 pixels in width and 480 pixels in height with 256 colors, use:
To display an image of a cockatoo specified with a World Wide Web (WWW) uniform resource locator (URL), use:
To display histogram of an image, use:
OPTIONSOptions are processed in command line order. Any option you specify on the command line remains in effect until it is explicitly changed by specifying the option again with a different effect. For example to display three images, the first with 32 colors, the second with an unlimited number of colors, and the third with only 16 colors, use:
Display options can appear on the command line or in your X resources file. See X(1). Options on the command line supersede values specified in your X resources file. For a more detailed description of each option, see imagemagick(1).
MOUSE BUTTONSThe effects of each button press is described below. Three buttons are required. If you have a two button mouse, button 1 and 3 are returned. Press ALT and button 3 to simulate button 2.
COMMAND WIDGETThe Command widget lists a number of sub-menus and commands. They are
Menu items with a indented triangle have a sub-menu. They are represented above as the indented items. To access a sub-menu item, move the pointer to the appropriate menu and press button 1 and drag. When you find the desired sub-menu item, release the button and the command is executed. Move the pointer away from the sub-menu if you decide not to execute a particular command. KEYBOARD ACCELERATORSAccelerators are one or two key presses that effect a particular command. The keyboard accelerators that display understands is:
If the image is a multi-paged document such as a PostScript document, you can skip ahead several pages by preceding this command with a number. For example to display the fourth page beyond the current page, press 4space.
If the image is a multi-paged document such as a PostScript document, you can skip behind several pages by preceding this command with a number. For example to display the fourth page preceding the current page, press 4n.
Use the arrow keys to move the image one pixel up, down, left, or right within the magnify window. Be sure to first map the magnify window by pressing button 2. Press ALT and one of the arrow keys to trim off one pixel from any side of the image. X RESOURCESDisplay options can appear on the command line or in your X resource file. Options on the command line supersede values specified in your X resource file. See X(1) for more information on X resources. Most display options have a corresponding X resource. In addition, display uses the following X resources:
IMAGE LOADINGTo select an image to display, choose Open of the File sub-menu from the Command widget. A file browser is displayed. To choose a particular image file, move the pointer to the filename and press any button. The filename is copied to the text window. Next, press Open or press the RETURN key. Alternatively, you can type the image file name directly into the text window. To descend directories, choose a directory name and press the button twice quickly. A scrollbar allows a large list of filenames to be moved through the viewing area if it exceeds the size of the list area. You can trim the list of file names by using shell globbing characters. For example, type *.jpg to list only files that end with .jpg. To select your image from the X server screen instead of from a file, Choose Grab of the Open widget. VISUAL IMAGE DIRECTORYTo create a Visual Image Directory, choose Visual Directory of the File sub-menu from the Command widget . A file browser is displayed. To create a Visual Image Directory from all the images in the current directory, press Directory or press the RETURN key. Alternatively, you can select a set of image names by using shell globbing characters. For example, type *.jpg to include only files that end with .jpg. To descend directories, choose a directory name and press the button twice quickly. A scrollbar allows a large list of filenames to be moved through the viewing area if it exceeds the size of the list area. After you select a set of files, they are turned into thumbnails and tiled onto a single image. Now move the pointer to a particular thumbnail and press button 3 and drag. Finally, select Open. The image represented by the thumbnail is displayed at its full size. Choose Next from the File sub-menu of the Command widget to return to the Visual Image Directory. IMAGE CUTTINGNote that cut information for image window is not retained for colormapped X server visuals (e.g. StaticColor, StaticColor, GRAYScale, PseudoColor). Correct cutting behavior may require a TrueColor or DirectColor visual or a Standard Colormap. To begin, press choose Cut of the Edit sub-menu from the Command widget. Alternatively, press F3 in the image window. A small window appears showing the location of the cursor in the image window. You are now in cut mode. In cut mode, the Command widget has these options:
To define a cut region, press button 1 and drag. The cut region is defined by a highlighted rectangle that expands or contracts as it follows the pointer. Once you are satisfied with the cut region, release the button. You are now in rectify mode. In rectify mode, the Command widget has these options:
You can make adjustments by moving the pointer to one of the cut rectangle corners, pressing a button, and dragging. Finally, press Cut to commit your copy region. To exit without cutting the image, press Dismiss. IMAGE COPYINGTo begin, press choose Copy of the Edit sub-menu from the Command widget. Alternatively, press F4 in the image window. A small window appears showing the location of the cursor in the image window. You are now in copy mode. In copy mode, the Command widget has these options:
To define a copy region, press button 1 and drag. The copy region is defined by a highlighted rectangle that expands or contracts as it follows the pointer. Once you are satisfied with the copy region, release the button. You are now in rectify mode. In rectify mode, the Command widget has these options:
You can make adjustments by moving the pointer to one of the copy rectangle corners, pressing a button, and dragging. Finally, press Copy to commit your copy region. To exit without copying the image, press Dismiss. IMAGE PASTINGTo begin, press choose Paste of the Edit sub-menu from the Command widget. Alternatively, press F5 in the image window. A small window appears showing the location of the cursor in the image window. You are now in Paste mode. To exit immediately, press Dismiss. In Paste mode, the Command widget has these options:
Choose a composite operation from the Operators sub-menu of the Command widget. How each operator behaves is described below. image window is the image currently displayed on your X server and image is the image obtained with the File Browser widget.
IMAGE CROPPINGTo begin, press choose Crop of the Transform submenu from the Command widget. Alternatively, press [ in the image window. A small window appears showing the location of the cursor in the image window. You are now in crop mode. In crop mode, the Command widget has these options:
To define a cropping region, press button 1 and drag. The cropping region is defined by a highlighted rectangle that expands or contracts as it follows the pointer. Once you are satisfied with the cropping region, release the button. You are now in rectify mode. In rectify mode, the Command widget has these options:
You can make adjustments by moving the pointer to one of the cropping rectangle corners, pressing a button, and dragging. Finally, press Crop to commit your cropping region. To exit without cropping the image, press Dismiss. IMAGE CHOPPINGAn image is chopped interactively. There is no command line argument to chop an image. To begin, choose Chop of the Transform sub-menu from the Command widget. Alternatively, press ] in the Image window. You are now in Chop mode. To exit immediately, press Dismiss. In Chop mode, the Command widget has these options:
If the you choose the horizontal direction (this is the default), the area of the image between the two horizontal endpoints of the chop line is removed. Otherwise, the area of the image between the two vertical endpoints of the chop line is removed. Select a location within the image window to begin your chop, press and hold any button. Next, move the pointer to another location in the image. As you move a line will connect the initial location and the pointer. When you release the button, the area within the image to chop is determined by which direction you choose from the Command widget. To cancel the image chopping, move the pointer back to the starting point of the line and release the button. IMAGE ROTATIONPress the / key to rotate the image 90 degrees or \ to rotate -90 degrees. To interactively choose the degree of rotation, choose Rotate... of the Transform submenu from the Command Widget. Alternatively, press * in the image window. A small horizontal line is drawn next to the pointer. You are now in rotate mode. To exit immediately, press Dismiss. In rotate mode, the Command widget has these options:
Choose a background color from the Pixel Color sub-menu. Additional background colors can be specified with the color browser. You can change the menu colors by setting the X resources pen1 through pen9. If you choose the color browser and press Grab, you can select the background color by moving the pointer to the desired color on the screen and press any button. Choose a point in the image window and press this button and hold. Next, move the pointer to another location in the image. As you move a line connects the initial location and the pointer. When you release the button, the degree of image rotation is determined by the slope of the line you just drew. The slope is relative to the direction you choose from the Direction sub-menu of the Command widget. To cancel the image rotation, move the pointer back to the starting point of the line and release the button. IMAGE SEGMENTATIONChoose Effects->Segment to segment an image by analyzing the histograms of the color components and identifying units that are homogeneous with the fuzzy c-means technique. The scale-space filter analyzes the histograms of the three color components of the image and identifies a set of classes. The extents of each class is used to coarsely segment the image with thresholding. The color associated with each class is determined by the mean color of all pixels within the extents of a particular class. Finally, any unclassified pixels are assigned to the closest class with the fuzzy c-means technique. The fuzzy c-Means algorithm can be summarized as follows:
The fuzzy c-Means technique attempts to cluster a pixel by finding the local minima of the generalized within group sum of squared error objective function. A pixel is assigned to the closest class of which the fuzzy membership has a maximum value. For additional information see: <bq>Young Won Lim, Sang Uk Lee, "On The Color Image Segmentation Algorithm Based on the Thresholding and the Fuzzy c-Means Techniques", Pattern Recognition, Volume 23, Number 9, pages 935-952, 1990.</bq> IMAGE ANNOTATIONAn image is annotated interactively. There is no command line argument to annotate an image. To begin, choose Annotate of the Image Edit sub-menu from the Command widget. Alternatively, press a in the image window. A small window appears showing the location of the cursor in the image window. You are now in annotate mode. To exit immediately, press Dismiss. In annotate mode, the Command widget has these options:
Choose a font name from the Font Name sub-menu. Additional font names can be specified with the font browser. You can change the menu names by setting the X resources font1 through font9. Choose a font color from the Font Color sub-menu. Additional font colors can be specified with the color browser. You can change the menu colors by setting the X resources pen1 through pen9. If you select the color browser and press Grab, you can choose the font color by moving the pointer to the desired color on the screen and press any button. If you choose to rotate the text, choose Rotate Text from the menu and select an angle. Typically you will only want to rotate one line of text at a time. Depending on the angle you choose, subsequent lines may end up overwriting each other. Choosing a font and its color is optional. The default font is fixed and the default color is black. However, you must choose a location to begin entering text and press a button. An underscore character will appear at the location of the pointer. The cursor changes to a pencil to indicate you are in text mode. To exit immediately, press Dismiss. In text mode, any key presses will display the character at the location of the underscore and advance the underscore cursor. Enter your text and once completed press Apply to finish your image annotation. To correct errors press BACK SPACE. To delete an entire line of text, press DELETE. Any text that exceeds the boundaries of the image window is automatically continued onto the next line. The actual color you request for the font is saved in the image. However, the color that appears in your Image window may be different. For example, on a monochrome screen the text will appear black or white even if you choose the color red as the font color. However, the image saved to a file with -write is written with red lettering. To assure the correct color text in the final image, any PseudoClass image is promoted to DirectClass (see miff(5)). To force a PseudoClass image to remain PseudoClass, use -colors. IMAGE COMPOSITINGAn image composite is created interactively. There is no command line argument to composite an image. To begin, choose Composite of the Image Edit from the Command widget. Alternatively, press x in the Image window. First a popup window is displayed requesting you to enter an image name. Press Composite, Grab or type a file name. Press Cancel if you choose not to create a composite image. When you choose Grab, move the pointer to the desired window and press any button. If the Composite image does not have any matte information, you are informed and the file browser is displayed again. Enter the name of a mask image. The image is typically grayscale and the same size as the composite image. If the image is not grayscale, it is converted to grayscale and the resulting intensities are used as matte information. A small window appears showing the location of the cursor in the image window. You are now in composite mode. To exit immediately, press Dismiss. In composite mode, the Command widget has these options:
Choose a composite operation from the Operators sub-menu of the Command widget. How each operator behaves is described below. image window is the image currently displayed on your X server and image is the image obtained
COLOR EDITINGChanging the the color of a set of pixels is performed interactively. There is no command line argument to edit a pixel. To begin, choose Color from the Image Edit submenu of the Command widget. Alternatively, press c in the image window. A small window appears showing the location of the cursor in the image window. You are now in color edit mode. To exit immediately, press Dismiss. In color edit mode, the Command widget has these options:
Choose a color editing method from the Method sub-menu of the Command widget. The point method recolors any pixel selected with the pointer unless the button is released. The replace method recolors any pixel that matches the color of the pixel you select with a button press. Floodfill recolors any pixel that matches the color of the pixel you select with a button press and is a neighbor. Whereas filltoborder changes the matte value of any neighbor pixel that is not the border color. Finally reset changes the entire image to the designated color. Next, choose a pixel color from the Pixel Color sub-menu. Additional pixel colors can be specified with the color browser. You can change the menu colors by setting the X resources pen1 through pen9. Now press button 1 to select a pixel within the Image window to change its color. Additional pixels may be recolored as prescribed by the method you choose. additional pixels by increasing the Delta value. If the Magnify widget is mapped, it can be helpful in positioning your pointer within the image (refer to button 2). Alternatively you can select a pixel to recolor from within the Magnify widget. Move the pointer to the Magnify widget and position the pixel with the cursor control keys. Finally, press a button to recolor the selected pixel (or pixels). The actual color you request for the pixels is saved in the image. However, the color that appears in your Image window may be different. For example, on a monochrome screen the pixel will appear black or white even if you choose the color red as the pixel color. However, the image saved to a file with -write is written with red pixels. To assure the correct color text in the final image, any PseudoClass image is promoted to DirectClass To force a PseudoClass image to remain PseudoClass, use -colors. MATTE EDITINGMatte information within an image is useful for some operations such as image compositing. This extra channel usually defines a mask which represents a sort of a cookie-cutter for the image. This is the case when matte is 255 (full coverage) for pixels inside the shape, zero outside, and between zero and 255 on the boundary. Setting the matte information in an image is done interactively. There is no command line argument to edit a pixel. To begin, and choose Matte of the Image Edit sub-menu from the Command widget. Alternatively, press m in the image window. A small window appears showing the location of the cursor in the image window. You are now in matte edit mode. To exit immediately, press Dismiss. In matte edit mode, the Command widget has these options:
Choose a matte editing method from the Method sub-menu of the Command widget. The point method changes the matte value of the any pixel selected with the pointer until the button is released. The replace method changes the matte value of any pixel that matches the color of the pixel you select with a button press. Floodfill changes the matte value of any pixel that matches the color of the pixel you select with a button press and is a neighbor. Whereas filltoborder recolors any neighbor pixel that is not the border color. Finally reset changes the entire image to the designated matte value. Choose Matte Value and a dialog appears requesting a matte value. Enter a value between 0 and 255. This value is assigned as the matte value of the selected pixel or pixels. Now, press any button to select a pixel within the Image window to change its matte value. You can change the matte value of additional pixels by increasing the Delta value. The Delta value is first added then subtracted from the red, green, and blue of the target color. Any pixels within the range also have their matte value updated. If the Magnify widget is mapped, it can be helpful in positioning your pointer within the image (refer to button 2). Alternatively you can select a pixel to change the matte value from within the Magnify widget. Move the pointer to the Magnify widget and position the pixel with the cursor control keys. Finally, press a button to change the matte value of the selected pixel (or pixels). Matte information is only valid in a DirectClass image. Therefore, any PseudoClass image is promoted to DirectClass. Note that matte information for PseudoClass is not retained for colormapped X server visuals (e.g. StaticColor, StaticColor, GrayScale, PseudoColor) unless you immediately save your image to a file (refer to Write). Correct matte editing behavior may require a TrueColor or DirectColor visual or a Standard Colormap. IMAGE DRAWINGAn image is drawn upon interactively. There is no command line argument to draw on an image. To begin, choose Draw of the Image Edit sub-menu from the Command widget. Alternatively, press d in the image window. The cursor changes to a crosshair to indicate you are in draw mode. To exit immediately, press Dismiss. In draw mode, the Command widget has these options:
Choose a drawing primitive from the Primitive sub-menu. Next, choose a color from the Color sub-menu. Additional colors can be specified with the color browser. You can change the menu colors by setting the X resources pen1 through pen9. The transparent color updates the image matte channel and is useful for image compositing. If you choose the color browser and press Grab, you can select the primitive color by moving the pointer to the desired color on the screen and press any button. The transparent color updates the image matte channel and is useful for image compositing. Choose a stipple, if appropriate, from the Stipple sub-menu. Additional stipples can be specified with the file browser. Stipples obtained from the file browser must be on disk in the X11 bitmap format. Choose a line width, if appropriate, from the Width sub-menu. To choose a specific width select the Dialog widget. Choose a point in the image window and press button 1 and hold. Next, move the pointer to another location in the image. As you move, a line connects the initial location and the pointer. When you release the button, the image is updated with the primitive you just drew. For polygons, the image is updated when you press and release the button without moving the pointer. To cancel image drawing, move the pointer back to the starting point of the line and release the button. REGION OF INTERESTTo begin, press choose Region of Interest of the Pixel Transform sub-menu from the Command widget. Alternatively, press R in the image window. A small window appears showing the location of the cursor in the image window. You are now in region of interest mode. In region of interest mode, the Command widget has these options:
To define a region of interest, press button 1 and drag. The region of interest is defined by a highlighted rectangle that expands or contracts as it follows the pointer. Once you are satisfied with the region of interest, release the button. You are now in apply mode. In apply mode the Command widget has these options:
You can make adjustments to the region of interest by moving the pointer to one of the rectangle corners, pressing a button, and dragging. Finally, choose an image processing technique from the Command widget. You can choose more than one image processing technique to apply to an area. Alternatively, you can move the region of interest before applying another image processing technique. To exit, press Dismiss. IMAGE PANNINGWhen an image exceeds the width or height of the X server screen, display maps a small panning icon. The rectangle within the panning icon shows the area that is currently displayed in the the image window. To pan about the image, press any button and drag the pointer within the panning icon. The pan rectangle moves with the pointer and the image window is updated to reflect the location of the rectangle within the panning icon. When you have selected the area of the image you wish to view, release the button. Use the arrow keys to pan the image one pixel up, down, left, or right within the image window. The panning icon is withdrawn if the image becomes smaller than the dimensions of the X server screen. USER PREFERENCESPreferences affect the default behavior of display(1). The preferences are either true or false and are stored in your home directory as .displayrc:
display image centered on a backdrop"
This backdrop covers the entire workstation screen and is useful for hiding
other X window activity while viewing the image. The color of the backdrop
is specified as the background color. Refer to X Resources
for details.
confirm on program exit"
Ask for a confirmation before exiting the display(1) program.
correct image for display gamma"
If the image has a known gamma, the gamma is corrected to match that of
the X server (see the X Resource displayGamma).
apply Floyd/Steinberg error diffusion to image"
The basic strategy of dithering is to trade intensity resolution for spatial
resolution by averaging the intensities of several neighboring pixels.
Images which suffer from severe contouring when reducing colors can be
improved with this preference.
use a shared colormap for colormapped X visuals"
This option only applies when the default X server visual is
PseudoColor
or GRAYScale. Refer to -visual for more details. By default,
a shared colormap is allocated. The image shares colors with other X clients.
Some image colors could be approximated, therefore your image may look
very different than intended. Otherwise the image colors appear exactly
as they are defined. However, other clients may go technicolor when the
image colormap is installed.
display images as an X server pixmap"
Images are maintained as a XImage by default. Set this resource to True to utilize a server Pixmap instead. This option is useful if your image exceeds the dimensions of your server screen and you intend to pan the image. Panning is much faster with Pixmaps than with a XImage. Pixmaps are considered a precious resource, use them with discretion. ENVIRONMENT
ACKNOWLEDGEMENTSThe MIT X Consortium for making network transparent graphics a reality. Peder Langlo, Hewlett Packard, Norway, made hundreds of suggestions and bug reports. Without Peder, ImageMagick would not be nearly as useful as it is today. Rod Bogart and John W. Peterson, University of Utah. Image compositing is loosely based on rlecomp of the Utah Raster Toolkit. Michael Halle, Spatial Imaging Group at MIT, for the initial implementation of Alan Paeth's image rotation algorithm. David Pensak, ImageMagick Studio, for providing a computing environment that made this program possible. Paul Raveling, USC Information Sciences Institute. The spatial subdivision color reduction algorithm is based on his Img software. SEE ALSOanimate(1), composite(1), conjure(1), convert(1), identify(1), ImageMagick(1), import(1), mogrify(1), montage(1) COPYRIGHTCopyright (C) 2002 ImageMagick Studio Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files ("ImageMagick"), to deal in ImageMagick without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of ImageMagick, and to permit persons to whom the ImageMagick is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of ImageMagick. The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement.In no event shall ImageMagick Studio be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with ImageMagick or the use or other dealings in ImageMagick. Except as contained in this notice, the name of the ImageMagick Studio LLC shall not be used in advertising or otherwise to promote the sale, use or other dealings in ImageMagick without prior written authorization from the ImageMagick Studio. AUTHORSJohn Cristy, ImageMagick Studio LLC, Glenn Randers-Pehrson, ImageMagick Studio LLC.
Index
Created from the Linux Online Manual Pages |