GraphicsMagick

- Home
- Project
- Download
- Install
- Source
- News
- Utilities
- Programming
- Reference

# GraphicsMagick Supported Formats

GraphicsMagick uses an ASCII string known as "magick" (e.g. "GIF") to identify file formats, algorithms acting as formats, built-in images, and embedded profile types. After a file has been read or "pinged", the associated magick string is stored in the "magick" member of the Image structure, and is reported in the default output of 'gm identify'.

GraphicsMagick supports reading over 92 major file formats (not including sub-formats). The following table provides a summary of the supported image formats.

Supported Image Formats
Format | Mode | Description | Notes
AAI | RW | Dune HD AAI Image (aka Auburn Animation Image) | Format used by Dune HD media players to display images with transparency, such as icons for Internet radio stations or channels.
ART | RW | PFS: 1st Publisher | Format originally used on the Macintosh (MacPaint?) and later used for PFS: 1st Publisher clip art.
AVIF | R | AVIF Image File Format | AV1 in a _HEIF container. AVIF is supported via libheif if it supports AVIF decode.
AVS | RW | AVS X image |
BMP | RW | Microsoft Windows bitmap |
CALS | R | Continuous Acquisition and Life-cycle Support Type 1 image | Specified in MIL-R-28002 and MIL-PRF-28002. Standard blueprint archive format as used by the US military to replace microfiche.
CIN | R | Kodak Cineon | Kodak Cineon Log format (4.5 draft). Precursor to SMPTE DPX
CGM | R | Computer Graphics Metafile | Requires ralcgm to render CGM files.
CMYK | RW | Raw cyan, magenta, yellow, and black samples | Use -size, -depth, -endian, and -interlace to specify the image width, height, depth, byte order, and interlace.
CUR | R | Microsoft Cursor Icon |
CUT | R | DR Halo |
DCM | R | Digital Imaging and Communications in Medicine (DICOM) image | Used by the medical community for images like X-rays. See the NEMA DICOM web site for more information. DICOM is the basis for the DICONDE format.
DCX | RW | ZSoft IBM PC multi-page Paintbrush image |
DIB | RW | Microsoft Windows Device Independent Bitmap | DIB is a BMP file without the BMP header. Used to support embedded images in compound formats like WMF.
DPX | RW | Digital Moving Picture Exchange | RGB and grayscale are fully supported at 1, 8, 10, 12, and 16 bits as per the SMPTE 268M-2003 (V2.0) specification. This includes support for images stored in a planar (multi-element) configuration and Cineon Log RGB. Rec. 601 and 709 YCbCr are fully supported with 4:4:4 and 4:2:2 subsampling. DPX is commonly used to store image frames in film and HDTV production.
EMF | R | Microsoft Enhanced Metafile (32-bit) | Only available under Microsoft Windows.
EPDF | RW | Encapsulated Portable Document Format |
EPI | RW | Adobe Encapsulated PostScript Interchange format | Requires Ghostscript to read.
EPS | RW | Adobe Encapsulated PostScript | Requires Ghostscript to read.
EPS2 | W | Adobe Level II Encapsulated PostScript | Requires Ghostscript to read.
EPS3 | W | Adobe Level III Encapsulated PostScript | Requires Ghostscript to read.
EPSF | RW | Adobe Encapsulated PostScript | Requires Ghostscript to read.
EPSI | RW | Adobe Encapsulated PostScript Interchange format | Requires Ghostscript to read.
EPT | RW | Adobe Encapsulated PostScript Interchange format with TIFF preview | Requires Ghostscript to read.
FAX | RW | Group 3 FAX | Note that FAX machines use non-square pixels which are 1.5 times wider than they are tall but computer displays use square pixels, so FAX images may appear to be narrow unless they are explicitly resized using a resize specification of "150x100%". Please note that this is not a TIFF format.
FIG | R | FIG graphics format | Requires TransFig.
FITS | RW | Flexible Image Transport System |
FPX | RW | FlashPix Format | Requires FlashPix SDK.
GIF | RW | CompuServe Graphics Interchange Format | 8-bit RGB PseudoColor with up to 256 palette entries. Specify the format "GIF87" to write the older version 87a of the format. The PNG format provides a superior set of features to GIF. Consider using PNG format rather than GIF if clients are able to read PNG.
GRAY | RW | Raw gray samples | Use -size, -depth, and -endian to specify the image width, height, depth, and byte order.
GRAYA | RW | Raw gray samples + alpha | Use -size, -depth, and -endian to specify the image width, height, depth, and byte order.
HEIF | R | High Efficiency Image File Format (with h.265/HEVC encoding) | HEIF is a container format supporting multiple codecs. HEIF with h.265/HEVC encoding is supported via libheif and libde265.
HPGL | R | HP-GL plotter language | Requires hp2xx 3.2.0 or later
HTML | RW | Hypertext Markup Language with a client-side image map | Also known as "HTM". Requires html2ps to read.
HRZ | RW | Slow-Scan Television (SSTV) | This a format used when an image is transmitted over amateur radio using audio equipment.
ICO | R | Microsoft icon | Also known as "ICON".
JBIG | RW | Joint Bi-level Image experts Group file interchange format | Also known as "BIE" and "JBG". Requires jbigkit 1.0 or later
JNG | RW | JPEG Network Graphics | JPEG in a PNG-style wrapper with transparency. Requires libjpeg and libpng-1.0.2 or later, libpng-1.2.5 or later recommended.
JP2 | RW | JPEG-2000 JP2 File Format Syntax | Requires jasper 1.600.0 or later
JPC | RW | JPEG-2000 Code Stream Syntax | Requires jasper 1.600.0 or later
JPEG | RW | Joint Photographic Experts Group JFIF format | Requires jpegsrc.v6b.tar.gz or later
JXL | RW | JPEG XL | Requires JPEG XL 0.7 or later
MAN | R | Unix reference manual pages | Requires that GNU groff and Ghostcript are installed.
MAT | RW | MATLAB image format | Coming from MathWorks for storing matrices. Currently supported types are 2D matrices: byte, word, double, complex and 3D matrices containing RGB [x*y*3] byte, word.
MIFF | RW | Magick image file format | ImageMagick's lossless image format (with ASCII header) which ensures that no image attributes understood by ImageMagick or GraphicsMagick are lost.
MONO | RW | Bi-level bitmap in least-significant-byte first order |
MNG | RW | Multiple-image Network Graphics | Requires libpng-1.0.2 or later, libpng-1.2.5 or later recommended.
MPEG | RW | Motion Picture Experts Group file interchange format (version 1) | Requires mpeg2vidcodec_v12.tar.gz.
M2V | RW | Motion Picture Experts Group file interchange format (version 2) | Requires mpeg2vidcodec_v12.tar.gz.
MPC | RW | Magick Persistent Cache image file format | The native "in-memory" GraphicsMagick uncompressed file format. This file format is identical to that used by Open ImageMagick to represent images in memory and is read in "zero time" via memory mapping. The MPC format is not portable and is not suitable as an archive format. It is suitable as an intermediate format for high-performance image processing. The MPC format requires two files to support one image. When writing the MPC format, a file with extension ".mpc" is used to store information about the image, while a file with extension .cache stores the image pixels. The storage space required by a MPC image (or an image in memory) may be calculated by the equation (QuantumDepth*Rows*Columns*5)/8.
MSL | RW | Magick Scripting Language | MSL is the XML-based scripting language supported by the conjure utility.
MTV | RW | MTV Raytracing image format |
MVG | RW | Magick Vector Graphics. | The native GraphicsMagick vector metafile format. A text file containing vector drawing commands accepted by convert's -draw option.
OTB | RW | On-the-air Bitmap |
P7 | RW | Xv's Visual Schnauzer thumbnail format |
PALM | RW | Palm pixmap |
PAM | RW | Portable Arbitrary Map format | Superset of PNM (PPM, PGM, PPM) raw type formats. Supports bilevel, gray, RGB, CMYK, alpha channel.
PBM | RW | Portable bitmap format (black and white) |
PCD | RW | Photo CD | The maximum resolution written is 768x512 pixels since larger images require huffman compression (which is not supported).
PCDS | RW | Photo CD | Decode with the sRGB color tables.
PCL | W | HP Page Control Language | For output to HP laser printers.
PCX | RW | ZSoft IBM PC Paintbrush file |
PDB | RW | Palm Database ImageViewer Format |
PDF | RW | Portable Document Format | Requires Ghostscript to read.
PFA | R | Postscript Type 1 font (ASCII) | Opening as file returns a preview image.
PFB | R | Postscript Type 1 font (binary) | Opening as file returns a preview image.
PGM | RW | Portable graymap format (gray scale) |
PICON | RW | Personal Icon |
PICT | RW | Apple Macintosh QuickDraw /PICT file |
PIX | R | Alias/Wavefront RLE image format |
PNG | RW | Portable Network Graphics | Requires libpng-1.0.2 or later, libpng-1.2.5 or later recommended.
PNM | RW | Portable anymap | PNM is a family of formats supporting portable bitmaps (PBM) , graymaps (PGM), and pixmaps (PPM). There is no file format associated with pnm itself. If PNM is used as the output format specifier, then GraphicsMagick automatically selects the most appropriate format to represent the image. The default is to write the binary version of the formats. Use '-quality 0' to write the ASCII version of the formats.
PPM | RW | Portable pixmap format (color) |
PS | RW | Adobe PostScript file | Requires Ghostscript to read.
PS2 | RW | Adobe Level II PostScript file | Requires Ghostscript to read.
PS3 | RW | Adobe Level III PostScript file | Requires Ghostscript to read.
PSD | RW | Adobe Photoshop bitmap file | PSD format is no longer supported since the 1.3.24 release.
PTIF | RW | Pyramid encoded TIFF | Multi-resolution TIFF containing successively smaller versions of the image down to the size of an icon. The desired sub-image size may be specified when reading via the -size option.
PWP | R | Seattle File Works multi-image file |
RAS | R | TopoL (GIS) |
RAD | R | Radiance image file | Requires that ra_ppm from the Radiance software package be installed.
RGB | RW | Raw red, green, and blue samples | Use -size, -depth, -endian, and -interlace to specify the image width, height, depth, byte order, and interlace.
RGBA | RW | Raw red, green, and blue and matte samples | Use -size, -depth, -endian, and -interlace to specify the image width, height, depth, byte order, and interlace.
RLA | R | Alias/Wavefront image file |
RLE | R | Utah Run length encoded image file |
SCT | R | Scitex Continuous Tone Picture |
SFW | R | Seattle FilmWorks image |
SGI | RW | Irix RGB image |
SHTML | W | Hypertext Markup Language client-side image map | Used to write HTML clickable image maps based on a the output of montage or a format which supports tiled images such as MIFF.
SUN | RW | SUN Rasterfile |
SVG | RW | Scalable Vector Graphics | Requires libxml2 and freetype2. Note that SVG is a very complex specification so support is still not complete.
TGA | RW | Truevision Targa image | Also known as formats "ICB", "VDA", and "VST".
TIFF | RW | Tagged Image File Format | Also known as "TIF". Requires tiff-v3.5.4.tar.gz or later. Note that since the Unisys LZW patent recently expired, libtiff may still require a separate LZW patch in order to support LZW. LZW is included in libtiff by default since v3.7.0.
TIM | R | PSX TIM file |
TTF | R | TrueType font file | Requires freetype2. Opening as file returns a preview image.
TXT | RW | Raw text file |
UIL | W | X-Motif UIL table |
UYVY | RW | Interleaved YUV raw image | Use -size command line option to specify width and height.
VICAR | RW | VICAR rasterfile format |
VIFF | RW | Khoros Visualization Image File Format |
WBMP | RW | Wireless bitmap | Support for uncompressed monochrome only.
WebP | RW | Google's WebP | Requires libwebp from "https://developers.google.com/speed/webp/". WebP is good for small photos for the web and is supported by Google's Chrome and Firefox.
WMF |  | Windows Metafile | Requires libwmf. By default, renders WMF files using the dimensions specified by the metafile header. Use the -density option to adjust the output resolution, and thereby adjust the output size. The default output resolution is 72DPI so "-density 144" results in an image twice as large as the default. Use -background color to specify the WMF background color (default white) or -texture filename to specify a background texture image.
WPG | R | Word Perfect Graphics File |
XBM | RW | X Windows system bitmap, black and white only | Used by the X Windows System to store monochrome icons.
XCF | R | GIMP image |
XPM | RW | X Windows system pixmap | Also known as "PM". Used by the X Windows System to store color icons.
XWD | RW | X Windows system window dump | Used by the X Windows System to save/display screen dumps.
YUV | RW | CCIR 601 4:1:1 | Use -size command line option to specify width and height.

