Exporting Graphics and Sounds

The Wolfram Language allows you to export graphics and sounds in a wide variety of formats. If you use the notebook front end for the Wolfram Language, then you can typically just copy and paste graphics and sounds directly into other programs using the standard mechanism available on your computer system.

Export["name.ext",graphics]export graphics to a file in a format deduced from the file name
Export["file",graphics,"format"]export graphics in the specified format
Export["!command",graphics,"format"]export graphics to an external command
Export["file",{g1,g2,},]export a sequence of graphics for an animation
ExportString[graphics,"format"]generate a string representation of exported graphics

Exporting Wolfram Language graphics and sounds.

"EPS"Encapsulated PostScript ()
"PDF"Adobe Acrobat portable document format ()
"SVG"Scalable Vector Graphics ()
"PICT"Macintosh PICT
"WMF"Windows metafile format ()
"TIFF"TIFF (, )
"GIF"GIF and animated GIF ()
"JPEG"JPEG (, )
"PNG"PNG format ()
"BMP"Microsoft bitmap format ()
"PCX"PCX format ()
"XBM"X window system bitmap ()
"PBM"portable bitmap format ()
"PPM"portable pixmap format ()
"PGM"portable graymap format ()
"PNM"portable anymap format ()
"DICOM"DICOM medical imaging format (, )
"AVI"Audio Video Interleave format ()

Typical graphics formats supported by the Wolfram Language. Formats in the first group are resolution independent.

This generates a plot.
In[1]:=
Click for copyable input
Out[1]=
This exports the plot to a file in Encapsulated PostScript format.
In[2]:=
Click for copyable input
Out[2]=

When you export a graphic outside of the Wolfram Language, you usually have to specify the absolute size at which the graphic should be rendered. You can do this using the ImageSize option to Export.

ImageSize->x makes the width of the graphic be x printer's points; ImageSize->72xi thus makes the width xi inches. The default is to produce an image that is four inches wide. ImageSize->{x,y} scales the graphic so that it fits in an x×y region.

ImageSizeAutomaticabsolute image size in printer's points
"ImageTopOrientation"Tophow the image is oriented in the file
ImageResolutionAutomaticresolution in dpi for the image

Options for Export.

Within the Wolfram Language, graphics are manipulated in a way that is completely independent of the resolution of the computer screen or other output device on which the graphics will eventually be rendered.

Many programs and devices accept graphics in resolutionindependent formats such as Encapsulated PostScript (EPS). But some require that the graphics be converted to rasters or bitmaps with a specific resolution. The ImageResolution option for Export allows you to determine what resolution in dots per inch (dpi) should be used. The lower you set this resolution, the lower the quality of the image you will get, but also the less memory the image will take to store. For screen display, typical resolutions are 72 dpi and above; for printers, 300 dpi and above.

"DXF"AutoCAD drawing interchange format ()
"STL"STL stereolithography format ()

Typical 3D geometry formats supported by the Wolfram Language.

"WAV"Microsoft wave format ()
"AU"μ law encoding ()
"SND"sound file format ()
"AIFF"AIFF format (, )

Typical sound formats supported by the Wolfram Language.