This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Documentation / Mathematica / Built-in Functions / Graphics and Sound / Import and Export /

Additional Information: Export

Many Export formats have private options that are specified using the option ConversionOptions: Export["file", expr, "format", ConversionOptions -> opts].

AIFF

The following option can be given:

FilledSmallSquare The default setting is "SampleDepth" -> 8 unless a different depth is explicitly specified in the Sound object. Sound can be exported to "AIFF" with a "SampleDepth" of 8 or 16.

AU

The following option can be given:

FilledSmallSquare The default setting is "SampleDepth" -> 8, which creates a mu-law 8-bit encoded sound file, unless a different depth is explicitly specified in the Sound object.

FilledSmallSquare Sound can be exported to "AU" with a "SampleDepth" of 8, 16, or 32.

BMP

The following option can be given:

CSV

The following options can be given:

FilledSmallSquare The option "ColumnAlignment" can be set to the values Left, Right, Center, or None.

FilledSmallSquare The option "FormatType" is a function which is applied to every element in the table.

FilledSmallSquare "TableHeadings" None gives no labels for the rows or columns.

FilledSmallSquare "TableHeadings" Automatic gives successive integer labels for the rows and columns.

FilledSmallSquare "TableHeadings" list gives a list of labels for the rows and columns.

FilledSmallSquare "TableHeadings" columnheadings, rowheadings gives separate sets of labels for the columns and rows.

DICOM

The following options can be given:

FilledSmallSquare Export creates files in the DICOM file format as specified in Section PS 3.10 of the DICOM standard.

FilledSmallSquare DICOM Export accepts two forms.

FilledSmallSquare Like other bitmap formats, it accepts Notebook, Cell, and Graphics expressions. These are used to generate the Pixel Data. Additional Data Elements are generated from the Pixel Data as needed. The default Transfer Syntax (Implicit VR Little Endian) is used.

FilledSmallSquare DICOM export also accepts a list of Data Elements of the form DataElementTag value, ... .

FilledSmallSquare The ConversionOption "DataDictionary" determines the Data Element Tags used for names when a list of Data Elements is exported.

FilledSmallSquare With "DataDictionary" Automatic, all Data Element Names in Section PS 3.6 of the DICOM Standard are recognized. All Data Element Names of the form "Group Number", "Element Number" are also exported. Any other names cause the export to fail.

FilledSmallSquare A different set of Data Element Tags can be set using "DataDictionary" "name" "Group Number", "Element Number", ... .

FilledSmallSquare The ConversionOption "VRs" determines how a Data Element Value is encoded when a list of Data Elements is exported.

FilledSmallSquare With "VRs" Automatic, all VRs in Section PS 3.6 of the DICOM Standard are used. All other Data Elements are exported with an unknown ("UN") VR.

FilledSmallSquare A different set of VRs can be set using "VRs" "Group Number", "Element Number" "vr", ... .

FilledSmallSquare Allowed VRs include "AE", "AS", "AT", "CS", "DA", "DS", "DT", "FL", "FD", "IS", "LO", "LT", "OB", "OW", "PN", "SH", "SL", "SQ", "SS", "ST", "TM", "UI", "UL", "UN", "US", and "UT".

DXF

The following option can be given:

EPS

The following option can be given:

FilledSmallSquare With "IncludeSpecialFonts" True, Mathematica fonts are embedded in the eps file, making the file self-contained.

FilledSmallSquare With "IncludeSpecialFonts" False, fonts are not embedded in the eps file, making the file significantly smaller. The eps file can be viewed in applications or printed to printers that have access to the Mathematica fonts.

ExpressionML

In addition to the options listed for "XML", the following option can be given:

FilledSmallSquare The setting for "Annotations" is a list which may include any number of the choices "DocumentHeader", "XMLDeclaration", and "DOCTYPEDeclaration".

FITS

The following option can be given:

FilledSmallSquare The option "BITPIX" determines whether data is represented as integer or real data. It also determines the number of bytes used to store each number.

FilledSmallSquare The option "BITPIX" can be any of the following values:

FilledSmallSquare The "BITPIX" option cannot be used to alter the data. It must be possible to express the data in the requested form.

FilledSmallSquare The "BITPIX" option does not override the "BITPIX" entry in any headers. Only if there is no header or a header without a "BITPIX" entry will the option be used.

FilledSmallSquare Export accepts a list of Header Data Units (HDUs). Each HDU is a list containing a header and a data unit. If headers are not provided, a basic header is automatically generated.