GraphicsMagick supports a number of image format specifications which refer to images prepared via an algorithm, or input/output targets. The following table lists these pseudo image formats:

Pseudo Image Formats
Tag | Mode | Description | Notes
CAPTION | R | Image caption | Draws text on a canvas image with size specified by -size canvas color as specified by -background' (default white), and text stroke and fill colors as specified by `-stroke and -fill. Capable of supporting multi-line text.
CLIPBOARD | RW | Windows Clipboard | Only available under Microsoft Windows.
FRACTAL | R | Plasma fractal image |
GRADIENT | R | Gradual passing from one shade to another | Returns a rendered gradient image using the specified image size. Specify the desired shading as part of the filename. For example: gradient:red-blue or gradient:#F00-#00F
HISTOGRAM | W | Histogram of the image | Generate an RGB histogram of the input image. The output format is always ImageMagick MIFF (regardless of file extension). For example: gm convert file.tiff histogram:file.miff
IDENTITY | R | Hald CLUT identity image | Generate a Hald CLUT identity image of a specified order. The order is specified as an argument like "IDENTITY:8". The default order is eight, producing a 512x512 image.
INFO | W | Image descriptive information and statistics | Writes descriptive information similar to 'identify'
LABEL | R | Text image format | Specify the desired text as the filename (e.g. "label:This is a label").
MAP | RW | Colormap intensities and indices | Set -depth to set the sample size of the intensities; indices are 16-bit if colors > 256.
MATTE | W | MATTE format | Write only.
NULL | RW | NULL image | Useful for creating blank tiles with montage (use "NULL:"). Also useful as an output format when evaluating image read performance.
PLASMA | R | Plasma fractal image | Creates an image using the plasma fractal. For example: gm convert -size 640x480 plasma: file.miff
PREVIEW | W | Show a preview an image enhancement, effect, or f/x | Creates a preview montage of images prepared over a parameteric range in order to assist with parameter selection. Specify the desired preview type via the -preview option). The output file is always written in the ImageMagick MIFF format. For example: gm convert file.tiff -preview gamma preview:file.miff
PRINT | W | Send image to your computer printer | Unix users may set the PRINTER (for 'lp') or LPDEST (for 'lpr') environment variables to select the desired printer.
SCAN | R | Import image from a scanner device | Requires SANE Specify the device name and path as the filename (e.g. "scan:mustek:/dev/scanner").
STEGANO | R | Steganographic image | Use -size command line option to specify width, height, and offset of the steganographic image
TILE | R | Tiled image | Create a tiled version of an image at by tiling a image. Use -size to specify the tiled image size. The image is specified similar to "TILE:image.miff". For example: gm convert -size 800x600 tile:image.jpg out.jpg
VID | RW | Visual Image Directory | Used to create a thumbnailed directory (tiled thumbnails) of a set of images which may be used to select images to view via the display program, or saved to a MIFF or SHTML file. For example: gm convert vid:"*.jpg" index.miff
WIN | RW | Select image from or display image to your computer screen | Only supported under Microsoft Windows. For example: gm convert file.jpg -rotate 90 win:
X | RW | Select image from or display image to your X server screen | Also see the import and display programs. For example: gm convert file.jpg -rotate 90 x:
XC | R | Canvas image of specified color | Useful to create solid color "canvas" images. Use -size and -depth to specify the image width, height, and depth. Example XC color specifications include "XC:red" and "XC:# FF0000". See the color reference for the numeric values used for named colors. For example: gm convert -size 640x480 xc:red red.jpg

