RMagick: Magick Command Options and Their Equivalent Methods

Table of Contents

Commands

convert, mogrify

Introduction

If you're familiar with the ImageMagick command-line tools convert, mogrify, composite, and montage you can use the tables on this page to determine which RMagick methods correspond to the options used by these tools.

The options listed below are for ImageMagick 6.5.5. Earlier releases of ImageMagick may not support all these options. Later releases of ImageMagick may have options that are not listed.

ImageMagick's convert and mogrify share many options with each other, as well as with the other utilities. This table includes all the options for both convert and mogrify. When another utility has an option with the same name and purpose, and same RMagick equivalent, the option is omitted from the table for that utility.

Magick Option RMagick Method
-adaptive-blur radiusxsigma Image#adaptive_blur(radius=0.0, sigma=1.0)
-adaptive-resize widthxheight Image#adaptive_resize(width, height)
-adaptive-sharpen radiusxsigma Image#adaptive_sharpen(radius=0.0, sigma=1.0)
-adjoin No equivalent. All images in an imagelist are written to the same file if the file format supports multi-image files.
-affine sx, rx, ry, sy, tx, ty Draw#affine(sx, rx, ry, sy, tx, ty) (for drawing)
Draw#affine=matrix (for annotation)
-alpha type Image#alpha=type
-annotate x-rotatexy-rotate+x+y text Draw#annotate(image, width, height, x, y, text)
-antialias Draw#stroke_antialias(true)
Draw#text_antialias(true) (for drawing)
Draw#text_antialias=true (for annotation)
-append
+append
ImageList#append(true)
ImageList#append(false)
-attenuate value Image::Info#attenuate=value
-authenticate string Image::Info#authenticate=string
-auto-gamma Image#auto_gamma_channel([channel...])
-auto-level Image#auto_level_channel([channel...])
-auto-orient Image#auto-orient
-average ImageList#average
-backdrop color No equivalent
-background color Image::Info#background_color=color
-bench No equivalent
-bias value[%] Image#bias(value)
Image#bias('value%')
-black-point-compensation Image#black_point_compensation= true
-black-threshold threshold Image#black_threshold(red_channel [, green_channel [, blue_channel [, opacity_channel]]])
-blend src-percentxdst-percent Image#blend(overlay, src_percent, dst_percent, x_offset=0, y_offset=0)
-blue-primary x,y Image#chromaticity= chromaticity
-blue-shift factor Image#blue_shift(factor)
-blur radiusxsigma Image#blur_image(radius=0.0, sigma=1.0)
-border widthxheight Image#border(width, height, color)
-bordercolor color Image#border_color=color
-borderwidth geometry No equivalent
-cache threshold See -limit, below
-caption string Image::Info#caption=string
-cdl filename No equivalent
-channel type Image::Info#channel(type [, type...])
Channel value arguments are accepted by many methods.
-charcoal factor Image#charcoal(radius=0.0, sigma=1.0)
-chop widthxheight+x+y Image#chop(x, y, width, height)
-clip No equivalent
-clip-mask Image#mask(image)
-clip-path No equivalent
-clone Image#clone
Image#copy
Image#dup
-clut Image#clut_channel(clut_image [, channel...])
-coalesce ImageList#coalesce
-colorize value Image#colorize(red, green, blue, [matte, ] fill)
-colormap type No equivalent
-colors This option corresponds to the first argument to Image#quantize and ImageList#quantize.
-colorspace colorspace Image#colorspace=colorspace
Also corresponds to the colorspace argument to Image#quantize and ImageList#quantize
-combine Image.combine(red, green, blue, opacity)
-comment string Image#['Comment']=string
-compose operator This option corresponds to the composite_op argument to Image#composite.
-compose Mathematics -set option:compose:args a,b,c,d Image#composite_mathematics(source_image, a, b, c, d, gravity, x, y)
-composite Image#composite(source_image, gravity, x, y, composite_op)
-compress type Image#compression=type
-contrast
+contrast
Image#contrast(true)
Image#contrast(false)
-contrast-stretch black-pointxwhite-point Image#contrast_stretch_channel( black_point, white_point [, channel...])
-convolve kernel Image#convolve(order, kernel)
-crop widthxheight+x+y Image#crop(x, y, width, height)
-cycle amount Image#cycle_colormap(amount)
-debug Magick.set_log_event_mask
-decipher Image#decipher(passphrase)
-deconstruct ImageList#deconstruct
-define key=value
+define key
Image::Info#define(format, key, value)
Image::Info#undefine(format, key)
-delay ticksxticks-per-second Image#ticks=ticks
Image#ticks_per_second= ticks-per-second
-delete index ImageList#delete_at(index)
-density widthxheight Image#density="widthxheight"
Image::Info#density="widthxheight"
Image#x_resolution=width
Image#y_resolution=height
-depth depth Image::Info#depth=depth
-descend No equivalent
-deskew threshold Image#deskew(threshold=0.40, auto_crop_width)
-despeckle Image#despeckle
-displace See -displace, below
-display No equivalent
-dispose method Image#dispose=method
-dissimilarity-threshold value No equivalent
-dissolve See -dissolve, below
-distort method arguments
+distort method arguments
Image#distort(method, arguments, bestfit)
-dither
+dither
This option corresponds to the dither option to Image#quantize and ImageList#quantize.
-draw string Draw#draw
-edge radius Image#edge(radius=0.0)
-emboss radius Image#emboss(radius=0.0, sigma=1.0)
-encipher Image#encipher(passphrase)
-encoding type Draw#encoding(type) (for drawing)
Draw#encoding=type (for annotation)
-endian type Image::Info#endian=type
-enhance Image#enhance
-equalize Image#equalize
Image#equalize_channel
-evaluate operator value Image#quantum_operator(operator, value [, channel])
-extent widthxheight Image#extent(width, height, x=0, y=0)
-extract widthxheight+x+y Image::Info.extract="widthxheight+ x+y"
-family font_family Draw#font_family(font_family) (for drawing)
Draw#font_family=font_family (for annotation)
-fft No equivalent
-fill color Draw#fill(color) (for drawing)
Draw#fill=color (for annotation)
-filter type This option corresponds to the filter option to Image#resize.
-flatten ImageList#flatten_images
-flip Image#flip
-floodfill geometry color Image#color_floodfill(x, y, color)
-flop Image#flop
-font name Draw#font(name) (for drawing)
Draw#font=name (for annotation)
-foreground color No equivalent
-format type Image#format=type
-frame widthxheight+outer-bevel-width+ inner-bevel-width Image#frame(width, height, x, y, inner_bevel_width, outer_bevel_width, color)
-function function arguments Image#function_channel(function, arguments)
-fuzz distance
-fuzz distance%
Image#fuzz=distance
Image#fuzz="distance%"
-fx expression ImageList#fx(expression)
-gamma red_gamma,green_gamma,blue_gamma Image#gamma_correct(red_gamma[, green_gamma[, blue_gamma]])
-gaussian-blur radiusxsigma Image#gaussian_blur(radius=0.0, sigma=1.0)
Image#gaussian_blur_channel( radius=0.0, sigma=1.0 [, channel...])
-geometry widthxheight+x+y Image#geometry="widthx height+x+y"
-gravity type Draw#gravity(type) (for drawing)
Draw#gravity= type (for annotation)
-green-primary x,y Image#chromaticity= chromaticity
-hald-clut No equivalent
-help No equivalent
-highlight-color color Image#compare_channel(ref_image, metric[, channels...]) { self.highlight_color color}
-iconGeometry No equivalent
-iconic No equivalent
-identify Image#inspect
-ift No equivalent
-immutable Image#freeze
-implode factor Image#implode(factor)
-insert index ImageList#insert(index)
ImageList#[index]
-intent type Image#rendering_intent= type
-interlace type Image#interlace=type
-interpolate type Image#pixel_interpolation_method= type
-interline-spacing value Draw#interline_spacing(value) (for drawing)
Draw#interline_spacing=value (for annotation)
-interword-spacing value Draw#interword_spacing(value) (for drawing)
Draw#interword_spacing=value (for annotation)
-kerning value Draw#kerning(value) (for drawing)
Draw#kerning=value (for annotation)
-label name Image#['Label']=name
-lat widthxheight+offset Image#adaptive_threshold( width, height, offset)
-layers method
-layers Composite
ImageList#optimize_layers(method)
ImageList#composite_layers(imagelist, operator=OverCompositeOp)
-level black-point,white-point,gamma Image#level_channel(channel, black_point=0.0, white_point=QuantumRange, gamma=1.0)
+level black_point,white_point,gamma Image#levelize_channel(black_point, white_point, gamma=1.0[, channels...])
-level-colors black_color-white_color Image#level_colors(black_color, white_color, gamma=1.0[, channels...])
-limit type value Magick.limit_resource(type, value)
-linear-stretch black-pointxwhite-point Image#linear_stretch(black_point [, white_point])
-linewidth width Draw#stroke_width(width) (for drawing)
Draw#stroke_width=width (for annotation)
-liquid-rescale geometry Image#liquid_rescale(new_width, new_height, delta_x, rigidity)
-list color
-list format
-list type
Magick.colors
Magick.formats
Magick.fonts
-log string Magick.set_log_format
-loop iterations ImageList#iterations=iterations
-lowlight-color color Image#compare_channel(ref_image, metric[, channels...]) { self.lowlight_color color}
-magnify Image#magnify
-map filename Image#map(reference, dither=false)
ImageList#map(reference, dither=false)
-mask filename Image#add_composite_mask(image)
-mattecolor color This option corresponds to the color option to Image#frame.
-median radius Image#median_filter(radius=1.0)
-metric type This option corresponds to the metric option to Image#distortion_channel.
-mode No equivalent
-modulate value Image#modulate(brightness=1.0, saturation=1.0, hue=1.0)
-monitor Image#monitor=
-monochrome Image#image_type= Magick::BilevelType
-morph frames ImageList#morph(frames)
-mosaic ImageList#mosaic
-motion-blur radiusxsigma+angle Image#motion_blur(radius=0.0, sigma=1.0, angle=0.0)
-name No equivalent
-negate
+negate
Image#negate
Image#negate(true)
-noise radius
+noise type
Image#reduce_noise(radius)
Image#add_noise( type)
-normalize Image#normalize
Image#normalize_channel
-opaque color
+opaque color
Image#opaque(color, fill)
Image#opaque_channel(color, fill, opacity, true)
-ordered-dither NxN Image#ordered_dither(N)
-orient orientation Image#orientation=orientation
-page widthxheight+x+y
-page media
Image::Info.page="widthxheight+ x+y"
Image::Info.page="media"
-paint radius Image#oil_paint(radius=3.0)
-path path No equivalent
-pause No equivalent
-ping Image.ping(filename)
-pointsize value Draw.pointsize(value) (for drawing)
Draw.pointsize=value (for annotation)
-polaroid angle Image.polaroid(angle=-5.0)
-posterize levels Image#posterize(levels=4, dither=false)
-preview type Image#preview(type)
-print No equivalent
-process command No equivalent
-profile filename
+profile name
Image#add_profile(filename)
Image#delete_profile(name)
-quality value Image::Info#quality=value
-quantize colorspace Image#quantize(number_colors=256, colorspace=RGBColorspace, dither=true, tree_depth=0, measure_error=false)
ImageList#quantize(number_colors=256, colorspace=RGBColorspace, dither=true, tree_depth=0, measure_error=false)
-quiet No equivalent
-radial-blur angle Image#radial_blur(angle)
-raise widthxheight
+raise widthxheight
Image#raise(width, height, true)
Image#raise(width, height, false)
-random-threshold lowxhigh Image#random_threshold_channel(" lowxhigh" [, channel...])
-recolor matrix Image#recolor(matrix)
-red-primary x,y Image#chromaticity= chromaticity
-regard-warnings No equivalent
-region widthxheight+x+y No equivalent
-remap
+remap
Image#remap(remap_image, dither=RiemersmaDitherMethod)
ImageList#remap()
-remote No equivalent
-render No equivalent
-repage geometry
+repage
Image#page=geometry
This option corresponds to adding true as the last argument to Image#crop.
-resample horizontalxvertical Image#resample(horizontal, vertical)
-resize widthxheight Image#resize(width, height)
-respect-parenthesis No equivalent
-reverse ImageList#reverse
-roll +x+y Image#roll(x, y)
-rotate degrees Image#rotate(degrees [, qualifier])
-sample widthxheight Image#sample(width, height)
-sampling-factor horizontal-factorxvertical-factor Image::Info#sampling_factor=horizontal-factorx vertical-factor
-scale widthxheight Image#scale(width, height)
-scene value ImageList#scene= value
Image::Info#scene= value
-screen No equivalent
-seed Kernel.srand
-segment cluster-thresholdxsmoothing-threshold Image#segment(colorspace= RGBColorspace, cluster_threshold=1.0, smoothing_threshold=1.5, verbose=false)
-selective-blur geometry Image#selective_blur(radius, sigma, threshold [, channel...])
-separate Image#separate(channel...])
-sepia-tone threshold Image#sepiatone(threshold=QuantumRange)
-set attribute value Image#['attribute'] = value
-shade azimuthxelevation Image#shade(shading=false, azimuth=30, elevation=30)
-shadow opacityxsigma+x+y Image#shadow(x=4, y=4, sigma=4.0, opacity=4.0)
-shared-memory No equivalent
-sharpen radiusxsigma Image#sharpen(radius=0.0, sigma=1.0)
-shave widthxheight Image#shave(width, height)
-shear x-degreesxy-degrees Image#shear(x_degrees, y_degrees)
-sigmoidal-contrast contrastxmid-point Image#sigmoidal_contrast_channel( contrast=3.0, mid_point=50.0, sharpen=false [, channel...])
-silent No equivalent
-size widthxheight+offset Image::Info#size="widthxheight+ offset"
-sketch radiusxsigma+angle Image#sketch(radius=0.0, sigma=1.0, angle=0.0)
-snaps No equivalent
-solarize threshold Image#solarize(threshold=50)
-sparse-color method, x, y, color... Image#sparse_color(method, x, y, color[, x, y, color...][, channel...])
-splice widthxheight+x+y Image#splice(x, y, width, height [, color])
-spread amount Image#spread(amount=3)
-stegano offset Image#stegano(watermark, offset)
-stereo Image#stereo(offset_image)
-storage-type type This option corresponds to the type argument to Image#import_pixels and Image#export_pixels_to_str
-stretch font_stretch Draw#font_stretch(font_stretch) (for drawing)
Draw#font_stretch=font_stretch (for annotation)
-strip Image#strip!
-stroke color Draw#stroke(color) (for drawing)
Draw#stroke=color (for annotation)
-strokewidth value Draw#stroke_width(value) (for drawing)
Draw#stroke_width=value (for annotation)
-style font_style Draw#font_style(font_style) (for drawing)
Draw#font_style=font_style (for annotation)
-swap index,index ImageList#[]=
-swirl degrees Image#swirl(degrees)
-taint No equivalent
-text-font No equivalent
-texture filename Image::Info#texture=image
-threshold value Image#bilevel_channel(value [, channel...])
-thumbnail widthxheight Image#thumbnail(width, height)
-tile filename Draw#tile(image)
-tile-offset +x+y Image::Info#tile_offset = "+x+y"
-tint No equivalent
-title No equivalent
-transform Image#affine_transform( matrix)
-transparent color
+transparent color
Image#transparent(color, opacity=TransparentOpacity)
Image#paint_transparent(color, opacity, true)
-transparent-color color Image#transparent_color= color
-transpose Image#transpose
-transverse Image#transverse
-treedepth value This option corresponds to the tree_depth argument to Image#quantize and ImageList#quantize.
-trim Image#trim
-type type Image#type=type
-undercolor color Draw#text_undercolor(color)
Draw#undercolor=color
-unique-colors Image#unique_colors
-units type Image#units=type
-unsharp radiusxsigma+amount+threshold Image#unsharp_mask(radius=0.0, sigma=1.0, amount=1.0, threshold=0.05)
-update No equivalent
-verbose No equivalent
-version Magick::Long_version
-view string Image::Info#view=string
-vignette radiusxsigma+amount+threshold Image#vignette(x, y, radius=0.0, sigma=10.0)
-virtual-pixel method Image#virtual_pixel_method= method
-visual No equivalent
-watermark brightness See watermark, below
-wave amplitudexwavelength Image#wave(amplitude=25.0, wavelength=150.0)
-weight type Draw#font_weight(type) (for drawing)
Draw#font_weight=type
-white-point x.y Image#chromaticity= chromaticity
-white-threshold threshold Image#white_threshold(red_channel [, green_channel[, blue_channel[, opacity_channel]]])
-window id No equivalent
-window-group No equivalent
-write filename Image#write(filename)
ImageList#write(filename)

