Next: , Previous: PostScript Images, Up: Images

38.16.8 ImageMagick Images

If you build Emacs with ImageMagick support, you can use the ImageMagick library to load many image formats (see File Conveniences). The image type symbol for images loaded via ImageMagick is imagemagick, regardless of the actual underlying image format.

— Function: imagemagick-types

This function returns a list of image file extensions supported by the current ImageMagick installation. Each list element is a symbol representing an internal ImageMagick name for an image type, such as BMP for .bmp images.

— User Option: imagemagick-enabled-types

The value of this variable is a list of ImageMagick image types which Emacs may attempt to render using ImageMagick. Each list element should be one of the symbols in the list returned by imagemagick-types, or an equivalent string. Alternatively, a value of t enables ImageMagick for all possible image types. Regardless of the value of this variable, imagemagick-types-inhibit (see below) takes precedence.

— User Option: imagemagick-types-inhibit

The value of this variable lists the ImageMagick image types which should never be rendered using ImageMagick, regardless of the value of imagemagick-enabled-types. A value of t disables ImageMagick entirely.

Images loaded with ImageMagick support the following additional image descriptor properties:

:background background
background, if non-nil, should be a string specifying a color, which is used as the image's background color if the image supports transparency. If the value is nil, it defaults to the frame's background color.
:width, :height
The :width and :height keywords are used for scaling the image. If only one of them is specified, the other one will be calculated so as to preserve the aspect ratio. If both are specified, aspect ratio may not be preserved.
:rotation
Specifies a rotation angle in degrees.
:index
This has the same meaning as it does for GIF images (see GIF Images), i.e., it specifies which image to view inside an image bundle file format such as DJVM. You can use the image-metadata function to retrieve the total number of images in an image bundle.