With display, you can perform these functions on an image:
display -geometry 640x480+200+200! cockatoo.miff
display +borderwidth -backdrop cockatoo.miff
display -size 1280x1024 -window root slate.png
display 'vid:*.jpg'
display -size 640x480+256 cockatoo.map
display ftp://wizards.dupont.com/images/cockatoo.jpg
convert file.jpg HISTOGRAM:- | display -
The Transparent color space behaves uniquely in that it preserves the matte channel of the image if it exists.
Note, options -dither, -colorspace, and -treedepth affect the color reduction algorithm.
The -colors or -monochrome option is required for this option to take effect.
-comment "%m:%f %wx%h"
The equivalent X resource for this option is cropGeometry (class CropGeometry). See X Resources for details.
0 No disposal specified. 1 Do not dispose. 2 Restore to background color. 3 Restore to previous.
Use > to change the dimensions of the image only if its size exceeds the geometry specification. < resizes the image only if its dimensions is less than the geometry specification. For example, if you specify 640x480> and the image size is 512x512, the image size does not change. However, if the image is 1024x1024, it is resized to 640x480.
-label "%m:%f %wx%h"
best default gray red green blue
Letter 612x 792 Tabloid 792x1224 Ledger 1224x 792 Legal 612x1008 Statement 396x 612 Executive 540x 720 A3 842x1190 A4 595x 842 A5 420x 595 B4 729x1032 B5 516x 729 Folio 612x 936 Quarto 610x 780 10x14 720x1008
192x128 384x256 768x512 1536x1024 3072x2048
-title "%m:%f %wx%h"
StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor default visual id
display -colors 32 cockatoo.miff -colors 16 macaw.miff
-scene 0-9 image%02d.miffdisplays files image00.miff, image01.miff, through image09.miff.
If you choose Open, the image represented by the tile is displayed. To return to the visual image directory, choose Next from the Command widget (refer to Command Widget). Next and Former moves to the next or former image respectively. Choose Delete to delete a particular image tile. Finally, choose Update to synchronize all the image tiles with their respective images. See montage and miff for more details.
Ctl+O Press to load an image from a file. space Press to display the next image.
backspace Press to display the former image.
Ctl-S Press to save the image to a file. Ctl-P Press to print the image to a PostScript printer. Ctl-D Press to delete an image file. Ctl-N Press to create a blank canvas. Ctl-Q Press to discard all images and exit program. Ctl+Z Press to undo last image transformation. Ctl+R Press to redo last image transformation. Ctl-X Press to cut a region of the image. Ctl-C Press to copy a region of the image. Ctl-V Press to paste a region to the image. < Press to half the image size. . Press to return to the original image size. > Press to double the image size. % Press to resize the image to a width and height you specify. Cmd-A Press to make any image transformations permanent. By default, any image size transformations are applied to the original image to create the image displayed on the X server. However, the transformations are not permanent (i.e. the original image does not change size only the X image does). For example, if you press ;gt the X image will appear to double in size, but the original image will in fact remain the same size. To force the original image to double in size, press ;gt followed by Cmd-A. @ Press to refresh the image window. C Press to crop the image. [ Press to chop the image. H Press to flop image in the horizontal direction. V Press to flip image in the vertical direction. / Press to rotate the image 90 degrees clockwise. \ Press to rotate the image 90 degrees counter-clockwise. * Press to rotate the image the number of degrees you specify. S Press to shear the image the number of degrees you specify. R Press to roll the image. T Press to trim the image edges. Shft-H Press to vary the color hue. Shft-S Press to vary the color saturation. Shft-L Press to vary the image brightness. Shft-G Press to gamma correct the image. Shft-C Press to spiff up the image contrast. Shft-Z Press to dull the image contrast. = Press to perform histogram equalization on the image. Shft-N Press to perform histogram normalization on the image. Shft-~ Press to negate the colors of the image. . Press to convert the image colors to gray. Shft-# Press to set the maximum number of unique colors in the image. F2 Press to reduce the speckles in an image. F2 Press to emboss an image. F4 Press to eliminate peak noise from an image. F5 Press to add noise to an image. F6 Press to sharpen an image. F7 Press to blur image an image. F8 Press to threshold the image. F9 Press to detect edges within an image. F10 Press to displace pixels by a random amount. F11 Press to shade the image using a distant light source. F12 Press to lighten or darken image edges to create a 3-D effect. F13 Press to segment the image by color. Meta-S Press to swirl image pixels about the center. Meta-I Press to implode image pixels about the center. Meta-W Press to alter an image along a sine wave. Meta-P Press to simulate an oil painting. Meta-C Press to simulate a charcoal drawing. Alt-X Press to composite the image with another. Alt-A Press to annotate the image with text. Alt-D Press to draw a line on the image. Alt-P Press to edit an image pixel color. Alt-M Press to edit the image matte information. Alt-X Press to composite the image with another. Alt-A Press to add a border to the image. Alt-F Press to add a ornamental frame to the image. Shft-! Press to add an image comment. Ctl-A Press to apply image processing techniques to a region of interest. Shft-? Press to display information about the image. Shft-+ Press to map the zoom image window. Shft-P Press to preview an image enhancement, effect, or f/x. F1 Press to display helpful information about display. Find Press to browse documentation about ImageMagick. 1-9 Press to change the level of magnification.
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:
The fuzzy c-Means algorithm can be summarized as follows:
For additional information see:
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.
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.
Next, 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. Finally reset changes the entire image to the designated color.
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. You can recolor 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 is also recolored.
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.
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. 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.
Paul Raveling, USC Information Sciences Institute. The spacial subdivision color reduction algorithm is based on his Img software.