composite

Magick Option RMagick Method
-blend src-percentxdst-percent Image#blend(overlay, src_percent, dst_percent, x_offset=0, y_offset=0)
-displace x-amplitudexy-amplitude Image#displace(displacement_map, x_amplitude, y_amplitude, x_offset=0, y_offset=0)
-dissolve src_percentxdst_percent Image#dissolve(overlay, src_percent, dst_percent, x_offset=0,y_offset=0)
-tile Image#composite_tiled(src, composite_op=OverCompositeOp)
-watermark lightness Image#watermark(mark, lightness=1.0, saturation=1.0, x_offset=0, y_offset=0)

montage

Notes

The RMagick methods that correspond to montage's options are in the Magick::ImageList::Montage class.

Magick Option RMagick Method
-backgroundcolor color Montage#background_color=color
-bordercolor color Montage#border_color=color
-borderwidth value Montage#border_width=value
-clone No equivalent
-compose operator Montage#compose=operator
-fill color Montage#fill=color
-frame geometry Montage#frame="geometry"
-geometry geometry Montage#geometry="geometry"
-gravity type Montage#gravity=type
-mattecolor color Montage#matte_color=color
-mode type No equivalent
-pointsize value Montage#pointsize=value
-shadow Montage#shadow=true
-stroke color Montage#stroke=color
-texture filename Montage#texture=image
-tile geometry Montage#tile=geometry
-title string Montage#title=string