1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627
|
.TH mogrify 1 "Date: 2004/01/01 01:00:00" "ImageMagick"
.SH MOGRIFY
.SH NAME
mogrify - mogrify an image
.SH SYNOPSIS
\fBmogrify\fP \fB[\fP \fIoptions\fP \fB... ]\fP \fIfile ...\fP
.SH DESCRIPTION
\fBMogrify\fP 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
\fB-format\fP causes the output filename to be different from the input
filename.
The graphics formats supported by \fBmogrify\fP are listed in
\fIImageMagick(1)\fP.
.SH EXAMPLES
To convert all the TIFF files in a particular directory to JPEG, use:
mogrify -format jpeg *.tiff
To convert a directory full of JPEG images to thumbnails, use:
mogrify -size 120x120 -resize 120x120 +profile "*" *.jpg
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 ImageMagick 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:
mogrify -resize 640x480! cockatoo.miff
.SH 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 \fB-noop\fP.
For a more detailed description of each option, see
Options, above.
\fIImageMagick(1)\fP.
.TP
.B "-affine \fI<matrix>"\fP
\fRdrawing transform matrix
.TP
.B "-antialias"
\fRremove pixel aliasing
.TP
.B "-authenticate \fI<string>"\fP
\fRdecrypt image with this password
.TP
.B "-background \fI<color>"\fP
\fRthe background color
.TP
.B "-blue-primary \fI<x>,<y>"\fP
\fRblue chromaticity primary point
.TP
.B "-blur \fI<radius>{x<sigma>}"\fP
\fRblur the image with a Gaussian operator
.TP
.B "-border \fI<width>x<height>"\fP
\fRsurround the image with a border of color
.TP
.B "-bordercolor \fI<color>"\fP
\fRthe border color
.TP
.B "-cache \fI<threshold>"\fP
\fR(This option has been replaced by the -limit option)
.TP
.B "-channel \fI<type>"\fP
\fRthe type of channel
.TP
.B "-charcoal \fI<factor>"\fP
\fRsimulate a charcoal drawing
.TP
.B "-colorize \fI<value>"\fP
\fRcolorize the image with the fill color
.TP
.B "-colors \fI<value>"\fP
\fRpreferred number of colors in the image
.TP
.B "-colorspace \fI<value>"\fP
\fRthe type of colorspace
.TP
.B "-comment \fI<string>"\fP
\fRannotate an image with a comment
.TP
.B "-compress \fI<type>"\fP
\fRthe type of image compression
.TP
.B "-contrast"
\fRenhance or reduce the image contrast
.TP
.B "-convolve \fI<kernel>"\fP
\fRconvolve image with the specified convolution kernel
.TP
.B "-crop \fI<width>x<height>{+-}<x>{+-}<y>{%}"\fP
\fRpreferred size and location of the cropped image
.TP
.B "-cycle \fI<amount>"\fP
\fRdisplace image colormap by amount
.TP
.B "-debug \fI<events>"\fP
\fRenable debug printout
.TP
.B "-define \fI<key>{=<value>},..."\fP
\fRadd coder/decoder specific options
.TP
.B "-delay \fI<1/100ths of a second>"\fP
\fRdisplay the next image after pausing
.TP
.B "-density \fI<width>x<height>"\fP
\fRhorizontal and vertical resolution in pixels of the image
.TP
.B "-depth \fI<value>"\fP
\fRdepth of the image
.TP
.B "-despeckle"
\fRreduce the speckles within an image
.TP
.B "-display \fI<host:display[.screen]>"\fP
\fRspecifies the X server to contact
.TP
.B "-dispose \fI<method>"\fP
\fRGIF disposal method
.TP
.B "-dither"
\fRapply Floyd/Steinberg error diffusion to the image
.TP
.B "-draw \fI<string>"\fP
\fRannotate an image with one or more graphic primitives
.TP
.B "-edge \fI<radius>"\fP
\fRdetect edges within an image
.TP
.B "-emboss \fI<radius>"\fP
\fRemboss an image
.TP
.B "-encoding \fI<type>"\fP
\fRspecify the text encoding
.TP
.B "-endian \fI<type>"\fP
\fRspecify endianness (MSB or LSB) of output image
.TP
.B "-enhance"
\fRapply a digital filter to enhance a noisy image
.TP
.B "-equalize"
\fRperform histogram equalization to the image
.TP
.B "-evaluate \fI<operator> <constant>"\fP
\fRevaluate an arithmetic, relational, or logical expression
.TP
.B "-fill \fI<color>"\fP
\fRcolor to use when filling a graphic primitive
.TP
.B "-filter \fI<type>"\fP
\fRuse this type of filter when resizing an image
.TP
.B "-flip"
\fRcreate a "mirror image"
.TP
.B "-flop"
\fRcreate a "mirror image"
.TP
.B "-font \fI<name>"\fP
\fRuse this font when annotating the image with text
.TP
.B "-format \fI<type>"\fP
\fRthe image format type
.TP
.B "-frame \fI<width>x<height>+<outer bevel width>+<inner bevel width>"\fP
\fRsurround the image with an ornamental border
.TP
.B "-fuzz \fI<distance>{%}"\fP
\fRcolors within this distance are considered equal
.TP
.B "-gamma \fI<value>"\fP
\fRlevel of gamma correction
.TP
.B "-Gaussian \fI<radius>{x<sigma>}"\fP
\fRblur the image with a Gaussian operator
.TP
.B "-geometry \fI<width>x<height>{+-}<x>{+-}<y>{%}{@} {!}{<}{>}"\fP
\fRpreferred size and location of the Image window.
.TP
.B "-gravity \fI<type>"\fP
\fRdirection primitive gravitates to when annotating the image.
.TP
.B "-green-primary \fI<x>,<y>"\fP
\fRgreen chromaticity primary point
.TP
.B "-help"
\fRprint usage instructions
.TP
.B "-implode \fI<factor>"\fP
\fRimplode image pixels about the center
.TP
.B "-interlace \fI<type>"\fP
\fRthe type of interlacing scheme
.TP
.B "-label \fI<name>"\fP
\fRassign a label to an image
.TP
.B "-lat \fI<width>x<height>{+-}<offset>{%}"\fP
\fRperform local adaptive thresholding
.TP
.B "-level \fI<black_point>{,<gamma>}{,<white_point>}{%}"\fP
\fRadjust the level of image contrast
.TP
.B "-limit \fI<type> <value>"\fP
\fRArea, Disk, File, Map, or Memory resource limit
.TP
.B "-linewidth"
\fRthe line width for subsequent draw operations
.TP
.B "-list \fI<type>"\fP
\fRthe type of list
.TP
.B "-log \fI<string>"\fP
\fRSpecify format for debug log
.TP
.B "-loop \fI<iterations>"\fP
\fRadd Netscape loop extension to your GIF animation
.TP
.B "-map \fI<filename>"\fP
\fRchoose a particular set of colors from this image
.TP
.B "-mask \fI<filename>"\fP
\fRSpecify a clipping mask
.TP
.B "-matte"
\fRstore matte channel if the image has one
.TP
.B "-mattecolor \fI<color>"\fP
\fRspecify the color to be used with the \fB-frame\fP option
.TP
.B "-median \fI<radius>"\fP
\fRapply a median filter to the image
.TP
.B "-modulate \fI<value>"\fP
\fRvary the brightness, saturation, and hue of an image
.TP
.B "-monochrome"
\fRtransform the image to black and white
.TP
.B "-negate"
\fRreplace every pixel with its complementary color
.TP
.B "-noise \fI<radius|type>"\fP
\fRadd or reduce noise in an image
.TP
.B "-normalize"
\fRtransform image to span the full range of color values
.TP
.B "-opaque \fI<color>"\fP
\fRchange this color to the fill color within the image
.TP
.B "-page \fI<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}"\fP
\fRsize and location of an image canvas
.TP
.B "-paint \fI<radius>"\fP
\fRsimulate an oil painting
.TP
.B "-pen \fI<color>"\fP
\fR(This option has been replaced by the -fill option)
.TP
.B "-pointsize \fI<value>"\fP
\fRpointsize of the PostScript, OPTION1, or TrueType font
.TP
.B "-posterize \fI<levels>"\fP
\fRreduce the image to a limited number of color levels
.TP
.B "-profile \fI<filename>"\fP
\fRadd ICM, IPTC, or generic profile to image
.TP
.B "-quality \fI<value>"\fP
\fRJPEG/MIFF/PNG compression level
.TP
.B "-radial-blur \fIangle"\fP
\fRradial blur the image
.TP
.B "-raise \fI<width>x<height>"\fP
\fRlighten or darken image edges
.TP
.B "-red-primary \fI<x>,<y>"\fP
\fRred chromaticity primary point
.TP
.B "-region \fI<width>x<height>{+-}<x>{+-}<y>"\fP
\fRapply options to a portion of the image
.TP
.B "-render"
\fRrender vector operations
.TP
.B "-repage \fI<width>x<height>{+-}<x>{+-}<y>{%}{!}{<}{>}"\fP
\fRsize and location of an image canvas. This option is like -page but
act as an image operator rather than a setting.
.TP
.B "-resample \fI<horizontal>x<vertical>"\fP
\fRResample image to specified horizontal and vertical resolution
.TP
.B "-resize \fI<width>x<height>{%}{@}{!}{<}{>}"\fP
\fRresize an image
.TP
.B "-roll \fI{+-}<x>{+-}<y>"\fP
\fRroll an image vertically or horizontally
.TP
.B "-rotate \fI<degrees>{<}{>}"\fP
\fRapply Paeth image rotation to the image
.TP
.B "-sample \fI<geometry>"\fP
\fRscale image using pixel sampling
.TP
.B "-sampling-factor \fI<horizontal_factor>x<vertical_factor>"\fP
\fRsampling factors used by JPEG or MPEG-2 encoder and YUV decoder/encoder.
.TP
.B "-scale \fI<geometry>"\fP
\fRscale the image.
.TP
.B "-scene \fI<value>"\fP
\fRset scene number
.TP
.B "-segment \fI<cluster threshold>x<smoothing threshold>"\fP
\fRsegment an image
.TP
.B "-shade \fI<azimuth>x<elevation>"\fP
\fRshade the image using a distant light source
.TP
.B "-sharpen \fI<radius>{x<sigma>}"\fP
\fRsharpen the image
.TP
.B "-shave \fI<width>x<height>{%}"\fP
\fRshave pixels from the image edges
.TP
.B "-shear \fI<x degrees>x<y degrees>"\fP
\fRshear the image along the X or Y axis
.TP
.B "-size \fI<width>x<height>{+offset}"\fP
\fRwidth and height of the image
.TP
.B "-solarize \fI<factor>"\fP
\fRnegate all pixels above the threshold level
.TP
.B "-splice \fI<width>x<height>{+-}<x>{+-}<y>{%}>"\fP
\fRsplice the background color into the image
.TP
.B "-spread \fI<amount>"\fP
\fRdisplace image pixels by a random amount
.TP
.B "-strip \fI"\fP
\fRstrip the image of any profiles or comments
.TP
.B "-stroke \fI<color>"\fP
\fRcolor to use when stroking a graphic primitive
.TP
.B "-strokewidth \fI<value>"\fP
\fRset the stroke width
.TP
.B "-swirl \fI<degrees>"\fP
\fRswirl image pixels about the center
.TP
.B "-texture \fI<filename>"\fP
\fRname of texture to tile onto the image background
.TP
.B "-threshold \fI<value>{<green>,<blue>,<opacity>}{%}"\fP
\fRthreshold the image
.TP
.B "-thumbnail \fI<width>x<height>{%}{@}{!}{<}{>}"\fP
\fRcreate a thumbnail of the image
.TP
.B "-tile \fI<filename>"\fP
\fRtile image when filling a graphic primitive
.TP
.B "-tint \fI<value>"\fP
\fRtint the image with the fill color
.TP
.B "-transform"
\fRtransform the image
.TP
.B "-transparent \fI<color>"\fP
\fRmake this color transparent within the image
.TP
.B "-treedepth \fI<value>"\fP
\fRtree depth for the color reduction algorithm
.TP
.B "-trim"
\fRtrim an image
.TP
.B "-type \fI<type>"\fP
\fRthe image type
.TP
.B "-units \fI<type>"\fP
\fRthe units of image resolution
.TP
.B "-unsharp \fI<radius>{x<sigma>}{+<amount>}{+<threshold>}"\fP
\fRsharpen the image with an unsharp mask operator
.TP
.B "-verbose"
\fRprint detailed information about the image
.TP
.B "-version"
\fRprint ImageMagick version string
.TP
.B "-view \fI<string>"\fP
\fRFlashPix viewing parameters
.TP
.B "-virtual-pixel \fI<method>"\fP
\fRspecify contents of "virtual pixels"
.TP
.B "-wave \fI<amplitude>x<wavelength>"\fP
\fRalter an image along a sine wave
.TP
.B "-white-point \fI<x>,<y>"\fP
\fRchromaticity white point
For a more detailed description of each option, see
Options, above.
\fIImageMagick(1)\fP.
.SH IMAGE SEGMENTATION
Use \fB-segment\fP 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:
Build a histogram, one for each color component of the image.
For each histogram, successively apply the scale-space filter and build
an interval tree of zero crossings in the second derivative at each scale.
Analyze this scale-space "fingerprint" to determine which peaks or valleys
in the histogram are most predominant.
The fingerprint defines intervals on the axis of the histogram. Each interval
contains either a minima or a maxima in the original signal. If each color
component lies within the maxima interval, that pixel is considered "classified"
and is assigned an unique class number.
Any pixel that fails to be classified in the above thresholding pass is
classified using the fuzzy c-Means technique. It is assigned to one of
the classes discovered in the histogram analysis phase.
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>\fIYoung Won Lim, Sang Uk Lee\fP, ``\fBOn The Color Image Segmentation
Algorithm Based on the Thresholding and the Fuzzy c-Means Techniques\fP'',
Pattern Recognition, Volume 23, Number 9, pages 935-952, 1990.</bq>
.SH ENVIRONMENT
.TP
.B "COLUMNS"
\fROutput screen width. Used when formatting text for the screen. Many
Unix systems keep this shell variable up to date, but it may need to be
explicitly exported in order for ImageMagick to see it.
.TP
.B "DISPLAY"
\fRX11 display ID (host, display number, and screen in the form
hostname:display.screen).
.TP
.B "HOME"
\fRLocation of user's home directory. ImageMagick searches for
configuration files in $HOME/.magick if the directory exists. See
\fBMAGICK_CODER_MODULE_PATH\fP, \fBMAGICK_CONFIGURE_PATH\fP, and
\fBMAGICK_FILTER_MODULE_PATH\fP if more flexibility is needed.
.TP
.B "MAGICK_CODER_MODULE_PATH"
\fRSearch path to use when searching for image format coder modules.
This path allows the user to arbitrarily extend the image formats
supported by ImageMagick by adding loadable modules to an arbitrary
location rather than copying them into the ImageMagick installation
directory. The formatting of the search path is similar to operating
system search paths (i.e. colon delimited for Unix, and semi-colon
delimited for Microsoft Windows). This user specified search path is used
before trying the default search path.
.TP
.B "MAGICK_CONFIGURE_PATH"
\fRSearch path to use when searching for configuration (.mgk) files.
The formatting of the search path is similar to operating system search
paths (i.e. colon delimited for Unix, and semi-colon delimited for
Microsoft Windows). This user specified search path is used before trying
the default search path.
.TP
.B "MAGICK_DEBUG"
\fRDebug options (see \fB-debug\fP for details)
.TP
.B "MAGICK_FILTER_MODULE_PATH"
\fRSearch path to use when searching for filter process modules
(invoked via \fB-process\fP). This path allows the user to arbitrarily
extend ImageMagick's image processing functionality by adding loadable
modules to an arbitrary location rather than copying them into the
ImageMagick installation directory. The formatting of the search path
is similar to operating system search paths (i.e. colon delimited for
Unix, and semi-colon delimited for Microsoft Windows). This user
specified search path is used before trying the default search path.
.TP
.B "MAGICK_FONT_PATH"
\fRDirectory where ImageMagick should look for TrueType and
Postscript Type1 font files if the font file is not found in the current
directory. It is preferred to define the available fonts via type.mgk
rather than use \fBMAGICK_FONT_PATH\fP.
.TP
.B "MAGICK_HOME"
\fRPath to top of ImageMagick installation directory. Only observed
by "uninstalled" builds of ImageMagick which do not have their location
hard-coded or set by an installer.
.TP
.B "MAGICK_DISK_LIMIT"
\fRMaximum amount of disk space allowed for use by the pixel cache.
.TP
.B "MAGICK_FILES_LIMIT"
\fRMaximum number of open files.
.TP
.B "MAGICK_MAP_LIMIT"
\fRMaximum size of a memory map.
.TP
.B "MAGICK_MEMORY_LIMIT"
\fRMaximum amount of memory to allocate from the heap.
.TP
.B "MAGICK_TMPDIR"
\fRPath to directory where ImageMagick should write temporary
files. The default is to use the system default, or the location set by
\fBTMPDIR\fP.
.TP
.B "TMPDIR"
\fRFor POSIX-compatible systems (Unix-compatible), the path to the
directory where all applications should write temporary files.
Overridden by \fBMAGICK_TMPDIR\fP if it is set.
.TP
.B "TMP \fIor TEMP"\fP
\fRFor Microsoft Windows, the path to the directory where applications
should write temporary files. Overridden by \fBMAGICK_TMPDIR\fP if it
is set.
.SH CONFIGURATION FILES
ImageMagick uses a number of XML format configuration files:
.TP
.B "colors.mgk"
\fRcolors configuration file
<?xml version="1.0"?>
<colormap>
<color name="AliceBlue" red="240" green="248" blue="255"
compliance="SVG, X11, XPM" />
</colormap>
.TP
.B "delegates.mgk"
\fRdelegates configuration file
.TP
.B "log.mgk"
\fRlogging configuration file
<?xml version="1.0"?>
<magicklog>
<log events="None" />
<log output="stdout" />
<log filename="Magick-%d.log" />
<log generations="3" />
<log limit="2000" />
<log format="%t %r %u %p %m/%f/%l/%d:\\n %e" />
</magicklog>
.TP
.B "magic.mgk"
\fRfile header magic test configuration file
<?xml version="1.0"?>
<magicmap>
<magic name="AVI" offset="0" target="RIFF" />
</magicmap>
.TP
.B "modules.mgk"
\fRloadable modules configuration file
<?xml version="1.0"?>
<modulemap>
<module magick="8BIM" name="META" />
</modulemap>
.TP
.B "type.mgk"
\fRmaster type (fonts) configuration file
<?xml version="1.0"?>
<typemap>
<\fB\fPinclude file="type-windows.mgk" />
<type
name="AvantGarde-Book"
fullname="AvantGarde Book"
family="AvantGarde"
foundry="URW"
weight="400"
style="normal"
stretch="normal"
format="type1"
metrics="/usr/local/share/ghostscript/fonts/a010013l.afm"
glyphs="/usr/local/share/ghostscript/fonts/a010013l.pfb"
/>
</typemap>
.SH SEE ALSO
ImageMagick(1), display(1), animate(1), identify(1), montage(1), convert(1),
composite(1), conjure(1)
.SH COPYRIGHT
\fBCopyright (C) 1999-2004 ImageMagick Studio LLC. Additional copyrights and
licenses apply to this software, see
http://www.imagemagick.org/www/Copyright.html\fP
|