File: Export: Image
(When Matrix window is active)
Export image to file
1. expImage fname:="c:\flower";
2. expImage im:=[Mbook1]1 type:=tif fname:=c:\flower;
3. expimage -t mytheme f:="c:\ExportedUsingTheme";
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Input Matrix | im |
Input MatrixObject |
|
The image to export. The default is the active image. |
File Type | type |
Input int |
|
Specify the export type.
|
File Name | fname |
Input string |
|
Specify the path and filename of the exported image. If file extension is omitted, it will be appended according to the file type. |
Image Settings | tr |
Input TreeNode |
|
Specify the image settings. Note that different settings are available for different file types. For all types, you can specify the DPI resolution and color depth. When JPG is selected for File Type, you can further specify the compression ratio. As for TIFF, both the color space and compression method are available.
|
The expImage function exports a matrix object as an image file. The matrix object of any data type can be used as input, but it might be converted to another data type according to the settings and output type.
Eight export file types (BMP, GIF, JPEG, TIFF etc) are supported. Users can choose among them according to their needs. In addition, the TIFF file format includes an Export as Grayscale GeoTIFF output option with separate treenode settings.
You can also specify DPI resolution, color depth, etc. using the Image Settings tree in the dialog. Please select a file type before you use this tree, because different settings are available for different file types.
Details on TreeNode Dialog Options
1. The following example exports the active matrix object as a JPEG image file (c:\test.jpg):
2. The following script command exports the active matrix object as a BMP file (c:\test.bmp) without opening the dialog:
expImage fname:="c:\test.bmp" type:=0;
Keywords:publishing