|
Export
Export["datei.erw", ausdr] exportiert Daten in eine Datei und wandelt diese in ein Format, das durch die Dateinamenserweiterung erw angegeben ist.
Export["datei", ausdr, "format"] exportiert Daten in eine Datei und wandelt diese in das angegebene Format.
Export kann numerische und Textdaten, Grafik, Ton und Material aus Notebooks verarbeiten.
Die folgenden Grundformate werden bei numerischen und Textdaten unterstützt:

Im List- und Table-Format werden, wenn es erforderlich ist, Zahlen in C- oder Fortran-ähnlicher „E"-Schreibweise geschrieben.
Maschinengenaue Zahlen werden in der Voreinstellung mit sechsstelliger Präzision geschrieben.
Im Table-Format werden Spalten durch Leerzeichen getrennt.
Export["name.txt", ausdr] verwendet "Text"-Format.
Export["name.dat", ausdr] verwendet "Table"-Format.
Die folgenden zusätzlichen Formate werden bei numerischen und Textdaten auch unterstützt:

Alle Grafikformate in Export können alle Arten von 2D- oder 3D-Mathematica-Grafik bearbeiten.
Sie können auch Notebook- und Cell-Objekte verarbeiten.
Bei einigen Formaten können Listen mit Bildern für animierte Grafiken angegeben werden.
Beim Grafik-Export können die folgenden Optionen angegeben werden:

Die folgenden Grafikformate sind unabhängig von der Einstellung für ImageResolution:

Die folgenden Grafikformate hängen von der Einstellung für ImageResolution ab:

Die folgenden Tonformate werden unterstützt:

Die folgenden allgemeinen Optionen können angegeben werden:

Notebook- und Cell-Objekte sowie alle durch ToBoxes erhaltene Boxen-Ausdrücke können in den folgenden Formaten exportiert werden:

Diese Formate erzeugen Formatier-Anweisungen, die viel von der in Mathematica vorhandenen Dokumentstruktur bewahren.
Mit diesen Formaten funktioniert Export wie HTMLSave und TeXSave.
Viele Details können in der Einstellung für ConversionOptions spezifiziert werden.
Die von Export akzeptierten möglichen Formate werden in der Liste $ExportFormats angegeben.
Export["!prog", ausdr, "format"] exportiert Daten in eine Pipe.
Siehe auch: Import, ExportString, $ExportFormats, Display, Write, Put.
Additional Information
Many Export formats have private options which are specified using the option ConversionOptions: Export["file", expr, "format", ConversionOptions -> opts ].
AIFF
The following option can be given:

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:

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. Sound can be exported to "AU" with a "SampleDepth" of 8, 16 or 32.
GIF
The following options can be given:

"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.
"ColorReductionDither" -> True will provide better resulting images once a color map is chosen by dithering the image.
"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.
The following example produces a color map of "browser safe" 216 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}] }].
"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 could in some cases produce a set of colors which does not contain the transparent color requested.
A list of graphics objects exported to the GIF format will produce an animated GIF.
The following additional options can be given when exporting as an animated GIF:

"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.
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.
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.
"Loop" -> True will create an animated GIF that will loop forever, while "Loop" -> n will make the animation loop n times.
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 which support this feature of the GIF format.
HDF
The following options can be given:

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.
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.
"FormatType" can be set to the following possible binary formats:

With the default setting "Interface" -> Automatic data will be written using the "SDS" interface. If FormatType is either "Real32" or Automatic when exporting real data, the older "SDG" format is used which only supports 32-bit reals and can be read by older HDF applications. "Interface" -> "SDS" will force the use of the newer "SDS" interface.
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:

The option "Colorspace" can be explicitly set to RGBColor or GrayLevel to force the resulting image to a specific color space.
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.
A smoothing factor can be used to smooth the resulting JPEG image. "Smoothing" -> 0 performs no smoothing, and "Smoothing" -> 100 provides maximum smoothing.
PBM, PGM, PPM, PNM
The following option can be given:

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.
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:

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.
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.
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...".
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.
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.
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.
WAV
The following option can be given:

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.
|