Reference Guide > W Routines > WRead_DIB Function (Windows)
  

WRead_DIB Function (Windows)
Loads a Device Independent Bitmap (DIB) from a file into a graphics window.
Usage
status = WRead_DIB( [window_index] )
Input Parameters
window_index — (optional) The index of the window to receive the image. If not specified, the current window is assumed. If no window is currently open, an error results.
Returned Value
status — A value indicating success or failure; expected values are:
*< 0 — Indicates an error.
*0 — Indicates a successful read.
Keywords
Filename — A string containing the name of the DIB (Device Independent Bitmap) file. If not specified, a file named wave.bmp is assumed to be in the current directory.
Interactive — If present and nonzero, open the Import Graphics dialog box. This dialog box lets you interactively select a file to import.
Discussion
Device Independent Bitmap (DIB) is a bitmap format that is useful for transporting graphics and color table information between different devices and applications. DIB files can be produced by graphics applications such as Microsoft Image Editor, Microsoft Paintbrush, and PV‑WAVE.
 
note
This function loads a DIB from a file into a graphics window. To load a DIB directly into a variable, use the function DC_READ_DIB.
Example
Assume that the file map.bmp is a DIB file that was exported from a graphics application. The following command reads the contents of that file directly into the graphics window with index number 2.
status = WREAD_DIB(2, Filename='map.bmp')
See Also
DC_READ_DIB, DC_WRITE_DIB, WWRITE_DIB
The graphics window Control menu includes a command that imports DIB data from a file. For information on the Control menu, see Chapter 3, Getting Started: Windows, in the PV‑WAVE User’s Guide.

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.