TOOL » IMAGE_MANIPULATOR » IMAGEMAGICK

Convert

Usage

Manipulate images.

shell
convert INPUT_OPTIONS INPUT_FILE OUTPUT_OPTIONS OUTPUT_FILE

Optimization

OptionDescription
-stripStrip image of all profiles and comments.
-trimTrim image edges.
-interlaceType of image interlacing scheme. none line plane JPEG GIF PNG.
-qualityValid only for JPEG or MPEG. 100 is lossless, 1 is worst quality.
-sampling-factorUsed by the JPEG encoder for chroma downsampling.

Basic operations

OptionDescription
-crop WxH+X+YCrop the image to size WxH, starting from (X;Y).
-resizeResize to WxH. By default it keeps the aspect ratio.
-rotateRotates the image by X degrees.
-flipMirror the image. ⇅
-flopMirror the image. ⇄
+repageReset virtual canvas.

Color manipulation

OptionDescription
-negateReplace each pixel with its complementary color.
-colorspaceSet the image colorspace. Ex: Gray
-thresholdApply simultaneous black/white threshold to the image. Ex: 50%

Border

OptionDescription
-bordercolor colorSet the border color. Color specification is like -fill.
-border geometrySurround the image with a border of color (set by -bordercolor).

Advanced operations

OptionDescription
-alphaset: Activate alpha channel. background: Set any fully-transparent pixel to the background color, while leaving it fully-transparent.
-channel typeChange the channel subsequent operators will act.
-fuzzOn subsequent operators, colors within this distance are considered equal. Ex: 1%
-fillOn subsequent operators, color to use when filling a graphic primitive. Ex: none "#ffffff"
-floodfillStarting from (X;Y), any color that matches the color are filled with the -fill color. Ex: +0+0 white
-opaqueChange this color to the fill color within the image.
-backgroundSet the background color. Ex: none
-flattenFlatten a sequence of images.
-blurReduce image noise and reduce detail levels. Ex: 0x1
-gaussian-blurReduce image noise and reduce detail levels. Ex: 0.05
-levelAdjust the level (contrast) of image channels. Ex: 10%,90%,2.0

Values

Format of values used on some options.

ColorDescription
#FFFFFFWhite color.
noneTransparent color.
GeometryDescription
10Width given, height automatically selected to preserve aspect ratio.
x10Height given, width automatically selected to preserve aspect ratio.
TypeDescription
RRed
GGreen
BBlue
AAlpha