gm mogrify
|
|
NAME
|
|
mogrify - mogrify an image
|
Contents
|
Synopsis
|
|
gm mogrify [ options ... ] file ...
|
Description
|
|
Mogrify transforms an image or a sequence of images. These transforms
include image scaling, image rotation, color reduction, and others. Each
transmogrified image overwrites the corresponding original image, unless an
option such as
-format causes the output filename to be different from the input
filename.
The graphics formats supported by mogrify are listed in
GraphicsMagick(1).
|
Back to Contents
Examples
|
|
To convert all the TIFF files in a particular directory to JPEG, use:
gm mogrify -format jpeg *.tiff
To convert a directory full of JPEG images to thumbnails, use:
gm mogrify -size 120x120 *.jpg -resize 120x120 +profile "*"
|
In this example, '-size 120x120' gives a hint to the JPEG decoder
that the images are 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 images. 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 thumbnails. |
To scale an image of a cockatoo to exactly 640 pixels in width and 480
pixels in height, use:
gm mogrify -resize 640x480! cockatoo.miff
|
Back to Contents
Options
|
|
Options are processed in command line order. Any option you specify on
the command line remains in effect for the set of images that follows,
until the set is terminated by the appearance of any option or -noop.
For a more detailed description of each option, see
Options, above.
GraphicsMagick(1).
| apply ASC CDL color transform |
| decrypt image with this password |
| orient (rotate) image so it is upright |
| pixels below the threshold become black |
| blue chromaticity primary point |
| blur the image with a Gaussian operator |
| surround the image with a border of color |
|
-charcoal <factor>
|
| simulate a charcoal drawing |
| colorize the image with the pen color |
| preferred number of colors in the image |
| annotate an image with a comment |
| the type of image composition |
| the type of image compression |
| enhance or reduce the image contrast |
| convolve image with the specified convolution kernel |
| create output directory if required |
|
-crop <width>x<height>{+-}<x>{+-}<y>{%}
|
| preferred size and location of the cropped image |
| displace image colormap by amount |
|
-debug <events>
|
| add coder/decoder specific options |
| display the next image after pausing |
| horizontal and vertical resolution in pixels of the image |
|
-despeckle
|
| reduce the speckles within an image |
| specifies the X server to contact |
| apply Floyd/Steinberg error diffusion to the image |
| annotate an image with one or more graphic primitives |
|
-edge <radius>
|
| detect edges within an image |
|
-emboss <radius>
|
| specify the text encoding |
| specify endianness (MSB, LSB, or Native) of image |
|
-enhance
|
| apply a digital filter to enhance a noisy image |
|
-equalize
|
| perform histogram equalization to the image |
|
-extent <width>x<height>{+-}<x>{+-}<y>
|
| composite image on background color canvas image |
| color to use when filling a graphic primitive |
| use this type of filter when resizing an image |
| use this font when annotating the image with text |
|
-frame <width>x<height>+<outer bevel width>+<inner bevel width>
|
| surround the image with an ornamental border |
| colors within this Euclidean distance are considered equal |
| level of gamma correction |
| blur the image with a Gaussian operator |
|
-geometry <width>x<height>{+-}<x>{+-}<y>{%}{@}{!}{^}{<}{>}
|
| Specify dimension, offset, and resize options. |
| direction primitive gravitates to when annotating the image. |
| green chromaticity primary point |
|
-hald-clut <clut>
|
| apply a Hald CLUT to the image |
|
-help
|
|
-implode <factor>
|
| implode image pixels about the center |
| the type of interlacing scheme |
| assign a label to an image |
|
-lat <width>x<height>{+-}<offset>{%}
|
| perform local adaptive thresholding |
|
-level <black_point>{,<gamma>}{,<white_point>}{%}
|
| adjust the level of image contrast |
| Disk, File, Map, Memory, Pixels, Width, Height, Read, Threads, or Write resource limit |
|
-linewidth
|
| the line width for subsequent draw operations |
| Specify format for debug log |
| add Netscape loop extension to your GIF animation |
|
-magnify
|
| choose a particular set of colors from this image |
| store matte channel if the image has one |
| specify the color to be used with the -frame option |
|
-median <radius>
|
| apply a median filter to the image |
|
-minify <factor>
|
| vary the brightness, saturation, and hue of an image |
|
-monitor
|
|
-monochrome
|
| transform the image to black and white |
| replace every pixel with its complementary color |
| add or reduce noise in an image |
| transform image to span the full range of color values |
| change this color to the pen color within the image |
| apply a mathematical, bitwise, or value operator to an image channel |
| output files to directory |
| Set the image orientation attribute |
|
-page <width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}
|
| size and location of an image canvas |
| (This option has been replaced by the -fill option) |
|
-pointsize <value>
|
| pointsize of the PostScript, X11, or TrueType font |
| add ICM, IPTC, or generic profile to image |
| preserve the original timestamps of the file |
| JPEG/MIFF/PNG/TIFF compression level |
| lighten or darken image edges |
| random threshold the image |
| apply a color translation matrix to image channels |
| red chromaticity primary point |
|
-region <width>x<height>{+-}<x>{+-}<y>
|
| apply options to a portion of the image |
|
-repage <width>x<height>+xoff+yoff[!]
|
| Adjust image page offsets |
| Resample image to specified horizontal and vertical resolution |
|
-resize <width>x<height>{%}{@}{!}{<}{>}
|
| roll an image vertically or horizontally |
| scale image using pixel sampling |
| chroma subsampling factors |
|
-set <attribute> <value>
|
|
-segment <cluster threshold>x<smoothing threshold>
|
| shade the image using a distant light source |
| shave pixels from the image edges |
|
-shear <x degrees>x<y degrees>
|
| shear the image along the X or Y axis |
|
-size <width>x<height>{+offset}
|
| width and height of the image |
| negate all pixels above the threshold level |
| displace image pixels by a random amount |
| remove all profiles and text attributes from the image |
| color to use when stroking a graphic primitive |
| swirl image pixels about the center |
|
-texture <filename>
|
| name of texture to tile onto the image background |
| resize an image (quickly) |
|
-tile <filename>
|
| tile image when filling a graphic primitive |
| make this color transparent within the image |
| tree depth for the color reduction algorithm |
| the units of image resolution |
|
-unsharp <radius>{x<sigma>}{+<amount>}{+<threshold>}
|
| sharpen the image with an unsharp mask operator |
| print detailed information about the image |
| print detailed GraphicsMagick version/build information |
| print compact GNU-style GraphicsMagick version information |
|
-view <string>
|
| FlashPix viewing parameters |
| specify contents of "virtual pixels" |
|
-wave <amplitude>x<wavelength>
|
| alter an image along a sine wave |
| pixels above the threshold become white |
For a more detailed description of each option, see
Options, above.
GraphicsMagick(1).
|
Back to Contents
| |