You can use a private colormap. By default, your image must share colors with existing applications on your X server. The colors in your image may be very different than the shared colors and the results may be visually unsatisfactory. Try
display -colormap private image.miffThe disadvantage is the annoying colormap loading and unloading as you move your pointer in and out of the image window.
The YCbCr colorspace may give better results when color reducing images of people faces. Try
display -colorspace YCbCr image.miff
If you intend to view an image frequently, reduce the number of colors to match the resolution of your X server once and write to a new image. Then display this new image. For example,
convert -colors 256 -dither image.jpeg image.miff display image.miff
This forces the time-consuming process of color reducing the image to one-time, rather than each time the image is displayed.
point replace floodfill
The point method changes the matte value of any pixel selected with the pointer until the button is 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.
Select your transparent pixel with the pointer and press a button. The image is redisplayed with any transparent pixels recolored to the background color. You can select other pixels or areas to force to transparent. When you are satisfied, press Return.
Finally, choose Save from the command menu and write your GIF image to a file. Note that setting transparency works best on a TrueColor or DirectColor visual. If your server only exports colormapped visuals you will need to use a Standard Colormap to set transparency.
xstdcmap -best display -map list image.gif choose Matte Edit select your transparent pixel then press Return choose SaveIf you do not have the xstdcmap(1) program, try
display -visual TrueColor image.gif
animate -title "My Image Sequence" images.
import -descend image.miffor set this X resource:
By default, import quickly grabs the image from the X server. However, it may not always have the correct colors in some areas. This can happen when a subwindow has a different colormap than its parent. With -descend, import descends the window hierarchy. Descending involves grabbing the image and colormap of each window or subwindow associated with the window you select and compositing it on a blank canvas. This can be significantly slower than just grabbing the top-level window but ensures the correct image.
animate -geometry 352x240 -scene 0-71 yuv3:frame%d
display -gamma 1.0,0.0,0.0 image.miff
ImageMagick is designed to be general purpose. It can display many image storage formats (Monochrome, PseudoColor, or TrueColor) on many different types of X visuals (StaticGray, StaticColor, PseudoColor, GrayScale, DirectColor, or TrueColor). To support all these combinations of image storage formats and X visuals, extra memory is required. In fact, each image requires up to 6 bytes per pixel to store in memory. Additionally, animate and montage store an entire image sequence in memory. ImageMagick does reduce memory requirements by compressing pixel information with run-length encoding. However, this is only effective for images with large runs of like pixels such as Postscript or computer generated images. As an example, a 1728x2500 fax image may require only 0.5mb of memory. In contrast a JPEG image this size could require 20mb of memory.
For animation, consider using the MPEG programs from Berkeley if you encounter memory limitations with animate. It only stores a few frames at a time in memory. Convert has an option to create the proper CCIR 601 2:1:1 files as input to the MPEG program. However, the CCIR 601 2:1:1 image format is lossy. Computer generated images may not look very good.
montage -mode concatenate -tile 3x1 image1.ppm image2.ppm \ image3.ppm concatenated.miff
To concatenate the images top-to-bottom, use -tile 1x3.
For more control over the placement of an image, use combine. First create a matte image and position your images onto the matte. For example,
convert -size 350x500 xc:black composite.miff combine -geometry +0+0 composite.miff image1.gif composite.miff combine -geometry +100+0 composite.miff image2.gif composite.miff combine -geometry +0+300 composite.miff image3.gif composite.miff combine -geometry +0+375 composite.miff image4.gif composite.miff
convert -delay 20 frame*.gif animation.gifYou can also declare specific delays for each frame of the image sequence. For example, if the delay was 20, 10, and 5, use
convert -delay 20 frame1.gif -delay 10 frame2.gif \ -delay 5 frame3.gif animation.gifUse -page to specify the left and top locations of the image frame:
convert frame1.gif -page +50+100 frame2.gif -page +0+100 \ frame3.gif animation.gifFinally, if you want the image to loop within Netscape, use -loop:
convert -loop 50 frame*.gif animation.gif
For further information about GIF animation, see GIF Animation on the WWW.
Note, that all the images are combined into a single multi-image GIF animation. If you want a single image produced for each frame, use +adjoin:
convert +adjoin images.* frames%d.gif
display -page letter image.ps
montage *.jpg directory.vid convert 'vid:*.jpg' directory.vid
Of course you can substitute any filenames you desire. Montage has many relevant command line options. You can exercise more control over the appearance of the VID than with convert.
Next display the directory:
Finally browse and select an image to display. Move the pointer to the image and press button 3.
You can create the VID directory with this command:
You can also select Visual Image... from the File menu of the command widget.
Note, that creating a VID is time consuming. Creating them on-the-fly within display may be less convenient than using montage or convert . Also, if you create them with montage. or convert, you can reuse them as often as necessary.
Note that a visual image directory is useful for looking at individual frames of an image sequence:
display -map list image.miffIf you want to use Color Recovery all the time, put this in your X defaults file:
Now if you need to turn off Color Recovery temporarily, type
display +dither image.miff
xwininfo -frameYou can then use the returned window ID with import:
import -frame -window ID window.miff
display +matte image.miff
cd ImageMagick rm display rm magick/decode.o magick/encode.o make
convert image.tiff image.matte display -size 640x480 gray:image.matte
A separate distribution is available to enable LZW compression for GIF, Postscript Level II, and the Portable Document Format within ImageMagick. The LZW distribution is available on ftp.wizards.dupont.com.
There are four types of ornamental borders you can add to your image with ImageMagick. Each is listed below with the procedure to use them with your image.
convert -bordercolor red -border 25x25 image.jpg image.gif
convert -raise 25 image.jpg image.gif
convert -mattecolor gray -frame 25x25 image.jpg image.gif
convert -mattecolor gray -frame 25x25+0+25 image.jpg image.gif convert -mattecolor gray -frame 25x25+25+0 image.jpg image.gif
display logo: display < /dev/console
convert -density 288 -geometry 25% image.ps image.gifChange the density to 144 and geometry to 50% if the above command fails due to insufficient memory. Alternatively, see the Ghostscript documentation about using high-quality fonts.
The -density option increases the number of pixels (or dots) generated by Ghostscript when processing the input postscript file. However as all other images formats are generally displayed on screens which are typically about 72 to 100 dots per inch, the output image will be larger.
The -geometry option reduces the large image output of ghostscript image back to a normal 72 dpi resolution (25% of 288 dpi gives 72 dpi) but in the process anti-aliases (or smooths) the fonts and lines of the image so as to remove the jaggies you would otherwise get from a normal postscript to image conversion.
xlsfonts -fn '*-0-0-0-0-*'
convert -font '-*-helvetica-*-*-*--300-300-*-*-*-*-iso8859-1' \ -pen green -draw 'text 50,300 Magick' image.png annotated.png
convert +adjoin animation.gif frame%02d.gif
convert +page alpha.gif beta.gif
Image Magic Home Page Image manipulation software that works like magic.
Популярность: 20, Last-modified: Thu, 18 Oct 2012 20:17:29 GMT