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_XBM, 'your.xbm', image
; Write a 2D byte array to an XBM file.
See Also
IMAGE_CREATE
,
IMAGE_READ
,
IMAGE_WRITE
,
READ_XBM
doc@boulder.vni.com
Copyright © 1999, Visual Numerics, Inc. All rights reserved.