2.10.19 Exporting Graphics and Sounds
| Export["name.ext", graphics] | export graphics in a format deduced from the file name | | Export["file", graphics, "format"] | export graphics in the specified format | Export["file", { , , ... }, ... ] | export a sequence of graphics for an animation | | ExportString[graphics, "format"] | generate a string representation of exported graphics |
Exporting graphics and sounds.
| "EPS" | Encapsulated PostScript (.eps) | | "PDF" | Adobe Acrobat portable document format (.pdf) | | "SVG" | Scalable Vector Graphics (.svg) | | "PICT" | Macintosh PICT | | "WMF" | Windows metafile format (.wmf) | | "TIFF" | TIFF (.tif, .tiff) | | "GIF" | GIF and animated GIF (.gif) | | "JPEG" | JPEG (.jpg, .jpeg) | | "PNG" | PNG format (.png) | | "BMP" | Microsoft bitmap format (.bmp) | | "EPSI" | Encapsulated PostScript with device-independent preview (.epsi) | | "EPSTIFF" | Encapsulated PostScript with TIFF preview | | "PCX" | PCX format (.pcx) | | "XBitmap" | X window system bitmap (.xbm) | | "PBM" | portable bitmap format (.pbm) | | "PPM" | portable pixmap format (.ppm) | | "PGM" | portable graymap format (.pgm) | | "PNM" | portable anymap format (.pnm) | | "DICOM" | DICOM medical imaging format (.dcm, .dic) | | "AVI" | Audio Video Interleave format (.avi) |
Typical graphics formats supported by Mathematica. The first group are resolution independent. When you export a graphic outside of Mathematica, 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->72 xi 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.
| ImageSize | Automatic | absolute image size in printer's points | | ImageRotated | False | whether to rotate the image (landscape mode) | | ImageResolution | Automatic | resolution in dpi for the image |
Options for Export. Within Mathematica, 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 resolution-independent 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 (.dxf) | | "STL" | STL stereolithography format (.stl) |
Typical 3D geometry formats supported by Mathematica.
| "WAV" | Microsoft wave format (.wav) | | "AU" | law encoding (.au) | | "SND" | sound file format (.snd) | | "AIFF" | AIFF format (.aif, .aiff) |
Typical sound formats supported by Mathematica.
|