The configure script looks at your environment and decides what it can cobble together to get ImageMagick compiled and installed on your system. This includes finding a compiler, where your compiler header files are located (e.g. stdlib.h), and if any delegate libraries are available for ImageMagick to use (e.g. JPEG, PNG, TIFF, etc.). If you are willing to accept configure's default options, and build from within the source directory, you can simply type:
-
$magick> cd ImageMagick-6.6.3-6 $magick> ./configure
+
$magick> cd ImageMagick-6.6.3-7 $magick> ./configure
Watch the configure script output to verify that it finds everything that
you think it should. Pay particular attention to the last lines of the script output. For example, here is a recent report from our system:
@@ -543,7 +543,7 @@ Options used to compile and link:
Download the ImageMagick source distribution and verify the distribution against its message digest.
Unpack and change into the top-level ImageMagick directory:
-
$magick> tar xvfz ImageMagick-6.6.3-6.tar.gz $magick> cd ImageMagick-6.6.3-6
Configure ImageMagick:
+
$magick> tar xvfz ImageMagick-6.6.3-7.tar.gz $magick> cd ImageMagick-6.6.3-7
Configure ImageMagick:
$magick> ./configure --prefix=/opt --with-quantum-depth=16 \
--disable-dependency-tracking --with-x=yes \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib/ \
@@ -563,7 +563,7 @@ Options used to compile and link:
Although you can download and install delegate libraries yourself, many are already available in the GnuWin32 distribution. Download and install whichever delegate libraries you require such as JPEG, PNG, TIFF, etc. Make sure you specify the development headers when you install a package. Next type,
-
$magick> tar jxvf ImageMagick-6.6.3-?.tar.bz2 $magick> cd ImageMagick-6.6.3-6 $magick> export CPPFLAGS="-Ic:/Progra~1/GnuWin32/include" $magick> export LDFLAGS="-Lc:/Progra~1/GnuWin32/lib" $magick> ./configure --without-perl $magick> make $magick> sudo make install
+
$magick> tar jxvf ImageMagick-6.6.3-?.tar.bz2 $magick> cd ImageMagick-6.6.3-7 $magick> export CPPFLAGS="-Ic:/Progra~1/GnuWin32/include" $magick> export LDFLAGS="-Lc:/Progra~1/GnuWin32/lib" $magick> ./configure --without-perl $magick> make $magick> sudo make install
Double-click on
- VisualMagick/bin/ImageMagick-6.6.3-6-Q16-windows-dll.exe
+ VisualMagick/bin/ImageMagick-6.6.3-7-Q16-windows-dll.exe
to launch the ImageMagick binary distribution.
Complete the installer screens to install ImageMagick on your system.
G2F implements an Ada 95 binding to a subset of the low-level MagickCore library.
+
G2F implements an Ada 95 binding to a subset of the low-level MagickCore library.
C
@@ -187,7 +187,7 @@
Ch
-
ChMagick is a Ch binding to the MagickCore and MagickWand API. Ch is an embeddable C/C++ interpreter for cross-platform scripting.
+
ChMagick is a Ch binding to the MagickCore and MagickWand API. Ch is an embeddable C/C++ interpreter for cross-platform scripting.
COM+
@@ -199,31 +199,31 @@
C++
-
Magick++ provides an object-oriented C++ interface to ImageMagick. See A Gentle Introduction to Magick++ for an introductory tutorial to Magick++. We include the source if you want to correct, enhance, or expand the tutorial.
+
Magick++ provides an object-oriented C++ interface to ImageMagick. See A Gentle Introduction to Magick++ for an introductory tutorial to Magick++. We include the source if you want to correct, enhance, or expand the tutorial.
Java
-
JMagick provides an object-oriented Java interface to ImageMagick. Im4java is a pure-java interface to the ImageMagick command-line.
+
JMagick provides an object-oriented Java interface to ImageMagick. Im4java is a pure-java interface to the ImageMagick command-line.
LabVIEW
-
LVOOP ImageMagick is an object-oriented LabVIEW interface to ImageMagick.
+
LVOOP ImageMagick is an object-oriented LabVIEW interface to ImageMagick.
Lisp
-
CL-Magick provides a Common Lisp interface to the ImageMagick library.
+
CL-Magick provides a Common Lisp interface to the ImageMagick library.
Neko
-
NMagick is a port of the ImageMagick library to the haXe and Neko platforms. It provides image manipulation capabilities to both web and desktop applications using Neko.
+
NMagick is a port of the ImageMagick library to the haXe and Neko platforms. It provides image manipulation capabilities to both web and desktop applications using Neko.
.NET
@@ -237,7 +237,7 @@
Pascal
-
PascalMagick a Pascal binding for the MagickWand API and also the low-level MagickCore library. It works with Free Pascal / Lazarus and Delphi.
+
PascalMagick a Pascal binding for the MagickWand API and also the low-level MagickCore library. It works with Free Pascal / Lazarus and Delphi.
Perl
@@ -249,50 +249,50 @@
PHP
-
MagickWand for PHP a native PHP-extension to the ImageMagick MagickWand API.
+
MagickWand for PHP a native PHP-extension to the ImageMagick MagickWand API.
-
IMagick is a native PHP extension to create and modify images using the ImageMagick API. Documentation for the extension is available here.
+
IMagick is a native PHP extension to create and modify images using the ImageMagick API. Documentation for the extension is available here.
-
phMagick is a wrapper class for ImageMagick, wrapping the most common web image manipulation actions in easy to use functions, but allowing full access to ImageMagick's power by issuing system calls to it's command-line programs.
+
phMagick is a wrapper class for ImageMagick, wrapping the most common web image manipulation actions in easy to use functions, but allowing full access to ImageMagick's power by issuing system calls to it's command-line programs.
Python
-
PythonMagickWand is an object-oriented Python interface to MagickWand based on ctypes.
+
PythonMagickWand is an object-oriented Python interface to MagickWand based on ctypes.
-
PythonMagick is an object-oriented Python interface to ImageMagick.
+
PythonMagick is an object-oriented Python interface to ImageMagick.
REALbasic
-
The MBS Realbasic ImageMagick is a plugin that utilizes the power of ImageMagick from within the RealBasic environment.
+
The MBS Realbasic ImageMagick is a plugin that utilizes the power of ImageMagick from within the RealBasic environment.
Ruby
-
RMagick is an interface between the Ruby programming language and the MagickCore image processing libraries. Get started with RMagick by perusing the documentation.
+
RMagick is an interface between the Ruby programming language and the MagickCore image processing libraries. Get started with RMagick by perusing the documentation.
-
MagickWand for Ruby is an interface between the Ruby programming language and the MagickWand image processing libraries. Get started with MagickWand for PHP by perusing the documentation.
+
MagickWand for Ruby is an interface between the Ruby programming language and the MagickWand image processing libraries. Get started with MagickWand for PHP by perusing the documentation.
-
MiniMagick is a Ruby wrapper for ImageMagick command line. MiniMagick gives you convenient access to all the command line options ImageMagick supports.
+
MiniMagick is a Ruby wrapper for ImageMagick command line. MiniMagick gives you convenient access to all the command line options ImageMagick supports.
-
QuickMagick is a gem for easily accessing ImageMagick command line tools from Ruby programs.
+
QuickMagick is a gem for easily accessing ImageMagick command line tools from Ruby programs.
Tcl/Tk
-
TclMagick a native Tcl-extension to the ImageMagick MagickWand API.
+
TclMagick a native Tcl-extension to the ImageMagick MagickWand API.
XML RPC
-
RemoteMagick is an XML-RPC web service that creates image thumbnails.
+
RemoteMagick is an XML-RPC web service that creates image thumbnails.
When the pixel cache is initialized, pixels are scaled from whatever bit depth they originated from to that required by the pixel cache. For example, a 1-channel 1-bit monochrome PBM image is scaled to a 4 channel 8-bit RGBA image, if you are using the Q8 version of ImageMagick, and 16-bit RGBA for the Q16 version. You can determine which version you have with the ‑version option:
As you can see, the convenience of the pixel cache sometimes comes with a trade-off in storage (e.g. storing a 1-bit monochrome image as 16-bit RGBA is wasteful) and speed (i.e. storing the entire image in memory is generally slower than accessing one scanline of pixels at a time). In most cases, the benefits of the pixel cache typically outweigh any disadvantages.
ImageMagick RPM's are self-installing. Simply type the following command and you're ready to start using ImageMagick:
-
$magick> rpm -Uvh ImageMagick-6.6.3-6.i386.rpm
+
$magick> rpm -Uvh ImageMagick-6.6.3-7.i386.rpm
For other systems, create (or choose) a directory to install the package into and change to that directory, for example:
$magick> cd $HOME
@@ -310,7 +310,7 @@
ImageMagick runs on all recent Windows releases except Windows 95 / 98. We recommend its use on an NT-based version of Windows (NT4, 2000, 2003, XP, or Vista). Starting with ImageMagick 5.5.7, older versions such as Windows 95 / 98 are not supported anymore. The amount of memory can be an important factor, especially if you intend to work on large images. A minimum of 256 MB of RAM is recommended, but the more RAM the better. Although ImageMagick runs fine on a single core computer, it automagically runs in parallel on dual and quad-core systems reducing run times considerably.
The Windows version of ImageMagick is self-installing. Simply click on the appropriate version below and it will launch itself and ask you a few installation questions. Versions with Q8 in the name are 8 bits-per-pixel component (e.g. 8-bit red, 8-bit green, etc.), whereas, Q16 in the filename are 16 bits-per-pixel component. A Q16 version permits you to read or write 16-bit images without losing precision but requires twice as much resources as the Q8 version. Versions with dll in the filename include ImageMagick libraries as dynamic link libraries. If you are not sure which version is appropriate, choose
-ImageMagick-6.6.3-6-Q16-windows-dll.exe.
@@ -685,11 +685,22 @@ pixels which are outside the image proper are blurred into the final result.
Surround the image with a border of color.
-
Set the width and height using the size portion of the gravity argument. See Image Geometry for complete details about the geometry argument. Offsets are ignored.
+
Set the width and height using the size portion of the
+gravity argument. See Image Geometry for complete details about the geometry argument. Offsets are
+ignored.
-
Set the border color by preceding with the -bordercolor setting.
+
Set the border color by preceding with the -bordercolor setting.
-
See also the -frame option, which has more functionality.
+
The -border operation is affected by the current -compose setting and assumes that this is using the default
+'Over' composition method. It generates a image of the appropriate
+size colors by the current -bordercolor before
+overlaying the original image in the center of this net image. This means that
+with the default compose method of 'Over' any transparent parts may
+be replaced by the current -bordercolor setting.
+
See also the -frame option, which has more
+functionality.
This option places comments in a non-pixel portion of the image file. For a comment to be visibly written on the image itself, use the -annotate or -draw options.
-
Use this option to assign a specific comment to the image, when writing to an image format that supports comments. You can include the image filename, type, width, height, or other image attribute by embedding special format characters listed under the -format option. The comment is not drawn on the image, but is embedded in the image datastream via "Comment" tag or similar mechanism.
+
Use this option to assign a specific comment to the image, when writing to
+an image format that supports comments. You can include the image filename,
+type, width, height, or other image attribute by embedding special format
+characters listed in the Format and Print Image
+Properties. The comment is not drawn on the image, but is embedded in the
+image datastream via "Comment" tag or similar mechanism.
produces an image comment of MIFF:bird.miff 512x480 for an image titled bird.miff and whose width is 512 and height is 480.
+
produces an image comment of MIFF:bird.miff 512x480 for an image
+titled bird.miff and whose width is 512 and height is 480.
If the first character of string is @, the image comment is read from a file titled by the remaining characters in the string. Comments in a file are literal; no embedded formatting characters are recognized.
The description of composition uses abstract terminology in order to allow
-the description to be more precise, while avoiding constant values which are
-specific to a particular build configuration. Each image pixel is represented
-by red, green, and blue levels (which are equal for a gray pixel). The
-build-dependent value QuantumRange is the maximum integral
-value which may be stored, per pixel, in the red, green, or blue channels of
-the image. Each image pixel may also optionally (if the image matte channel is
-enabled) have an associated level of opacity, ranging from opaque to
-transparent, which may be used to determine the influence of the pixel
-color when compositing the pixel with another image pixel. If the image matte
-channel is disabled, then all pixels in the image are treated as opaque. The
-color of an opaque pixel is fully visible while the color of a transparent
-pixel color is entirely absent (pixel color is ignored).
-
-
By definition, raster images have a rectangular shape. All image rows are of
-equal length, as are all image columns. By treating the alpha channel as a
-visual "mask" the rectangular image may be given a "shape" by treating the
-alpha channel as a cookie-cutter for the image. This is done by setting the
-pixels within the shape to be opaque, with pixels outside the shape set as
-transparent. Pixels on the boundary of the shape may be between opaque and
-transparent in order to provide antialiasing (visually smooth edges). The
-description of the composition operators use this concept of image "shape" in
-order to make the description of the operators easier to understand. While it
-is convenient to describe the operators in terms of "shapes" they are by no
-means limited to mask-style operations since they are based on continuous
-floating-point mathematics rather than simple boolean operations.
-
-
The following alpha blending (Duff-Porter) compose methods are available:
+
See Alpha Compositing for
+a detailed discussion of alpha compositing.
-
-
-
-
Method
-
Description
-
-
-
-
clear
-
Both the color and the alpha of the destination are
- cleared. Neither the source nor the destination are used (except for
- destinations size and other meta-data which is always preserved.
-
-
-
-
src
-
The source is copied to the destination. The destination
- is not used as input, though it is cleared.
-
-
-
-
dst
-
The destination is left untouched. The source image is
- completely ignored.
-
-
-
-
src-over
-
The source is composited over the destination. this is
- the default alpha blending compose method, when neither the compose
- setting is set, nor is set in the image meta-data.
-
-
-
-
dst-over
-
The destination is composited over the source and the
- result replaces the destination.
-
-
-
-
src-in
-
The part of the source lying inside of the destination
- replaces the destination.
-
-
-
-
dst-in
-
The part of the destination lying inside of the source
- replaces the destination. Areas not overlaid are cleared.
-
-
-
-
src-out
-
The part of the source lying outside of the destination
- replaces the destination.
-
-
-
-
dst-out
-
The part of the destination lying outside of the source
- replaces the destination.
-
-
-
-
src-atop
-
The part of the source lying inside of the destination is
- composited onto the destination.
-
-
-
-
dst-atop
-
The part of the destination lying inside of the source is
- composited over the source and replaces the destination. Areas not
- overlaid are cleared.
-
-
-
-
xor
-
The part of the source that lies outside of the
- destination is combined with the part of the destination that lies
- outside of the source. Source or Destination, but not both.
-
-
-
-
-
-
Any of the 'Src-*' methods can also be specified without the 'Src-' part.
-For example the defaul compose method can be specified as just 'Over'.
-
-
-
The following mathemathical composition methods are also available.
-
-
-
-
-
Method
-
Description
-
-
-
-
multiply
-
The source is multiplied by the destination and replaces
- the destination. The resultant color is always at least as dark as
- either of the two constituent colors. Multiplying any color with black
- produces black. Multiplying any color with white leaves the original
- color unchanged.
-
-
-
-
screen
-
The source and destination are complemented and then
- multiplied and then replace the destination. The resultant color is
- always at least as light as either of the two constituent colors.
- Screening any color with white produces white. Screening any color
- with black leaves the original color unchanged.
-
-
-
-
plus
-
The source is added to the destination and replaces the
- destination. This operator is useful for averaging or a controled
- merger of two images, rather than a direct overlay.
-
-
-
-
add
-
As per 'plus' but transparency data is treated as matte
- values. As such any transparent areas in either image remain
- transparent.
-
-
-
-
minus
-
Subtract the colors in the source image from the
- destination image. When transparency is involved, opaque areas is
- subtracted from any destination opaque areas.
-
-
-
-
subtract
-
Subtract the colors in the source image from the
- destination image. When transparency is involved transparent areas are
- subtracted, so only the opaque areas in the source remain opaque in
- the destination image.
-
-
-
-
difference
-
Subtracts the darker of the two constituent colors from
- the lighter. Painting with white inverts the destination color.
- Painting with black produces no change.
-
-
-
-
exclusion
-
Produces an effect similar to that of 'difference', but
- appears as lower contrast. Painting with white inverts the
- destination color. Painting with black produces no change.
-
-
-
-
darken
-
Selects the darker of the destination and source colors.
- The destination is replaced with the source when the source is darker,
- otherwise it is left unchanged.
-
-
-
-
lighten
-
Selects the lighter of the destination and source colors.
- The destination is replaced with the source when the source is
- lighter, otherwise it is left unchanged.
-
-
-
-
-
-
Typically these use the default 'Over' alpha blending when transparencies
-are also involved, except for 'Plus' which uses a 'plus' alpha blending.
-This means the alpha channel is used to not only specify that all
-non-transparent parts of the input image is visible, but also applied color
-channel 'weighting' of the values. This also applied to the lighting
-composition methods below.
-
-
As of IM v6.6.1-6, if the special 'Sync' flag is not specified
-(enabled by default) with the -channel setting, then
-the above mathematical compositions will nolonger syncronise its actiosn with
-the alpha channel. Instead the math composition will be applied on an
-individual channel basis as defined by the -channel.
-this includes the alpha channel.
-
-
This special usage allows you to perform mathematics between images.
-
-
-
The following lighting composition methods are also available.
-
-
-
-
-
Method
-
Description
-
-
-
-
linear-dodge
-
This is equivelent to 'Plus' in that the color channels
- are simply added, however it does not 'Plus' the alpha channel, but
- uses the normal 'Over' alpha blending, which transparencies are
- involved. Produces a sort of additive multiply-like result. Added
- ImageMagick version 6.5.4-3.
-
-
-
-
linear-burn
-
As 'Linear-Dodge', but also subtract one from the result.
- Sort of a additive 'Screen' of the images. Added ImageMagick version
- 6.5.4-3.
-
-
-
-
color-dodge
-
Brightens the destination color to reflect the source
- color. Painting with black produces no change.
-
-
-
-
color-burn
-
Darkens the destination color to reflect the source
- color. Painting with white produces no change. Fixed in ImageMagick
- version 6.5.4-3.
-
-
-
-
overlay
-
Multiplies or screens the colors, dependent on the
- destination color. Source colors overlay the destination whilst
- preserving its highlights and shadows. The destination color is not
- replaced, but is mixed with the source color to reflect the lightness
- or darkness of the destination.
-
-
-
-
hard-light
-
Multiplies or screens the colors, dependent on the source
- color value. If the source color is lighter than 0.5, the destination
- is lightened as if it were screened. If the source color is darker
- than 0.5, the destination is darkened, as if it were multiplied. The
- degree of lightening or darkening is proportional to the difference
- between the source color and 0.5. If it is equal to 0.5 the
- destination is unchanged. Painting with pure black or white produces
- black or white.
-
-
-
-
-
linear-light
-
Like 'Hard-Light' but using linear-dodge and linear-burn
- instead. Increases contrast slightly with an impact on the
- foreground's tonal values.
-
-
-
-
soft-light
-
Darkens or lightens the colors, dependent on the source
- color value. If the source color is lighter than 0.5, the destination
- is lightened. If the source color is darker than 0.5, the destination
- is darkened, as if it were burned in. The degree of darkening or
- lightening is proportional to the difference between the source color
- and 0.5. If it is equal to 0.5, the destination is unchanged. Painting
- with pure black or white produces a distinctly darker or lighter area,
- but does not result in pure black or white. Fixed in ImageMagick
- version 6.5.4-3.
-
-
-
-
pegtop-light
-
Almost equivelent to 'Soft-Light', but using a
- continuious mathematical formula rather than two conditionally
- selected formulae. Added ImageMagick version 6.5.4-3.
-
-
-
-
vivid-light
-
A modified 'Linear-Light' designed to preserve very stong
- primary and secondary colors in the image. Added ImageMagick version
- 6.5.4-3.
-
-
-
-
pin-light
-
Similar to 'Hard-Light', but using sharp linear shadings,
- to similate the effects of a strong 'pinhole' light source. Added
- ImageMagick version 6.5.4-3.
-
-
-
-
-
-
-
-
Also included are these special purpose compose methods:
-
-
-
-
-
Method
-
Description
-
-
-
-
copy-*
-
Copy the specified channel (Red, Green, Blue, Cyan,
- Magenta, Yellow, Black, or Opacity) in the source image to the
- same channel in the destination image. If the channel specified
- does not exist in the source image, (which can only happen for methods,
- 'copy-opacity' or 'copy-black') then it is
- assumed that the source image is a special grayscale channel image
- of the values to be copied.
-
-
-
-
change-mask
-
Replace any destination pixel that is the similar to the source images pixel (as defined by the current -fuzz factor), with transparency.
-
-
-
-
-
On top of these composed methods are a few special ones that not only require
-the two images that are being merged or overlaid, but have some extra numerical
-arguments, which are tabled below.
-
-
In the "composite" command these composition methods are
-selected using special options with the arguments needed. They are usually,
-but not always, the same name as the composte 'method' they use, and replaces
-the normal use of the -compose setting in the
-"composite" command. For example...
-
-
$magick> composite ... -blend 50x50 ...
-
As of IM v6.5.3-4 the "convert" command can now also supply
-these extra arguments to its -composite operator,
-using the special -set attribute of 'option:compose:args'. This means you can now make use of
-these special argumented -compose methods, those the
-argument and the method both need to be set separatally. For example...
The following is a table of these special 'argumented' compose methods,
-with a brief summary of what they do. For more details see the equivalent
-"composite" command option name.
-
-
-
-
-
Method
-
Description
-
-
-
-
dissolve
-
Arguments:
- src_percent[xdst_percent]
- Equivalent to "composite" -dissolve
- Dissolve the 'source' image by the percentage given before overlaying
- 'over' the 'destination' image. If src_percent is
- greater than 100, it starts dissolving the main image so it will
- become transparent at a value of '200'. If
- both percentages are given, each image are dissolved to the
- percentages given.
-
-
-
-
-
blend
-
Arguments:
- src_percent[xdst_percent]
- Equivalent to "composite" -blend
- Average the images together ('plus') according to the percentages
- given and each pixels transparency. If only a single percentage value
- is given it sets the weight of the composite or 'source' image, while
- the background image is weighted by the exact opposite amount. That is
- a -blend 30 merges 30% of the 'source' image with 70% of
- the 'destination' image. Thus it is equivalent to -blend
- 30x70.
-
-
-
-
-
mathematics
-
Arguments: A, B, C, D
- Not available in "composite" at this time.
- Merge the source and destination images according to the formula
- A*Sc*Dc + B*Sc + C*Dc + D
- Can be used to generate a custom composition method that would
- otherwise need to be implemented using the slow -fx
- DIY image operator. Added to ImageMagick version 6.5.4-3.
- As of IM v6.6.1-6 this method will do per-channel math compositions
- if the 'Sync' flag is removed from -channel,
- just like all the other mathematical compostion methods above.
-
-
-
-
-
modulate
-
Arguments:
- brightness[xsaturation]
- Equivalent to "composite" -watermark
- Take a grayscale image (with alpha mask) and modify the destination
- image's brightness according to watermark image's grayscale value and
- the brightness percentage. The destinations
- color saturation attribute is just direct modified by the saturation percentage, which defaults to 100 percent
- (no color change).
-
-
-
-
-
-
displace
-
Arguments:
- X-scale[xY-scale][!][%]
- Equivalent to "composite" -displace
- With this option, the 'overlay' image, and optionally the 'mask'
- image, is used as a relative displacement map, which is used to
- displace the lookup of what part of the destination image is seen at
- each point of the overlaid area. Much like the displacement map is a
- 'lens' that distorts the original 'background' image behind it.
-
- The X-scale is modilated by the 'red' channel of the overlay image
- while the Y-scale is modulated by the green channel, (the mask image
- if given is rolled into green channel of the overlay image. This
- separation allows you to modulate the X and Y lookup displacement
- separatally allowing you to di 2 dimentional displacements, rather
- than 1 dimentional verctored displacements (using grayscale image).
-
- If the overlay image contains transparency this is used as a mask
- of the resulting image to remove 'invalid' pixels.
-
- The '%' flag makes the displacement scale relative to the size of the
- overlay image (100% = half width/height of image). Using '!' switches
- percentage arguments to refer to the destination image size instead.
-
- Special flags were added Added to ImageMagick version 6.5.3-5.
-
-
-
-
-
distort
-
Arguments:
- X-scale[xY-scale[+X-center+Y-center]][!][%]
- Not available in "composite" at this time.
- Exactly as per 'Displace' (above), but using absolute coordinates,
- relative to the center of the overlay (or that given). Basically
- allows you to generate absolute distortion maps where 'black' will
- look up the left/top edge, and 'white' looks up the bottom/right
- edge of the destination image, according to the scale given.
-
- The '!' flag not only switches percentage scaling, to use the
- destination image, but also the image the center offset of the lookup.
- This means the overlay can lookup a completely different region of the
- destination image.
-
- Added to ImageMagick version 6.5.3-5.
-
-
-
-
-
blur
-
Arguments:
- Width[xHeight[+Angle]]
- Equivalent to "composite"
- -blur
- A Variable Blur Mapping Composition method, where each pixel in the
- overlaid region is replaced with an Elliptical Weighted Average (EWA),
- with an ellipse (typically a circle) of the given sigma size, scaled
- according to overlay (source image) grayscale mapping.
-
- As per 'Displace' and 'Distort', the red channel will modulate the
- width of the ellipse, while the green channel will modulate the height
- of the ellipse. However at this time the ellipse angle is not
- modulated though this may be a future posibility (perhaps with a
- special flag to enable use of blur channel for this purpose).
-
To print a complete list of all the available compose operators, use -list compose.
+
It is also one of the primary options for the "composite"
+command.
-composite
-
Perform alpha composition on the current image sequence.
+
Perform alpha composition on two images and an optional mask
Take the first image 'destination' and overlay the second 'source' image
according to the current -compose setting. The location
@@ -2688,7 +2200,10 @@ draw complex curves, it is highly recommended either to use the path
-draw 'image SrcOver 100,100 225,225 image.jpg'
-
You can use 0,0 for the image size, which means to use the actual dimensions found in the image header. Otherwise, it is scaled to the given dimensions. See -compose for a description of the composite operators.
+
You can use 0,0 for the image size, which means to use the actual
+dimensions found in the image header. Otherwise, it is scaled to the given
+dimensions. See Alpha Compositing for
+a detailed discussion of alpha composition methods that are available.
Use text to annotate an image with text. Follow the text coordinates with a string. If the string has embedded spaces, enclose it in single or double quotes.
@@ -3191,9 +2706,31 @@ is a TrueType font file, ps:helvetica is PostScript font, and
Surround the image with a border or beveled frame.
-
The color of the border is specified with the -mattecolor command line option.
+
The color of the border is specified with the -mattecolor command line option.
+
+
See Image Geometry for complete details about the geometry argument. The size portion of the geometry argument indicates the amount of extra width and
+height that is added to the dimensions of the image. If no offsets are given
+in the geometry argument, then the border added is
+a solid color. Offsets x and y, if present, specify that
+the width and height of the border is partitioned to form an outer bevel of
+thickness x pixels and an inner bevel of thickness
+y pixels. Negative offsets make no sense as frame arguments.
+
+
+
The -frame option is affected by the current -compose setting and assumes that this is using the default
+'Over' composition method. It generates a image of the appripriate
+size with the current -bordercolor setting, and then
+draws the frame of four distinct colors close to the current -mattecolor. The original image is then overlaid onto
+center of this image. This means that with the default compose method of
+'Over' any transparent parts may be replaced by the current -bordercolor setting.
-
See Image Geometry for complete details about the geometry argument. The size portion of the geometry argument indicates the amount of extra width and height that is added to the dimensions of the image. If no offsets are given in the geometry argument, then the border added is a solid color. Offsets x and y, if present, specify that the width and height of the border is partitioned to form an outer bevel of thickness x pixels and an inner bevel of thickness y pixels. (Negative offsets make no sense here.) The -frame option is not affected by the -gravity option.
+
The image composition is not
+affected by the -gravity option.
@@ -3688,7 +3225,9 @@ lookup for positions outside the boundaries of the image.
When saving an image to a PostScript file, any label assigned to an image is used as a header string to print above the postscript image.
-
You can include the image filename, type, width, height, or other image attribute by embedding special format character. See -format for details of the percent escape codes.
+
You can include the image filename, type, width, height, or other image
+attribute by embedding special format character. See Format and Print Image
+Properties for details of the percent escape codes.
ImageMagick includes a number of command-line utilities for manipulating images. Most of you are probably accustomed to editing images one at a time with a graphical user interface (GUI) with such programs as gimp or Photoshop. However, a GUI is not always convenient. Suppose you want to process an image dynamically from a web script or you want to apply the same operations to many images or repeat a specific operation at different times to the same or different image. For these types of operations, the command-line image processing utility is appropriate.
+
ImageMagick includes a number of command-line utilities for manipulating images. Most of you are probably accustomed to editing images one at a time with a graphical user interface (GUI) with such programs as gimp or Photoshop. However, a GUI is not always convenient. Suppose you want to process an image dynamically from a web script or you want to apply the same operations to many images or repeat a specific operation at different times to the same or different image. For these types of operations, the command-line image processing utility is appropriate.
The ImageMagick command-line tools exit with a status of 0 if the command line arguments have a proper syntax and no problems are encountered. Expect a descriptive message and an exit status of 1 if any exception occurs such as improper syntax, a problem reading or writing an image, or any other problem that prevents the command from completing successfully.
-
In the paragraphs below, find a short description for each command-line tool. Click on the program name to get details about the program usage and a list of command-line options that alters how the program behaves. If you are just getting acquainted with ImageMagick, start with the convert program. Be sure to peruse Anthony Thyssen's tutorial on how to use ImageMagick utilities to convert, compose, or edit images from the command-line.
+
In the paragraphs below, find a short description for each command-line tool. Click on the program name to get details about the program usage and a list of command-line options that alters how the program behaves. If you are just getting acquainted with ImageMagick, start with the convert program. Be sure to peruse Anthony Thyssen's tutorial on how to use ImageMagick utilities to convert, compose, or edit images from the command-line.
The description of composition uses abstract terminology in order to allow
+the description to be more precise, while avoiding constant values which are
+specific to a particular build configuration. Each image pixel is represented
+by red, green, and blue levels (which are equal for a gray pixel). The
+build-dependent value QuantumRange is the maximum integral
+value which may be stored, per pixel, in the red, green, or blue channels of
+the image. Each image pixel may also optionally (if the image matte channel is
+enabled) have an associated level of opacity, ranging from opaque to
+transparent, which may be used to determine the influence of the pixel
+color when compositing the pixel with another image pixel. If the image matte
+channel is disabled, then all pixels in the image are treated as opaque. The
+color of an opaque pixel is fully visible while the color of a transparent
+pixel color is entirely absent (pixel color is ignored).
+
+
By definition, raster images have a rectangular shape. All image rows are of
+equal length, as are all image columns. By treating the alpha channel as a
+visual "mask" the rectangular image may be given a "shape" by treating the
+alpha channel as a cookie-cutter for the image. This is done by setting the
+pixels within the shape to be opaque, with pixels outside the shape set as
+transparent. Pixels on the boundary of the shape may be between opaque and
+transparent in order to provide antialiasing (visually smooth edges). The
+description of the composition operators use this concept of image "shape" in
+order to make the description of the operators easier to understand. While it
+is convenient to describe the operators in terms of "shapes" they are by no
+means limited to mask-style operations since they are based on continuous
+floating-point mathematics rather than simple boolean operations.
+
+
The following alpha blending (Duff-Porter) compose methods are available:
+
+
+
+
+
Method
+
Description
+
+
+
+
clear
+
Both the color and the alpha of the destination are
+ cleared. Neither the source nor the destination are used (except for
+ destinations size and other meta-data which is always preserved.
+
+
+
+
src
+
The source is copied to the destination. The destination
+ is not used as input, though it is cleared.
+
+
+
+
dst
+
The destination is left untouched. The source image is
+ completely ignored.
+
+
+
+
src-over
+
The source is composited over the destination. this is
+ the default alpha blending compose method, when neither the compose
+ setting is set, nor is set in the image meta-data.
+
+
+
+
dst-over
+
The destination is composited over the source and the
+ result replaces the destination.
+
+
+
+
src-in
+
The part of the source lying inside of the destination
+ replaces the destination.
+
+
+
+
dst-in
+
The part of the destination lying inside of the source
+ replaces the destination. Areas not overlaid are cleared.
+
+
+
+
src-out
+
The part of the source lying outside of the destination
+ replaces the destination.
+
+
+
+
dst-out
+
The part of the destination lying outside of the source
+ replaces the destination.
+
+
+
+
src-atop
+
The part of the source lying inside of the destination is
+ composited onto the destination.
+
+
+
+
dst-atop
+
The part of the destination lying inside of the source is
+ composited over the source and replaces the destination. Areas not
+ overlaid are cleared.
+
+
+
+
xor
+
The part of the source that lies outside of the
+ destination is combined with the part of the destination that lies
+ outside of the source. Source or Destination, but not both.
+
+
+
+
+
+
Any of the 'Src-*' methods can also be specified without the 'Src-' part.
+For example the defaul compose method can be specified as just 'Over'.
+
+
+
The following mathemathical composition methods are also available.
+
+
+
+
+
Method
+
Description
+
+
+
+
multiply
+
The source is multiplied by the destination and replaces
+ the destination. The resultant color is always at least as dark as
+ either of the two constituent colors. Multiplying any color with black
+ produces black. Multiplying any color with white leaves the original
+ color unchanged.
+
+
+
+
screen
+
The source and destination are complemented and then
+ multiplied and then replace the destination. The resultant color is
+ always at least as light as either of the two constituent colors.
+ Screening any color with white produces white. Screening any color
+ with black leaves the original color unchanged.
+
+
+
+
plus
+
The source is added to the destination and replaces the
+ destination. This operator is useful for averaging or a controled
+ merger of two images, rather than a direct overlay.
+
+
+
+
add
+
As per 'plus' but transparency data is treated as matte
+ values. As such any transparent areas in either image remain
+ transparent.
+
+
+
+
minus
+
Subtract the colors in the source image from the
+ destination image. When transparency is involved, opaque areas is
+ subtracted from any destination opaque areas.
+
+
+
+
subtract
+
Subtract the colors in the source image from the
+ destination image. When transparency is involved transparent areas are
+ subtracted, so only the opaque areas in the source remain opaque in
+ the destination image.
+
+
+
+
difference
+
Subtracts the darker of the two constituent colors from
+ the lighter. Painting with white inverts the destination color.
+ Painting with black produces no change.
+
+
+
+
exclusion
+
Produces an effect similar to that of 'difference', but
+ appears as lower contrast. Painting with white inverts the
+ destination color. Painting with black produces no change.
+
+
+
+
darken
+
Selects the darker of the destination and source colors.
+ The destination is replaced with the source when the source is darker,
+ otherwise it is left unchanged.
+
+
+
+
lighten
+
Selects the lighter of the destination and source colors.
+ The destination is replaced with the source when the source is
+ lighter, otherwise it is left unchanged.
+
+
+
+
+
+
Typically these use the default 'Over' alpha blending when transparencies
+are also involved, except for 'Plus' which uses a 'plus' alpha blending.
+This means the alpha channel is used to not only specify that all
+non-transparent parts of the input image is visible, but also applied color
+channel 'weighting' of the values. This also applied to the lighting
+composition methods below.
+
+
As of IM v6.6.1-6, if the special 'Sync' flag is not specified
+(enabled by default) with the -channel setting, then
+the above mathematical compositions will nolonger syncronise its actiosn with
+the alpha channel. Instead the math composition will be applied on an
+individual channel basis as defined by the -channel.
+this includes the alpha channel.
+
+
This special usage allows you to perform mathematics between images.
+
+
+
The following lighting composition methods are also available.
+
+
+
+
+
Method
+
Description
+
+
+
+
linear-dodge
+
This is equivelent to 'Plus' in that the color channels
+ are simply added, however it does not 'Plus' the alpha channel, but
+ uses the normal 'Over' alpha blending, which transparencies are
+ involved. Produces a sort of additive multiply-like result. Added
+ ImageMagick version 6.5.4-3.
+
+
+
+
linear-burn
+
As 'Linear-Dodge', but also subtract one from the result.
+ Sort of a additive 'Screen' of the images. Added ImageMagick version
+ 6.5.4-3.
+
+
+
+
color-dodge
+
Brightens the destination color to reflect the source
+ color. Painting with black produces no change.
+
+
+
+
color-burn
+
Darkens the destination color to reflect the source
+ color. Painting with white produces no change. Fixed in ImageMagick
+ version 6.5.4-3.
+
+
+
+
overlay
+
Multiplies or screens the colors, dependent on the
+ destination color. Source colors overlay the destination whilst
+ preserving its highlights and shadows. The destination color is not
+ replaced, but is mixed with the source color to reflect the lightness
+ or darkness of the destination.
+
+
+
+
hard-light
+
Multiplies or screens the colors, dependent on the source
+ color value. If the source color is lighter than 0.5, the destination
+ is lightened as if it were screened. If the source color is darker
+ than 0.5, the destination is darkened, as if it were multiplied. The
+ degree of lightening or darkening is proportional to the difference
+ between the source color and 0.5. If it is equal to 0.5 the
+ destination is unchanged. Painting with pure black or white produces
+ black or white.
+
+
+
+
+
linear-light
+
Like 'Hard-Light' but using linear-dodge and linear-burn
+ instead. Increases contrast slightly with an impact on the
+ foreground's tonal values.
+
+
+
+
soft-light
+
Darkens or lightens the colors, dependent on the source
+ color value. If the source color is lighter than 0.5, the destination
+ is lightened. If the source color is darker than 0.5, the destination
+ is darkened, as if it were burned in. The degree of darkening or
+ lightening is proportional to the difference between the source color
+ and 0.5. If it is equal to 0.5, the destination is unchanged. Painting
+ with pure black or white produces a distinctly darker or lighter area,
+ but does not result in pure black or white. Fixed in ImageMagick
+ version 6.5.4-3.
+
+
+
+
pegtop-light
+
Almost equivelent to 'Soft-Light', but using a
+ continuious mathematical formula rather than two conditionally
+ selected formulae. Added ImageMagick version 6.5.4-3.
+
+
+
+
vivid-light
+
A modified 'Linear-Light' designed to preserve very stong
+ primary and secondary colors in the image. Added ImageMagick version
+ 6.5.4-3.
+
+
+
+
pin-light
+
Similar to 'Hard-Light', but using sharp linear shadings,
+ to similate the effects of a strong 'pinhole' light source. Added
+ ImageMagick version 6.5.4-3.
+
+
+
+
+
+
+
+
Also included are these special purpose compose methods:
+
+
+
+
+
Method
+
Description
+
+
+
+
copy-*
+
Copy the specified channel (Red, Green, Blue, Cyan,
+ Magenta, Yellow, Black, or Opacity) in the source image to the
+ same channel in the destination image. If the channel specified
+ does not exist in the source image, (which can only happen for methods,
+ 'copy-opacity' or 'copy-black') then it is
+ assumed that the source image is a special grayscale channel image
+ of the values to be copied.
+
+
+
+
change-mask
+
Replace any destination pixel that is the similar to the source images pixel (as defined by the current -fuzz factor), with transparency.
+
+
+
+
+
On top of these composed methods are a few special ones that not only require
+the two images that are being merged or overlaid, but have some extra numerical
+arguments, which are tabled below.
+
+
In the "composite" command these composition methods are
+selected using special options with the arguments needed. They are usually,
+but not always, the same name as the composte 'method' they use, and replaces
+the normal use of the -compose setting in the
+"composite" command. For example...
+
+
$magick> composite ... -blend 50x50 ...
+
As of IM v6.5.3-4 the "convert" command can now also supply
+these extra arguments to its -composite operator,
+using the special -set attribute of 'option:compose:args'. This means you can now make use of
+these special argumented -compose methods, those the
+argument and the method both need to be set separatally. For example...
The following is a table of these special 'argumented' compose methods,
+with a brief summary of what they do. For more details see the equivalent
+"composite" command option name.
+
+
+
+
+
Method
+
Description
+
+
+
+
dissolve
+
Arguments:
+ src_percent[xdst_percent]
+ Equivalent to "composite" -dissolve
+ Dissolve the 'source' image by the percentage given before overlaying
+ 'over' the 'destination' image. If src_percent is
+ greater than 100, it starts dissolving the main image so it will
+ become transparent at a value of '200'. If
+ both percentages are given, each image are dissolved to the
+ percentages given.
+
+
+
+
+
blend
+
Arguments:
+ src_percent[xdst_percent]
+ Equivalent to "composite" -blend
+ Average the images together ('plus') according to the percentages
+ given and each pixels transparency. If only a single percentage value
+ is given it sets the weight of the composite or 'source' image, while
+ the background image is weighted by the exact opposite amount. That is
+ a -blend 30 merges 30% of the 'source' image with 70% of
+ the 'destination' image. Thus it is equivalent to -blend
+ 30x70.
+
+
+
+
+
mathematics
+
Arguments: A, B, C, D
+ Not available in "composite" at this time.
+ Merge the source and destination images according to the formula
+ A*Sc*Dc + B*Sc + C*Dc + D
+ Can be used to generate a custom composition method that would
+ otherwise need to be implemented using the slow -fx
+ DIY image operator. Added to ImageMagick version 6.5.4-3.
+ As of IM v6.6.1-6 this method will do per-channel math compositions
+ if the 'Sync' flag is removed from -channel,
+ just like all the other mathematical compostion methods above.
+
+
+
+
+
modulate
+
Arguments:
+ brightness[xsaturation]
+ Equivalent to "composite" -watermark
+ Take a grayscale image (with alpha mask) and modify the destination
+ image's brightness according to watermark image's grayscale value and
+ the brightness percentage. The destinations
+ color saturation attribute is just direct modified by the saturation percentage, which defaults to 100 percent
+ (no color change).
+
+
+
+
+
+
displace
+
Arguments:
+ X-scale[xY-scale][!][%]
+ Equivalent to "composite" -displace
+ With this option, the 'overlay' image, and optionally the 'mask'
+ image, is used as a relative displacement map, which is used to
+ displace the lookup of what part of the destination image is seen at
+ each point of the overlaid area. Much like the displacement map is a
+ 'lens' that distorts the original 'background' image behind it.
+
+ The X-scale is modilated by the 'red' channel of the overlay image
+ while the Y-scale is modulated by the green channel, (the mask image
+ if given is rolled into green channel of the overlay image. This
+ separation allows you to modulate the X and Y lookup displacement
+ separatally allowing you to di 2 dimentional displacements, rather
+ than 1 dimentional verctored displacements (using grayscale image).
+
+ If the overlay image contains transparency this is used as a mask
+ of the resulting image to remove 'invalid' pixels.
+
+ The '%' flag makes the displacement scale relative to the size of the
+ overlay image (100% = half width/height of image). Using '!' switches
+ percentage arguments to refer to the destination image size instead.
+
+ Special flags were added Added to ImageMagick version 6.5.3-5.
+
+
+
+
+
distort
+
Arguments:
+ X-scale[xY-scale[+X-center+Y-center]][!][%]
+ Not available in "composite" at this time.
+ Exactly as per 'Displace' (above), but using absolute coordinates,
+ relative to the center of the overlay (or that given). Basically
+ allows you to generate absolute distortion maps where 'black' will
+ look up the left/top edge, and 'white' looks up the bottom/right
+ edge of the destination image, according to the scale given.
+
+ The '!' flag not only switches percentage scaling, to use the
+ destination image, but also the image the center offset of the lookup.
+ This means the overlay can lookup a completely different region of the
+ destination image.
+
+ Added to ImageMagick version 6.5.3-5.
+
+
+
+
+
blur
+
Arguments:
+ Width[xHeight[+Angle]]
+ Equivalent to "composite"
+ -blur
+ A Variable Blur Mapping Composition method, where each pixel in the
+ overlaid region is replaced with an Elliptical Weighted Average (EWA),
+ with an ellipse (typically a circle) of the given sigma size, scaled
+ according to overlay (source image) grayscale mapping.
+
+ As per 'Displace' and 'Distort', the red channel will modulate the
+ width of the ellipse, while the green channel will modulate the height
+ of the ellipse. However at this time the ellipse angle is not
+ modulated though this may be a future posibility (perhaps with a
+ special flag to enable use of blur channel for this purpose).
+
+ Added to ImageMagick version 6.5.4-0.
+
+
+
+
+
+
+
To print a complete list of all the available compose operators, use -list compose.
Use this form to contact the ImageMagick Wizards for any of the issues listed below. You can expect a reply within 24-48 hours if your message is on topic and is a sponsorshp, license, or security issue. The bug and documentation issues are for reporting only. For any other issue, post your message to the discourse server.
+
Use this form to contact the ImageMagick Wizards for any of the issues listed below. You can expect a reply within 24-48 hours if your message is on topic and is a sponsorshp, license, or security issue. The bug and documentation issues are for reporting only. For any other issue, post your message to the discourse server.