WRITE_XBM Procedure
Writes an image to an X-bitmap (XBM) file.
Usage
WRITE_XBM, file, image
Input Parameters
file — A scalar string giving the filename of the XBM image.
image — The variable containing the input image.
Keywords
None.
Discussion
Since XBM is a monochrome (2-color) format, the input image is forced into 2 colors, if it is not already. Any extra colors are re-mapped using the median point between the minimum and maximum color values; anything less than the median value is converted to 0 (background), while the median and higher values are converted to 1 (black).
Example
image = BYTE(DIST(100))
; Write a 2D byte array to an XBM file.
WRITE_XBM, 'write_xbm_ex1.xbm', image
See Also