FilledSmallSquare Each header is a list of entries of the form entry_String "Value" val_, "Comment" com_String or, for entries with no comment, entry_String val_.

FilledSmallSquare Data units are tensors. A 0-dimensional tensor is represented by Null.

FilledSmallSquare The primary HDU, IMAGE extensions, and ASCII table extensions are supported.

GIF

The following options can be given:

FilledSmallSquare "Background" -> RGBColor[r, g, b] sets the background color of the exported GIF to the specified graphics directive. Many applications will ignore this setting and will also not display this color if there is no transparency set.

FilledSmallSquare "ColorReductionDither" -> True will provide better resulting images once a color map is chosen by dithering the image.

FilledSmallSquare "ColorReductionPalette" -> Automatic will choose an adaptive set of at most 256 colors. "ColorReductionPalette" -> n will choose at most n colors for the color palette. "ColorReductionPalette" -> , , ... specifies a list of color directives to use to color reduce the image. The values for must be CMYKColor, GrayLevel, Hue, or RGBColor directives. The number of colors chosen for "ColorReductionPalette" must be between 2 and 256.

FilledSmallSquare The following example produces a color map of 216 "browser safe" colors: Export["file.gif", gr, "GIF", ConversionOptions -> {"ColorReductionPalette" -> Table[RGBColor[i,j,k], {i,0,1,0.2},{j,0,1,0.2},{k,0,1,0.2}] }].

FilledSmallSquare "Transparency" -> RGBColor[r, g, b] requests that the specified color directive defines the transparent color for the exported GIF. "Transparency" -> GrayLevel[1] defines white as the transparent color. By default, an adaptive "ColorReductionPalette" is used to produce the GIF color palette, and this, in some cases, could produce a set of colors that does not contain the transparent color requested.

FilledSmallSquare A list of graphics objects exported to the GIF format will produce an animated GIF.

FilledSmallSquare The following additional options can be given when exporting as an animated GIF:

FilledSmallSquare "AnimationDisplayTime" -> n sets the delay time in seconds for each frame. By default no delay time is used. If a list of delay times is used, the sequence of delay times is applied to the entire list of frames, repeating the delay time sequence if necessary.

FilledSmallSquare The option "Disposal" tells an application what should replace each frame after the frame is done displaying. The option can have the values of None, False, Background, or Previous. The default setting of "Disposal" -> None will not do anything, and with no transparency in the GIF, this setting will have no noticeable effect. However, if you are creating a transparent GIF animation, you will usually want "Disposal" -> Background as this will clear each frame in the animation before the next frame is displayed; otherwise you will see each frame image drawn on top of the other.

FilledSmallSquare When exporting a list of images for an animated GIF, "GlobalColorReduction" -> True will build one color reduction palette from all images to get one global color map used by the entire GIF, as opposed to building a unique color map for each frame, which could increase the size of the resulting animated GIF.

FilledSmallSquare "Loop" -> True will create an animated GIF that will loop forever, while "Loop" -> n will make the animation loop n times.

FilledSmallSquare With the setting "Pause" -> True, user intervention is required for the animated GIF to continue to the next frame. Currently, there are very few applications that support this feature of the GIF format.

HDF

The following options can be given:

FilledSmallSquare With the setting "Append" -> True, the HDF dataset is appended to the existing file instead of completely replacing any existing file. The file is created if it does not already exist.

FilledSmallSquare With the default setting of "FormatType" -> Automatic, a multidimensional array of integers is exported as an array of 32-bit integers, and real arrays are exported as an array of 32-bit reals. If an array contains a mixture of integers and reals, all data in the array will be exported as reals. All values are exported modulo the specified data format size limits.

FilledSmallSquare "FormatType" can be set to the following possible binary formats:

FilledSmallSquare Export of HDF currently only supports the "scientific datasets" SDS interface.

HTML

All of the options to HTMLSave are also options that can be used in ConversionOptions when exporting to "HTML".

JPEG

The following options can be given:

FilledSmallSquare The option "Colorspace" can be explicitly set to RGBColor or GrayLevel to force the resulting image to a specific color space.

FilledSmallSquare The "Quality" factor determines the quality and size of an exported JPEG, 0 being the lowest quality and smallest file size, and 100 being the highest quality and largest file size.

FilledSmallSquare A smoothing factor can be used to smooth the resulting JPEG image. "Smoothing" -> 0 performs no smoothing, and "Smoothing" -> 100 provides maximum smoothing.

List

The following options can be given:

FilledSmallSquare The option "FormatType" is a function which is applied to every element in the list.

MathML

In addition to the options listed for "XML", the following options can be given:

