Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

DIALOG_WRITE_IMAGE


Syntax | Return Value | Arguments | Keywords | Version History | See Also

The DIALOG_WRITE_IMAGE function is a graphical user interface used for writing image files. The interface is created as a modal dialog with an optional parent widget.

Syntax

Result = DIALOG_WRITE_IMAGE ( Image [, R, G, B] [, DIALOG_PARENT=widget_id] [, FILE=string] [, /FIX_TYPE] [, /NOWRITE] [, OPTIONS=variable] [, PATH=string] [ ,TITLE=string] [, TYPE=variable] [, /WARN_EXIST] )

Return Value

This routine returns 1 if the "Save" button was clicked, and 0 if the "Cancel" button was clicked.

Arguments

Image

The array to be written to the image file.

R, G, B

These are optional arguments defining the Red, Green, and Blue color tables to be associated with the image array.

Keywords

DIALOG_PARENT

The widget ID of a widget that calls DIALOG_WRITE_IMAGE. When this ID is specified, a death of the caller results in the death of the DIALOG_WRITE_IMAGE dialog. If DIALOG_PARENT is not specified, then the interface is created as a modal, top-level widget.

FILE

Set this keyword to a scalar string that contains the name of the initial file selection. This keyword is useful for specifying a default filename.

FIX_TYPE

When this keyword is set, only files that satisfy the type can be selected. The user has no ability to modify the type.

NOWRITE

Set this keyword to prevent the dialog from writing the file when "Save" is clicked. No data conversions will take place when the save type is chosen.

OPTIONS

Set this keyword to a named variable to contain a structure of the chosen options by the user, including the filename and image type chosen.

PATH

Set this keyword to a string that contains the initial path from which to select files. If this keyword is not set, the current working directory is used.

TITLE

Set this keyword to a scalar string to be used for the dialog title. If it is not specified, the default title is "Save Image File".

Note
You can use language catalogs to internationalize this value with strings in particular languages. For more information, see Using Language Catalogs.

TYPE

Set this keyword to a scalar string containing the format type the "Save as type" field should begin with. The default is "TIFF". The user can modify the type unless the FIX_TYPE keyword is set. Valid values are obtained from the list of supported image types returned from QUERY_IMAGE. The "Save as type" field will reflect the type of the selected file (if one is selected).

WARN_EXIST

Set this keyword to produce a question dialog if the user selects a file that already exists. The default is to quietly overwrite the file.

Version History

Introduced: 5.3

See Also

DIALOG_READ_IMAGE


Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]