GraphicsMagick includes a number of built-in (embedded) images which may be referenced as if they were an image file. The IMAGE: format tag may be used via the syntax "IMAGE:name" to request an embedded image (e.g. IMAGE:LOGO). For backwards compatibility, the image specifications GRANITE:, LOGO:, NETSCAPE:, and ROSE: may also be used to request images with those names.

A new canvas image of a specified size may be created using one of these pattern images using a command similar to:

    gm convert -size 640x480 PATTERN:BRICKS bricks.miff

The TILE: virtual image type may also be used similar to:

    gm convert -size 640x480 TILE:IMAGE:BRICKS bricks.miff

Built-In Images And Patterns
Name | Description | Notes/Sample
BRICKS | 16x16 brick pattern |
CHECKERBOARD | 30x30 checkerboard pattern |
CIRCLES | 16x16 circles pattern |
CROSSHATCH | 8x4 crosshatch pattern |
CROSSHATCH30 | 8x4 crosshatch pattern with lines at 30 degrees. |
CROSSHATCH45 | 8x4 crosshatch pattern with lines at 45 degrees. |
FISHSCALES | 16x8 fish scales pattern |
GRANITE | 128x128 granite texture pattern |
GRAY0 | 32x32 0% intensity gray |
GRAY5 | 32x32 5% intensity gray |
GRAY10 | 32x32 10% intensity gray |
GRAY15 | 32x32 15% intensity gray |
GRAY20 | 32x32 20% intensity gray |
GRAY25 | 32x32 25% intensity gray |
GRAY30 | 32x32 30% intensity gray |
GRAY35 | 32x32 35% intensity gray |
GRAY40 | 32x32 40% intensity gray |
GRAY45 | 32x32 45% intensity gray |
GRAY50 | 32x32 50% intensity gray |
GRAY55 | 32x32 55% intensity gray |
GRAY60 | 32x32 60% intensity gray |
GRAY65 | 32x32 65% intensity gray |
GRAY70 | 32x32 70% intensity gray |
GRAY75 | 32x32 75% intensity gray |
GRAY80 | 32x32 80% intensity gray |
GRAY85 | 32x32 85% intensity gray |
GRAY90 | 32x32 90% intensity gray |
GRAY95 | 32x32 95% intensity gray |
GRAY100 | 32x32 100% intensity gray |
HEXAGONS | 30x18 hexagon pattern |
HORIZONTAL | 8x4 horizontal line pattern |
HORIZONTALSAW | 16x8 horizontal saw-tooth pattern |
HS_BDIAGONAL | 8x8 backward diagonal line pattern (45 degrees slope) |
HS_CROSS | 8x8 cross line pattern |
HS_DIAGCROSS | 8x8 diagonal line cross pattern (45 degrees slope) |
HS_FDIAGONAL | 8x8 forward diagonal line pattern (45 degrees slope) |
HS_HORIZONTAL | 8x8 horizontal line pattern |
HS_VERTICAL | 8x8 vertical line pattern |
LEFT30 | 8x4 forward diagonal pattern (30 degrees slope) |
LEFT45 | 8x8 forward diagonal line pattern (45 degrees slope) |
LEFTSHINGLE | 24x24 left shingle pattern |
LOGO | 640x480, GraphicsMagick Logo |
NETSCAPE | 216x144 image using colors in Netscape 216 (6x6x6 ) color cube. | Most commonly used with the convert/mogrify -map option to create web safe images.
OCTAGONS | 16x16 octagons pattern |
RIGHT30 | 8x4 backward diagonal line pattern (30 degrees) |
RIGHT45 | 8x8 backward diagonal line pattern (30 degrees) |
RIGHTSHINGLE | 24x24 right shingle pattern |
ROSE | 70x46, Picture of a rose. |
SMALLFISHSCALES | 8x8 small fish scales pattern |
VERTICAL | 8x8 vertical line pattern |
VERTICALBRICKS | 16x16 vertical brick pattern |
VERTICALLEFTSHINGLE | 24x24 vertical left shingle pattern |
VERTICALRIGHTSHINGLE | 24x24 vertical right shingle pattern |
VERTICALSAW | 8x16 vertical saw-tooth pattern |

