Reference Guide > W Routines > WWrite_DIB Function (Windows)
  

WWrite_DIB Function (Windows)
Saves the contents of a graphics window to a file as a Device Independent Bitmap (DIB).
Usage
status = WWrite_DIB( [window_index] )
Input Parameters
window_index — (optional) The index of the window from which the image is to be saved. If not specified, the current window is assumed.
Returned Value
status — A value indicating success or failure of the write; expected values are:
*< 0 — Indicates an error.
*0 — Indicates a successful write.
Keywords
Filename — A string containing the name of the output DIB file. If not specified, a file named wave.bmp is created in the current directory.
Interactive — If present and nonzero, open the Import Graphics dialog box. This dialog box lets you interactively create or select an export file.
Discussion
This function saves the contents of a graphics window to a DIB format file. To export the contents of a variable to a DIB file, use the DC_WRITE_DIB function.
Example
The following commands demonstrate how to export the contents of graphics window 2 to a DIB file:
; Create a window and display graphics in it.
WINDOW, 2
SHADE_SURF, DIST(40)
; Save the contents of the window directly in a DIB format file.
status = WWRITE_DIB(2, Filename='image.bmp')
See Also
DC_READ_DIB, DC_WRITE_DIB, WREAD_DIB
The graphics window Control menu includes a command that exports DIB graphics to a file. For information on the Control menu, see the PV‑WAVE User’s Guide.

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