convert(1)
convert(1) โ General Commands Manual ๐
โจ NAME โจ
convert โ she converts between image formats, and also resizes an image, blurs it, crops it, despeckles it, dithers it, draws on it, flips it, joins it, re-samples it, and does so much more. periodt. ๐
๐ธ SYNOPSIS ๐ธ
magick convert [input-options] input-file [output-options] output-file
๐ฆ OVERVIEW ๐ฆ
okay so the convert program is a member of the ImageMagick(1) suite of tools. use it to convert between image formats, and also to resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. it's giving main character energy for all your image needs. ๐
for more info about the convert command, point your browser to file:///usr/share/doc/ImageMagick-7/www/convert.html or https://imagemagick.org/script/convert.php. no cap.
๐ DESCRIPTION ๐
๐ Image Settings ๐
bestie, here's the full setting list. every single one. don't skip. ๐ซถ
-adjoinโ join images into a single multi-image file, like one big happy file family ๐ซถ-affine matrixโ affine transform matrix, math girlie but for images โจ-alpha optionโ activate, deactivate, reset, or set the alpha channel โ transparency decisions, we love her ๐-antialiasโ remove pixel-aliasing โ smooth those jagged edges, slay-authenticate valueโ decrypt image with this password โ secret password moment ๐-attenuate valueโ lessen (or intensify) when adding noise to an image โ turn the noise volume up or down ๐๏ธ-background colorโ background color โ the backdrop, the vibe setter ๐-bias valueโ add bias when convolving an image โ convolution bias, periodt-black-point-compensationโ use black point compensation โ yes bestie, compensate those blacks ๐ค-blue-primary pointโ chromaticity blue primary point โ blue's exact coordinate ๐-bordercolor colorโ border color โ the outline's color, cute-caption stringโ assign a caption to an image โ give it a lil caption bestie ๐-cdl filenameโ color correct with a color decision list โ CDL color correction, no cap-clipโ clip along the first path from the 8BIM profile โ clipping along that first 8BIM path โ๏ธ-clip-mask filenameโ associate a clip mask with the image โ attach that clip mask bestie-clip-path idโ clip along a named path from the 8BIM profile โ named path in the 8BIM profile, iykyk-colorspace typeโ alternate image colorspace โ swap the colorspace vibe ๐จ-comment stringโ annotate image with comment โ drop a comment on it ๐ฌ-compose operatorโ set image composite operator โ composite operator setting, periodt-compress typeโ type of pixel compression when writing the image โ how pixels get squished on write ๐ฆ-decipher filenameโ convert cipher pixels to plain pixels โ decode the secret pixels ๐-define format:optionโ define one or more image format options โ define format options, bestie-delay centisecondsโ display the next image after pausing โ pause in centiseconds before next image โณ-density geometryโ horizontal and vertical density of the image โ density geometry, horizontal and vertical-depth valueโ image depth โ set that depth value-direction typeโ render text right-to-left or left-to-right โ text direction, pick a lane โก๏ธโฌ ๏ธ-display serverโ get image or font from this X server โ X server source, retro vibes-dispose methodโ layer disposal method โ how layers get disposed, method style-dither methodโ apply error diffusion to image โ dither with error diffusion, cute noise-encipher filenameโ convert plain pixels to cipher pixels โ encrypt those pixels ๐-encoding typeโ text encoding type โ text encoding, type it-endian typeโ endianness (MSB or LSB) of the image โ MSB or LSB endianness, big/little energy-family nameโ render text with this font family โ font family for text, bestie-features distanceโ analyze image features (e.g. contrast, correlation) โ analyze features like contrast and correlation ๐-fill colorโ color to use when filling a graphic primitive โ fill color for graphic primitives ๐จ-filter typeโ use this filter when resizing an image โ resize filter, choose wisely-flattenโ flatten a sequence of images โ flatten that sequence, periodt-font nameโ render text with this font โ pick the font, bestie-format "string"โ output formatted image characteristics โ formatted image characteristics output-fuzz distanceโ colors within this distance are considered equal โ fuzz distance, colors are equal if close enough-gravity typeโ horizontal and vertical text placement โ gravity for text placement, horizontal and vertical-green-primary pointโ chromaticity green primary point โ green's exact coordinate ๐-intensity methodโ method to generate intensity value from pixel โ how to make intensity from a pixel-intent typeโ type of rendering intent when managing the image color โ rendering intent type for color management-interlace typeโ type of image interlacing scheme โ interlacing scheme type-interline-spacing valueโ set the space between two text lines โ line spacing, but for text lines-interpolate methodโ pixel color interpolation method โ pixel color interpolation, method girlie-interword-spacing valueโ set the space between two words โ word spacing, bestie-kerning valueโ set the space between two letters โ letter spacing, kerning cutie-label stringโ assign a label to an image โ label that image ๐ท๏ธ-limit type valueโ pixel cache resource limit โ limit that pixel cache resource-loop iterationsโ add Netscape loop extension to your GIF animation โ GIF loop extension, Netscape style-matteโ store matte channel if the image has one โ keep the matte channel if it exists-mattecolor colorโ frame color โ matte frame color-metric typeโ measure differences between images with this metric โ compare images with this metric-momentsโ report image moments โ moments report, math girlie-monitorโ monitor progress โ watch the progress ๐-orient typeโ image orientation โ orientation type-page geometryโ size and location of an image canvas (setting) โ page geometry for canvas size and location-pingโ efficiently determine image attributes โ efficient attribute check, bestie-pointsize valueโ font point size โ point size for font-precision valueโ maximum number of significant digits to print โ max significant digits to print-preview typeโ image preview type โ preview type-quality valueโ JPEG/MIFF/PNG compression level โ quality level for JPEG/MIFF/PNG-quietโ suppress all warning messages โ shush those warnings ๐คซ-read-mask filenameโ associate a read mask with the image โ read mask association-red-primary pointโ chromaticity red primary point โ red's exact coordinate โค๏ธ-regard-warningsโ pay attention to warning messages โ listen to warnings, bestie-remap filenameโ transform image colors to match this set of colors โ remap colors to this set-repage geometryโ size and location of an image canvas โ repage the canvas-respect-parenthesesโ settings remain in effect until parenthesis boundary โ respect the parentheses boundary-sampling-factor geometryโ horizontal and vertical sampling factor โ sampling factor, horizontal and vertical-scene valueโ image scene number โ scene number-seed valueโ seed a new sequence of pseudo-random numbers โ seed those pseudo-random numbers ๐ฒ-size geometryโ width and height of image โ size geometry, width and height-statistic type geometryโ replace each pixel with corresponding statistic from the neighborhood โ statistic replacement from neighborhood-stretch typeโ render text with this font stretch โ font stretch for text-stroke colorโ graphic primitive stroke color โ stroke color for primitives-strokewidth valueโ graphic primitive stroke width โ stroke width for primitives-style typeโ render text with this font style โ font style for text-support factorโ resize support: > 1.0 is blurry, < 1.0 is sharp โ support factor: > 1.0 blurry, < 1.0 sharp-synchronizeโ synchronize image to storage device โ sync it to storage-taintโ declare the image as modified โ taint it as modified-texture filenameโ name of texture to tile onto the image background โ texture to tile on background-tile-offset geometryโ tile offset โ tile offset geometry-treedepth valueโ color tree depth โ color tree depth-transparent-color colorโ transparent color โ the transparent color-undercolor colorโ annotation bounding box color โ undercolor for annotation bounding box-units typeโ the units of image resolution โ resolution units-verboseโ print detailed information about the image โ verbose details, spill the tea โ-virtual-pixel methodโ virtual pixel access method โ virtual pixel access method-weight typeโ render text with this font weight โ font weight for text-white-point pointโ chromaticity white point โ white point coordinate ๐ค-write-mask filenameโ associate a write mask with the image โ write mask association
โจ Image Operators โจ
okay bestie, this is the big one: every single image operator. these are the flags that actually do stuff to your picture. let's get into it ๐
-adaptive-blur geometryโ blur the pixels but adaptively: the blur effect gets softer near the edges. it's giving "gentle blur with boundaries" ๐ฆ-adaptive-resize geometryโ resize the image adaptively using data-dependent triangulation. fancy resize, no cap โจ-adaptive-sharpen geometryโ sharpen pixels adaptively: the effect gets stronger near the edges. edge sharpening with main character energy ๐-annotate geometry textโ annotate the image with text. put some words on it ๐ฌ-auto-gammaโ automagically adjust the gamma level of the image. it just knows โจ-auto-levelโ automagically adjust the color levels of the image. level up, literally ๐-auto-orientโ automatically orient the image. it fixes the rotation based on EXIF data, iykyk ๐-auto-threshold methodโ automatically perform image thresholding using the given method ๐๏ธ-bench iterationsโ measure performance by running it iterations times. benchmarking, periodt โฑ๏ธ-bilateral-blur geometryโ a non-linear, edge-preserving, and noise-reducing smoothing filter. it's giving smooth but sharp ๐ง-black-threshold valueโ force all pixels below value into black. bye bye detail ๐ค-blue-shift factorโ simulate a scene at nighttime in the moonlight, using factor. moon vibes ๐-blur geometryโ reduce image noise and reduce detail levels. classic blur, bestie ๐จ-border geometryโ surround the image with a border of color. frame it up ๐ผ๏ธ-brightness-contrast geometryโ improve the brightness / contrast of the image. glow up โจ-canny geometryโ detect edges in the image. canny edge detection, iconic ๐-channel maskโ set the image channel mask. mask on ๐ญ-charcoal radiusโ simulate a charcoal drawing with the given radius. art class vibes ๐จ-chop geometryโ remove pixels from the image interior. chop chop โ๏ธ-clahe geometryโ contrast limited adaptive histogram equalization. say that three times fast ๐ญ-clampโ keep pixel values in range(0-QuantumRange). no out-of-bounds nonsense ๐ซ-clipโ clip along the first path from the 8BIM profile. clipping time โ๏ธ-clip-mask filenameโ associate a clip mask from filename with the image ๐ญ-clip-path idโ clip along a named path from the 8BIM profile using id ๐ค๏ธ-colorize valueโ colorize the image with the fill color, using value. tint it up ๐-color-matrix matrixโ apply color correction to the image using the given matrix ๐งฎ-colors valueโ preferred number of colors in the image. reduce the palette to value ๐-color-threshold start_color-stop_colorโ force all pixels in the color range from start_color to stop_color to white, otherwise black. periodt ๐ค๐ค-connected-component connectivityโ connected-components uniquely labeled, using the given connectivity ๐-contrastโ enhance or reduce the image contrast. contrast check โ-contrast-stretch geometryโ improve contrast by `stretching' the intensity range. stretch it out ๐ช-convolve coefficientsโ apply a convolution kernel to the image using coefficients ๐-cycle amountโ cycle the image colormap by amount. spin that color wheel ๐ก-deskew thresholdโ straighten an image using threshold. tilt fixed ๐-despeckleโ reduce the speckles within an image. bye spots ๐งผ-distort method argsโ distort images according to the given method and args. bend it like beckham ๐-draw stringโ annotate the image with a graphic primitive using string โ๏ธ-edge radiusโ apply a filter to detect edges in the image, using radius ๐-emboss radiusโ emboss an image with the given radius. 3D-ish vibes ๐๏ธ-enhanceโ apply a digital filter to enhance a noisy image. glow up for messy pics โจ-equalizeโ perform histogram equalization to an image. balance restored โ๏ธ-evaluate operator valueโ evaluate an arithmetic, relational, or logical expression using operator and value ๐งฎ-extent geometryโ set the image size to geometry. size matters ๐-extract geometryโ extract area from image using geometry โ๏ธ-fftโ implements the discrete Fourier transform (DFT) ๐-flipโ flip image vertically. upside down, bestie ๐-floodfill geometry colorโ floodfill the image with color at geometry. paint bucket energy ๐ชฃ-flopโ flop image horizontally. mirror mirror ๐ช-frame geometryโ surround image with an ornamental border. fancy frame ๐ผ๏ธ-function nameโ apply a function to the image using name ๐ง-gamma valueโ level of gamma correction, set to value ๐-gaussian-blur geometryโ reduce image noise and reduce detail levels with a gaussian blur. soft focus ๐จ-geometry geometryโ preferred size or location of the image, using geometry ๐-grayscale methodโ convert image to grayscale using method. black and white era ๐ฉถ-hough-lines geometryโ identify lines in the image using geometry ๐-identifyโ identify the format and characteristics of the image. detective mode ๐-iftโ implements the inverse discrete Fourier transform (DFT) ๐-implode amountโ implode image pixels about the center by amount. black hole vibes ๐ณ๏ธ-integralโ calculate the sum of values (pixel values) in the image. math girlies rise ๐งฎ-interpolative-resize geometryโ resize image using interpolation, with geometry โจ-kmeans geometryโ K means color reduction using geometry. cluster it ๐จ-lat geometryโ local adaptive thresholding using geometry ๐๏ธ-layers methodโ optimize or compare image layers using method ๐-level valueโ adjust the level of image contrast using value ๐-level-colors color,colorโ level image with the given color,color pair ๐-linear-stretch geometryโ improve contrast by `stretching with saturation' the intensity range. stretch and saturate ๐-liquid-rescale geometryโ rescale image with seam-carving. liquid rescale, it's giving magic ๐ช-mean-shift geometryโ delineate arbitrarily shaped clusters in the image using geometry ๐ซง-median geometryโ apply a median filter to the image using geometry ๐งน-mode geometryโ make each pixel the 'predominant color' of the neighborhood, using geometry ๐-modulate valueโ vary the brightness, saturation, and hue using value ๐๏ธ-monochromeโ transform image to black and white. monochrome moment ๐ค๐ค-morphology method kernelโ apply a morphology method with kernel to the image ๐งฌ-motion-blur geometryโ simulate motion blur using geometry. zoom zoom ๐จ-negateโ replace each pixel with its complementary color. negative space ๐-noise geometryโ add or reduce noise in an image using geometry. static vibes ๐บ-normalizeโ transform image to span the full range of colors. normalize it โจ-opaque colorโ change this color to the fill color. swap it out ๐จ-ordered-dither NxNโ add a noise pattern to the image with specific amplitudes, using an NxN dither ๐๏ธ-paint radiusโ simulate an oil painting with the given radius. art hoe energy ๐จ-perceptible epsilonโ pixel values less than|epsilon|become epsilon or -epsilon ๐ง-polaroid angleโ simulate a Polaroid picture with the given angle. vintage vibes ๐ธ-posterize levelsโ reduce the image to a limited number of color levels. posterize it ๐จ-print stringโ interpret string and print to console. say it louder ๐ฃ๏ธ-profile filenameโ add, delete, or apply an image profile from filename ๐-quantize colorspaceโ reduce colors in this colorspace. quantize it ๐-radial-blur angleโ radial blur the image by angle. spin blur ๐-raise valueโ lighten/darken image edges to create a 3-D effect using value ๐๏ธ-random-threshold low,highโ random threshold the image using low,high ๐ฒ-range-threshold valuesโ perform either hard or soft thresholding within some range of values in an image ๐-region geometryโ apply options to a portion of the image defined by geometry ๐บ๏ธ-renderโ render vector graphics. render queen ๐-resample geometryโ change the resolution of an image using geometry ๐-resize geometryโ resize the image to geometry. classic resize โจ-roll geometryโ roll an image vertically or horizontally by geometry. roll it ๐ฒ-rotate degreesโ apply Paeth rotation to the image by degrees. spin it ๐-sample geometryโ scale image with pixel sampling using geometry ๐-scale geometryโ scale the image to geometry. scale it up ๐-segment valuesโ segment an image using values. cut it into pieces ๐งฉ-selective-blur geometryโ selectively blur pixels within a contrast threshold, using geometry ๐ฏ-sepia-tone thresholdโ simulate a sepia-toned photo with threshold. vintage filter ๐ค-set property valueโ set an image property to value ๐ท๏ธ-shade degreesโ shade the image using a distant light source at degrees. dramatic lighting ๐ก-shadow geometryโ simulate an image shadow using geometry. shadow work ๐-sharpen geometryโ sharpen the image using geometry. crisp it up ๐ช-shave geometryโ shave pixels from the image edges using geometry. trim the edges โ๏ธ-shear geometryโ slide one edge of the image along the X or Y axis using geometry. slant it ๐-sigmoidal-contrast geometryโ lightness rescaling using sigmoidal contrast enhancement, with geometry ๐-sketch geometryโ simulate a pencil sketch using geometry. doodle vibes โ๏ธ-solarize thresholdโ negate all pixels above the threshold level. solarize it โ๏ธ-sort-pixelsโ sort each scanline in ascending order of intensity. organized queen ๐-sparse-color method argsโ fill in an image based on a few color points, using method and args ๐จ-splice geometryโ splice the background color into the image using geometry ๐งฌ-spread amountโ displace image pixels by a random amount. scatter it ๐ฒ-stripโ strip image of all profiles and comments. naked image, no metadata ๐ซฃ-swirl degreesโ swirl image pixels about the center by degrees. swirl it ๐-threshold valueโ threshold the image using value. black or white, no in-between ๐๏ธ-thumbnail geometryโ create a thumbnail of the image using geometry. tiny version ๐ธ-tile filenameโ tile image when filling a graphic primitive, using filename ๐งฑ-tint valueโ tint the image with the fill color using value. tint it ๐-transformโ affine transform image. transform it โจ-transparent colorโ make this color transparent within the image. see-through ๐ป-transposeโ flip image vertically and rotate 90 degrees. flip and rotate ๐-transverseโ flop image horizontally and rotate 270 degrees. flop and rotate ๐-trimโ trim image edges. crop the excess โ๏ธ-type typeโ set the image type. type check ๐ท-unique-colorsโ discard all but one of any pixel color. one of each, periodt ๐-unsharp geometryโ sharpen the image using geometry. unsharp mask, iconic ๐ช-vignette geometryโ soften the edges of the image in vignette style using geometry ๐ธ-wave geometryโ alter an image along a sine wave using geometry. wavy ๐-wavelet-denoise thresholdโ removes noise from the image using a wavelet transform with threshold. denoise it ๐งผ-white-balanceโ automagically adjust white balance of image. balance restored โ๏ธ-white-threshold valueโ force all pixels above value into white. bye bye highlights ๐ค
๐ Image Channel Operators ๐
these are the channel-specific girlies. separate, exchange, extract, transfer โ channel drama, but make it useful ๐
-channel-fx expressionโ exchange, extract, or transfer one or more image channels using expression. channel switch-up ๐-separateโ separate an image channel into a grayscale image. split it ๐ฉถ
๐ Image Sequence Operators ๐
Okay bestie, this is the part where we stop treating images like lonely little individuals and start moving them around as a whole squad. Group-chat energy, but for pixels. ๐ซถ
-appendโ appends an image sequence top to bottom. Want it left to right instead? Use+append. Boom, orientation slay. ๐-clutโ applies a color lookup table to the image. Color glow-up, no cap. ๐-coalesceโ merges a sequence of images.-combineโ combines a sequence of images. Yes,-coalesceand-combineare both right there in the list, they're separate options, that's just the vibe. ๐-compareโ mathematically and visually annotates the difference between an image and its reconstruction. It's giving "spot the difference" but make it math. ๐ฅ-complexoperator โ performs complex mathematics on an image sequence.-compositeโ composites image.-copy geometry offset,โ copies pixels from one area of an image to another.-cropgeometry โ cuts out a rectangular region of the image. โ๏ธ-deconstructโ breaks down an image sequence into constituent parts.-evaluate-sequenceoperator โ evaluates an arithmetic, relational, or logical expression.-flattenโ flattens a sequence of images.-fxexpression โ applies a mathematical expression to an image channel(s).-hald-clutโ applies a Hald color lookup table to the image.-morphvalue โ morphs an image sequence.-mosaicโ creates a mosaic from an image sequence.-polyterms โ builds a polynomial from the image sequence and the corresponding terms (coefficients and degree pairs). Math girlies, rise. ๐-processarguments โ processes the image with a custom image filter.-smushgeometry โ smushes an image sequence together. "Smush" is genuinely the technical term and I am obsessed with that for us. ๐ญ-writefilename โ writes images to this file.
๐ง Image Stack Operators ๐ง
Now we're cloning, deleting, swapping โ full image-stack drama, but make it productive. โจ
-cloneindexes โ clones an image.-deleteindexes โ deletes the image from the image sequence.-duplicatecount,indexes โ duplicates an image one or more times.-insertindex โ inserts the last image into the image sequence.-reverseโ reverses the image sequence.-swapindexes โ swaps two images in the image sequence.
๐ Miscellaneous Options ๐
-debugevents โ displays copious debugging information. Copious. Like, a LOT of it.-distribute-cacheport โ distributed pixel cache spanning one or more servers.-helpโ prints program options. Peak bestie behaviour, fr fr.-logformat โ format of debugging information.-listtype โ prints a list of supported option arguments.-versionโ prints version information.
Here's the tea on settings vs. operators, and you're gonna want to write this one down: you can use any setting or operator as an output-option. But only a limited number of settings are input-option. That short list is: -antialias, -caption, -density, -define, -encoding, -font, -pointsize, -size, and -texture โ plus any of the miscellaneous options. That's it. That's the whole list. ๐
Lowkey the most important thing on this page: don't assume every setting can go on the input side. Only the ones above can.
And now, the format situation. By default, the image format of file is determined by its magic number โจ โ it just knows. But if you wanna specify a particular image format, you've got two moves: precede the filename with an image format name and a colon (i.e. ps:image), or specify the image type as the filename suffix (i.e. image.ps). And if you want standard input or output, just specify 'file' as -. Simple as that. ๐ฆ
ps:image
image.ps
-
๐ SEE ALSO ๐
ImageMagick(1)โ the big one. Go read it, bestie.
๐ COPYRIGHT ๐
Copyright (C) 1999 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, so go peek at file:///usr/share/doc/ImageMagick-7/www/license.html or https://imagemagick.org/license/. ๐ซถ
And that's a wrap on the whole page, angel ๐ brought to you by ImageMagick, dated 2009/01/10 01:00:00, and yes, this is the convert(1) manual, periodt. Go forth and convert. ๐ธโจ๐
๐ฆ where this page comes from
- alpine 3.24: imagemagick-doc 7.1.2.35-r0 ยท ImageMagick
- arch rolling: imagemagick 7.1.2.35-1 ยท ImageMagick
- epel 10: ImageMagick 1:7.1.2.34-1.el10_3 ยท ImageMagick
- fedora 43: ImageMagick 1:7.1.2.32-1.fc43
- fedora 43: ImageMagick 1:7.1.2.32-1.fc43
- fedora 43: ImageMagick 1:7.1.2.34-1.fc43 ยท ImageMagick
- fedora 43: ImageMagick 1:7.1.2.34-1.fc43 ยท ImageMagick
- fedora 44: ImageMagick 1:7.1.2.13-2.fc44 ยท ImageMagick
- fedora 44: ImageMagick 1:7.1.2.13-2.fc44 ยท ImageMagick
- fedora 44: ImageMagick 1:7.1.2.32-1.fc44
- fedora 44: ImageMagick 1:7.1.2.32-1.fc44
- fedora 44: ImageMagick 1:7.1.2.34-1.fc44 ยท ImageMagick
- fedora 44: ImageMagick 1:7.1.2.34-1.fc44 ยท ImageMagick
- fedora 44: ImageMagick 1:7.1.2.35-1.fc44 ยท ImageMagick
- fedora 44: ImageMagick 1:7.1.2.35-1.fc44 ยท ImageMagick
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms