To make a thumbnail of a JPEG image, use:
gm convert -size 120x120 cockatoo.jpg -resize 120x120 +profile "*" thumbnail.jpg
|
In this example, '-size 120x120' gives a hint to the JPEG decoder
that the image is going to be downscaled to 120x120, allowing it to run
faster by avoiding returning full-resolution images to GraphicsMagick for
the subsequent resizing operation. The
'-resize 120x120' specifies the desired dimensions of the
output image. It will be scaled so its largest dimension is 120 pixels. The
'+profile "*"' removes any ICM, EXIF, IPTC, or other profiles
that might be present in the input and aren't needed in the thumbnail. |
To convert a MIFF image of a cockatoo to a SUN raster image, use:
gm convert cockatoo.miff sun:cockatoo.ras
To convert a multi-page PostScript document to individual FAX pages,
use:
gm convert -monochrome document.ps fax:page
To convert a TIFF image to a PostScript A4 page with the image in
the lower left-hand corner, use:
gm convert -page A4+0+0 image.tiff document.ps
To convert a raw Gray image with a 128 byte header to a portable graymap,
use:
gm convert -depth 8 -size 768x512+128 gray:raw image.pgm
In this example, "raw" is the input file. Its format is "gray" and it
has the dimensions and number of header bytes specified by the -size
option and the sample depth specified by the
-depth option. The output file is "image.pgm". The suffix ".pgm"
specifies its format.
To convert a Photo CD image to a TIFF image, use:
gm convert -size 1536x1024 img0009.pcd image.tiff
gm convert img0009.pcd[4] image.tiff
To create a visual image directory of all your JPEG images, use:
gm convert 'vid:*.jpg' directory.miff
To annotate an image with blue text using font 12x24 at position (100,100),
use:
gm convert -font helvetica -fill blue -draw "text 100,100 Cockatoo"
bird.jpg bird.miff
To tile a 640x480 image with a JPEG texture with bumps use:
gm convert -size 640x480 tile:bumps.jpg tiled.png
To surround an icon with an ornamental border to use with Mosaic(1), use:
gm convert -mattecolor "#697B8F" -frame 6x6 bird.jpg icon.png
To create a MNG animation from a DNA molecule sequence, use:
gm convert -delay 20 dna.* dna.mng
|