Writes an image variable to a file.
image An associative array in image format.
0 | Indicates an error, such as an invalid input array. An informational message describing the error is also output to the screen. |
0 | Indicates a successful write. |
File_type A string specifying an image file type. See the Discussion section for a list of valid image file types.
Order If nonzero, the image is mirrored in the y-axis direction before being written to the file. (Default: The bottom of the image is stored at array index 0, per the PV-WAVE convention.)
Overwrite If the specified file already exists, overwrite it.
Quality Sets the quality level of JPEG compression. (Default: 100)
Quiet Suppresses successive levels of error messages, depending on the value set. This keyword accepts the same integer values used with the system variable !Quiet.
Verbose If nonzero, information about the written image is displayed.
NOTE: When bilevel or grayscale TIFF images with no colormap data are written to files, a color map is created and the pixel values are mapped into the colormap. You can recover the original values when the TIFF file is read back into PV-WAVE by using either IMAGE_READ with the Unmap keyword or using DC_READ_TIFF.
NOTE: The input parameter, image, must be created with either the IMAGE_READ or IMAGE_CREATE routine.
Use the value of the File_Type keyword.
Use the suffix given as part of the filename given in the filename parameter. The suffix will be recognized if it is for one of the supported file types.
Use the file type specified in the file_type key of the image associative array.
Use the suffix given in the file_name key of the image associative array.
If the filename parameter is a null string, the filename is taken from the file_name key of the image associative array. In this case, the filename suffix will be changed to match the file type as determined by the rules of precedence above.
TIP: You can use the File_Type keyword to convert image files from one format to another. For example, if you read aJPEG
file, you can convert it to a Sun Rasterfile by writing it with the following command:
status = IMAGE_WRITE('', image, File_Type = 'SUN')
picture.jpeg
, this command will write a file picture.sun
. Available compression algorithms include:
Supported Image File Types | Compression Algorithm |
---|---|
BMP, PCX | RLE |
JPEG | JPEG |
TIFF (bilevel only) | Packbits |
NOTE: LZW compressionGIF
andTIFF
files is a proprietary format and is not available.