GraphicsMagick provides a number of format identifiers which are used to add, remove, and save embedded profiles for images which can support embedded profiles. Image types which may contain embedded profiles are TIFF, JPEG, PDF, and PNG.

Supported Embedded Profile Formats
Format | Mode | Description | Notes
8BIM | RW | Photoshop resource format (binary) |
8BIMTEXT | RW | Photoshop resource format (ASCII) | An ASCII representation of the 8BIM format.
APP1 | RW | Raw application information |
APP1JPEG | RW | Raw JPEG binary data | Profile in JPEG wrapper.
ICC | RW | International Color Consortium color profile | Also known as "ICM". To read, use -profile with convert.
IPTC | RW | IPTC Newsphoto (binary) | To read, use -profile with convert
IPTCTEXT | RW | IPTC Newsphoto (ASCII) | An ASCII representation of the IPTC format.

Support for some of the formats are delegated to libraries or external programs. The README describes where to find these distributions and any special configuration options required.

To get a complete listing of the image formats which are supported on your system, type

    gm convert -list format

On some platforms, GraphicsMagick automatically processes these extensions: .gz for Zip compression, .Z for Unix compression, and .bz2 for block compression. For example, a PNM image called image.pnm.gz is automatically uncompressed while the image is read.

Copyright © GraphicsMagick Group 2002-2025