When the program is driven from an automation script, an options string can be specified in the script that acts as the export options dialogs do in the program. The string consists of comma-separated parameters, which specify the behavior of the various export options.
Parameter |
Type |
Description |
Filter |
string |
PCX |
ColorDepth |
-32, -16, -8, 1, 4, 8, 24, 32 |
Specifies the color depth to use. ColorDepth=-32 -- 32 bit greyscale output ColorDepth=-16 -- 16 bit greyscale output ColorDepth=-8 -- 8 bit greyscale output ColorDepth=1 -- 1 bit color indexed output ColorDepth=4 -- 4 bit color indexed output ColorDepth=8 -- 8 bit color indexed output ColorDepth=24 -- 24 bit true color output ColorDepth=32 -- 32 bit true color with alpha output |
ColorReductionMethod |
1, 2, 3, 4, 5 |
Specifies the color reduction method to use. ColorReductionMethod=1 -- Use the Ordered Dither color reduction method ColorReductionMethod=2 -- Use the Diffused Dither color reduction method ColorReductionMethod=3 -- Use the Popularity color reduction method ColorReductionMethod=4 -- Use the MedianCut555 color reduction method ColorReductionMethod=5 -- Use the MedianCut888 color reduction method |
HDPI |
integer |
Specifies the number of pixels per horizontal inch. |
Height |
integer |
Specifies the number of pixels tall an output image will be. |
KeepAspect |
0 or 1 |
If this is set to 1, for any of the settings Height, Width, HDPI or VDPI you only need to set one option and Voxler will automatically calculate the other parameters in line with the aspect ratio of the input image. KeepAspect=0 -- Do not retain the aspect ratio KeepAspect=1 -- Do retain the aspect ratio |
ModuleID |
integer |
Numeric ID of the module to be exported.
0=entire viewer window 2=default |
VDPI |
integer |
Specifies the number of pixels per vertical inch. |
Width |
integer |
Specifies the number of pixels wide an output image will be. |
Example
This example shows how to export an PCX file with the various options.
CommandApi.Construct("Export")
CommandApi.Option("GuiEnabled", "False")
CommandApi.Option("ClearOptions", "False")
CommandApi.Option("Filter", "pcx")
CommandApi.Option("Options", "HDPI=96; Height=418; VDPI=96; Width=576")
CommandApi.Option("Path", "C:/Path/To/Export/file.pcx")
CommandApi.Option("PersistOptions", "True")
CommandApi.Option("ModuleId", "0")
CommandApi.Do()
Used by: Export
See Also