RMagick: Magick Command Options and Their Equivalent Methods

###### RMagick User's Guide and Reference

# RMagick: Magick Command Options and Their Equivalent Methods

## convert, mogrify

### Introduction

If you're familar with the ×Magick 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.2.9. Earlier releases of ImageMagick and the GraphicsMagick `gm` command may not support all these options. Later releases of ImageMagick may have options that are not listed.

×Magick'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)
-annotate x-rotatexy-rotate+x+y text | Draw#annotate(image, x-rotate, y-rotate, 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`)
-authenticate string | Image::Info#authenticate=string
-auto-orient | Image#auto-orient
-average | ImageList#average
-background color | Image::Info#background_color=color
-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]]])
-blue-primary x,y | Image#chromaticity= chromaticity
-blur radiusxsigma | Image#blur_image(radius=0.0, sigma=1.0)
-border widthxheight | Image#border(width, height, color)
-bordercolor color | Image#border_color=color
-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-path | No equivalent
-clone | Image#clone Image#copy Image#dup
-coalesce | ImageList#coalesce
-colorize value | Image#colorize(red, green, blue, [matte, ] fill)
-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 | No equivalent
-comment string | Image#['Comment']=string
-compose operator | This option corresponds to the composite_op argument to Image#composite.
-composite | Image#composite(source_image, 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 | No equivalent
-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
-despeckle | Image#despeckle
-display | No equivalent
-dispose method | Image#dispose=method
-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)
-encoding type | Draw#encoding(type) (for drawing) Draw#encoding=type (for annotation)
-endian type | Image#endian=type
-enhance | Image#enhance
-equalize | Image#equalize
-evaluate operator value | Image#quantum_operator(operator, value [, channel])
-extent | No equivalent
-extract widthxheight+x+y | Image::Info.extract="widthxheight+ x+y"
-family name | Draw#family(name) (for drawing) Draw#family=name (for annotation)
-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
-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)
-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)
-fuzz distance -fuzz distance% | Image#fuzz=distance Image#fuzz="distance%"
-fx | No equivalent. For access to individual pixels in an image, see Image#view.
-gamma red_gamma,green_gamma,blue_gamma | Image#gamma_correct(red_gamma[, green_gamma[, blue_gamma]])
-gaussian 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
-identify | Image#inspect
-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
-label name | Image#['Label']=name
-lat widthxheight+offset | Image#adaptive_threshold( width, height, offset)
-layers method | ImageList#optimize_layers(method)
-level black-point,white-point,gamma | Image#level(black_point=0.0, white_point=MaxRGB, gamma=1.0)
-limit type value | Magick.limit_resource(type, value)
-linewidth width | Draw#stroke_width(width) (for drawing) Draw#stroke_width=width (for annotation)
-list type | No equivalent
-log string | No equivalent
-loop iterations | ImageList#iterations=iterations
-magnify | Image#magnify
-map filename | Image#map(reference, dither=`false`) ImageList#map(reference, dither=`false`)
-mask filename | Image#mask=mask
-matte +matte | Image#matte=`true` Image#matte=`false`
-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.
-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)
-negate +negate | Image#negate Image#negate(`true`)
-noise radius +noise type | Image#reduce_noise(radius) Image#add_noise( type)
-normalize | Image#normalize
-opaque color | Image#opaque(color, fill)
-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)
-ping | Image.ping(filename)
-pointsize value | Draw.pointsize(value) (for drawing) Draw.pointsize=value (for annotation)
-posterize levels | Image#posterize(levels=4, dither=`false`)
-preview type | Image#preview(type)
-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...])
-red-primary x,y | Image#chromaticity= chromaticity
-regard-warnings | No equivalent
-region widthxheight+x+y | 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)
-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
-scenes value-value | No equivalent
-seed | No equivalent
-segment cluster-thresholdxsmoothing-threshold | Image#segment(colorspace= `RGBColorspace`, cluster_threshold=1.0, smoothing_threshold=1.5, verbose=false)
-separate | Image#channel(type)
-sepia-tone threshold | Image#sepiatone(threshold=MaxRGB)
-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)
-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...])
-size widthxheight+offset | Image::Info#size="widthxheight+ offset"
-sketch radiusxsigma+angle | Image#sketch(radius=0.0, sigma=1.0, angle=0.0)
-solarize threshold | Image#solarize(threshold=50)
-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)
-stretch type | Draw#font_stretch(type) (for drawing) Draw#font_stretch=type (for annotation)
-storage-type type | This option corresponds to the type argument to Image#import_pixels and Image#export_pixels_to_str
-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)
-support factor | This option corresponds to the support argument to Image#resize.
-swirl degrees | Image#swirl(degrees)
-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)
-tint | No equivalent
-transform | Image#affine_transform( matrix)
-transparent color | Image#transparent(color, opacity=TransparentOpacity)
-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)
-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
-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]]])
-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)
-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