The WRITE_IMAGE procedure writes an image and its color table vectors, if any, to a file of a specified type. WRITE_IMAGE can write most types of image files supported by IDL.
WRITE_IMAGE, Filename, Format, Data [, Red, Green, Blue] [, /APPEND]
A scalar string containing the name of the file to write.
A scalar string containing the name of the file format to write. The following are the supported formats:
An IDL variable containing the image data to write to the file.
Note: If the output format is "TIFF", and the Data argument is not type byte, then the TIFF file will be automatically written using that data type. For example if Data is IDL type integer, then the TIFF file will be written as signed 16-bit pixels. To force the data to be written as bytes, use the BYTSCL function on your data before calling WRITE_IMAGE.
An optional vector containing the red channel of the color table if a colortable exists.
An optional vector containing the green channel of the color table if a colortable exists.
An optional vector containing the blue channel of the color table if a colortable exists.
Set this keyword to force the image to be appended to the file instead of overwriting the file. APPEND may be used with image formats that supports multiple images per file and is ignored for formats that support only a single image per file.
|Change TIFF behavior to write out the data using the appropriate data type.