# class Image::Info - Optional arguments

Some RMagick methods, such as read and write, accept an "optional arguments" block in which you can set attributes that modify the method's output. These attributes belong to the Image::Info class. The Image::Info class exists only to accept optional arguments for those Image and ImageList methods.

This page explains the methods defined in the Image::Info class. Generally, each Image or ImageList method that uses the Image::Info class to get optional arguments will only accept some of the attributes defined in the class, that is, only those attributes that are meaningful for the particular method. Any other attributes that you set are ignored. Also, some attributes are only used by a subset of the image formats. See the ImageMagick documentation for more information.

Note You do not ever need to create an Image::Info object. The object is created for you before the block is entered and destroyed after the block is exited.

### Table Of Contents

- antialias=
- background_color=
- border_color=
- colorspace=
- compression=
- density=
- depth=
- dither=
- font=
- format=
- fuzz=
- interlace=
- matte_color=
- page=
- quality=
- server_name=
- size=
- subimage=
- subrange=
- units=
- view=

antialias= | image.antialias= `true` or `false`
| Control antialiasing of rendered Postscript and Postscript or TrueType fonts. The default is `true`.
background_color= | image.background_color= aString image.background_color= aPixel
| Set the image background color. The argument may be a color name or a aPixel.The default is "white".
border_color= | image.border_color= aString image.border_color= aPixel
| Set the image border color. The argument may be a color name or a aPixel.The default is "#dfdfdf".
colorspace= | image.colorspace= aColorspaceType
| Specify the image pixel interpretation. The argument is a ColorspaceType constant.
compression= | image.compression= aCompressionType
| Specify the image compression type. Not all compression types are supported for all image formats. If you specify an unsupported compression type, the default compression type is used instead.
density= | image.density= aString
| Specify the vertical and horizontal resolution in pixels. The argument is a string in the form "XxY" where "X" is the horizontal resolution and "Y" is the vertical resolution. You can also specify simply "X", in which case the vertical resolution is set equal to "X". The default is "72.0x72.0".
depth= | image.depth= aNumber
| Specify the image depth, either 8 or 16. You can specify 16 only if ImageMagick was compiled with QuantumDepth=16.
dither= | image.dither= `true` or `false`
| Apply Floyd/Steinberg error diffusion to the image. The basic strategy of dithering is to trade intensity resolution for spatial resolution by averaging the intensities of several neighboring pixels. Images which suffer from severe contouring when reducing colors can be improved with this option.
font= | image.font= aString
| Set the text rendering font. See Draw#font= and Draw#annotate.
format= | image.format= aString
| Set the image format, "GIF" or "JPG" for example. See File Formats.
fuzz= | image.fuzz= anInteger
| Set the level of "fuzziness" for comparing pixels. By default the pixels must be identical to be considered equal. The larger the fuzz value the more difference is tolerated.
interlace= | image.interlace= anInterlaceType

Set the interlacing scheme. The default is NoInterlace. This option is used to specify the type of interlacing scheme for raw image formats such as RGB or YUV. NoInterlace means do not interlace, LineInterlace uses scanline interlacing, and PlaneInterlace uses plane interlacing. PartitionInterlace is like PlaneInterlace except the different planes are saved to individual files (e.g. image.R, image.G, and image.B). Use LineInterlace or PlaneInterlace to create an interlaced GIF or progressive JPEG image.

matte_color= | image.matte_color= aString image.matte_color= aPixel
| Set the image transparent color. The argument may be a color name or a aPixel.The default is "#bdbdbd".
page= | image.page= aString
| Set the equivalent size of the Postscript page. The argument is a geometry string. The default is "612x792>".
quality= | image.quality= anInteger
| Set the compression level to use when writing JPEG, MIFF, and PNG images. The default is 75.
server_name= | image.server_name= aString
| Set the X11 display to obtain fonts from.
size= | image.size= aString
| Set the width and height of the image when reading a built-in image format that does not have an inherent size, or when reading an image from a multi-resolution file format such as Photo CD, JBIG, or JPEG.
subimage= | image.subimage= anInteger
| Specify a subimage of an image sequence in a multi-frame image.
subrange= | image.subrange= anInteger
| Specify the number of images relative to the base image. See subimage=.
units= | image.units= aResolutionType
| Specify the units of image resolution. See ResolutionType.
view= | image.view= aString
| FlashPix viewing parameters.