LizardTech MrSID .SID Import Automation Options

 

When the program is driven from an automation script, an options string can be specified in the script that acts as the import options dialogs do in the program. The string consists of comma-separated parameters, which specify the behavior of the various import options.

 

Parameter

Type

Default

Description

Filter

string

 

SID

Scale

1 = 1/1 (uses most memory, best quality)

2 = 1/2

4 = 1/4

8 = 1/8

16 = 1/16

32 = 1/32 (uses least memory, lowest quality)

1

Since some images can be extremely large once expanded into memory, the import filter allows the image to be reduced in dimensions by 1/2 to 1/32 of the original size.

LRX

integer

maximum X

Use LRX to limit the import to a subregion of the file. LRX is the X pixel coordinate for the lower right corner of the desired subregion.

LRY

integer

maximum Y

Use LRY to limit the import to a subregion of the file. LRY is the Y pixel coordinate for the lower right corner of the desired subregion.

ULX

integer

0

Use ULX to limit the import to a subregion of the file. ULX is the X pixel coordinate for the upper left corner of the desired subregion.

ULY

integer

0

Use ULY to limit the import to a subregion of the file. ULY is the Y pixel coordinate for the upper left corner of the desired subregion.

 

Remarks

The pixel coordinates increase in the X direction from left to right and increase in the Y direction from top to bottom. The pixel coordinate origin is the upper left corner. For example an image with a 2000 pixel width and 3000 pixel height has the following coordinates: the upper left corner is coordinate (0,0) and the lower right corner is the x and y maximums (2000,3000).

 

However, the image still will import correctly even if the ULY is used for the maximum Y and LRY is used for the minimum Y.

 

Example

This example shows how to import a SID file with the various options.

 

CommandApi.Construct("Import")

CommandApi.Option("GuiEnabled", "False")

CommandApi.Option("AutoConnect", "True")

CommandApi.Option("ClearOptions", "False")

CommandApi.Option("Filter", "shp")

CommandApi.Option("Options", "Scale=4")

CommandApi.Option("Path", "C:/Path/To/Import/file.sid")

CommandApi.Option("PersistOptions", "True")

CommandApi.Do()

 

Used by: Import

 

 

See Also

Automation Model