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.
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] )
This routine returns 1 if the "Save" button was clicked, and 0 if the "Cancel" button was clicked.
The array to be written to the image file.
These are optional arguments defining the Red, Green, and Blue color tables to be associated with the image array.
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.
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.
When this keyword is set, only files that satisfy the type can be selected. The user has no ability to modify the type.
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.
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.
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.
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".
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).
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.