FilledSmallSquare The setting for "Annotations" is a list which may include any number of the choices "DocumentHeader", "XMLDeclaration", and "DOCTYPEDeclaration".

NotebookML

In addition to the options listed for "XML", the following options can be given:

FilledSmallSquare The setting for "Annotations" is a list which may include any number of the choices "DocumentHeader", "XMLDeclaration", "DOCTYPEDeclaration", and "StyleAdvisories".

PBM, PGM, PPM, PNM

The following option can be given:

FilledSmallSquare With the default setting "FormatType" -> Automatic, a PBM image will normally be saved as a raw binary PBM file if the number of colors in the image is below the maximum number of levels for a binary format; otherwise the image will be saved in ASCII text PBM format. "FormatType" -> "Text" will force the use of the ASCII text PBM format.

STL

The following options can be given:

FilledSmallSquare The default setting "SurfaceOrientation" -> Automatic results in no orientation applied to triangles.

FilledSmallSquare Setting "SurfaceOrientation" -> x, y orients all triangles such that the "top" of each triangle faces the point.

FilledSmallSquare Specifying "SurfaceOrientation" -> Infinity orients all triangles so that they face away from the origin.

Table

The following options can be given:

FilledSmallSquare The option "ColumnAlignment" can be set to the values Left, Right, Center, or None.

FilledSmallSquare The option "FormatType" is a function which is applied to every element in the table.

FilledSmallSquare "TableHeadings" None gives no labels for the rows or columns.

FilledSmallSquare "TableHeadings" Automatic gives successive integer labels for the rows and columns.

FilledSmallSquare "TableHeadings" list gives a list of labels for the rows and columns.

FilledSmallSquare "TableHeadings" columnheadings, rowheadings gives separate sets of labels for the columns and rows.

TeX

All of the options to TeXSave are also options that can be used in ConversionOptions when exporting to "TeX".

TIFF

The following options can be given:

FilledSmallSquare TIFF images can be saved in different byte ordering formats. By default the byte ordering for the current platform is used. ByteOrdering -> 1 or ByteOrdering -> -1 will force the use of a specific byte ordered TIFF.

FilledSmallSquare The option "Compression" can have the values None, "Packbits", "LZW", "JPEG", or "ZIP". A TIFF exported with "LZW", "JPEG", or "ZIP" compression schemes may not be recognized by certain applications.

FilledSmallSquare TIFF images can be saved in a meshed or planar configuration. "Planes" -> "Single" stores RGBColor data in an "RGBRGB..." order, while "Planes" -> "Multiple" stores the data as "RRR...GGG...BBB...".

FilledSmallSquare The "Predictor" option is only used with "LZW" and "ZIP" compression schemes and can be set to either None or "HorizontalDifferencing". Depending upon the contents of the image, a different "Predictor" value could result in better compression.

FilledSmallSquare The option "ImageScaling" determines whether exported data is scaled to standard byte values or whether the "MaxValue" TIFF tag is used and the data is left unscaled. Some applications do not correctly check the "MaxValue" TIFF tag and may display images incorrectly if this method is used.

FilledSmallSquare A list of graphics objects can be exported to the TIFF format and each image will be stored in a TIFF directory of the file. Some applications will only read the first image of a TIFF file containing multiple images.

TSV

The following options can be given:

FilledSmallSquare The option "ColumnAlignment" can be set to the values Left, Right, Center, or None.

FilledSmallSquare The option "FormatType" is a function which is applied to every element in the table.

FilledSmallSquare "TableHeadings" None gives no labels for the rows or columns.

FilledSmallSquare "TableHeadings" Automatic gives successive integer labels for the rows and columns.

FilledSmallSquare "TableHeadings" list gives a list of labels for the rows and columns.

FilledSmallSquare "TableHeadings" columnheadings, rowheadings gives separate sets of labels for the columns and rows.

WAV

The following option can be given:

FilledSmallSquare The default setting is "SampleDepth" -> 8 unless a different depth is explicitly specified in the Sound object. Sound can be exported to "WAV" with a "SampleDepth" of 8 or 16.

XML

The form of output produced by Export["file", data, "XML"] depends on the kind of data being exported.

When the data to be exported is a symbolic XML expression (as obtained from Import["file", "SymbolicXML"], for example), the symbolic expression is converted into XML text.

When the data to be exported is a notebook or cell expression, NotebookML is generated. For expressions that are neither symbolic XML nor notebooks nor cells, ExpressionML is generated. For these cases, see the options listed for NotebookML and ExpressionML.

The following options may be given for any form of XML: