Reads data from a Device Independent Bitmap (DIB) format file into a variable.
ColorsUsed
Compression
0 | None (no compression) |
1 | Run-length encoded format for bitmaps with 8 bits per pixel |
2 | Run-length encoded format for bitmaps with 4 bits per pixel |
ImageWidth
ImportantColors
XResolution
YResolution
DC_READ_DIB enables you to import DIB images into variables. It handles: 1) opening the file, 2) assigning it a logical unit number (LUN), 3) closing the file when you are finished reading the data, and 4) automatically redimensioning the input variable.
TIP: To read the contents of a DIB file directly into a graphics window without the intermediate step of having the data placed in a variable, use the function WREAD_DIB.
head.gif
contains DIB data that was exported either from PV-WAVE or from another application. To read this data directly into a variable headimg
, enter:
status = DC_READ_DIB('head.gif', headimg, $ Imagewidth=xsize, Imagelength=ysize, Colormap=colors)
xsize
and ysize
. The DIB image colormap is returned in the 2D array variable colors
.