Directives
SAVE FILE Save Bitmap to Disk
   
Format SAVE FILE (chan[,ERR=stmtref]) TO filename$
 
Where:
chan Channel or logical file number to be read from.
filename A valid filename with a .bmp extension
stmtref Program line number or statement label to which to transfer control.
TO Mandatory keyword, not case-sensitive.
   
Description Use the SAVE FILE directive to save an image written to *BITMAP* (virtual file)
directly to a bitmap file (.bmp) file on disk.


*Note* This capability is for Windows only. The bitmap chan can be a WindX-connected file if the pathname contains a "[WDX]" prefix. Also, if the pathname contains "[WDX]" then the chan must be a WindX file


Example In the code below, *BITMAP* is used to capture ProvideX internal bitmaps, which are then saved to .bmp files using SAVE FILE:

0010 PicList$='picture'(*)+","
0020 x=pos(","=PicList$); if x=0 then stop
0030 f$=PicList$(1,x-1),PicList$=PicList$(x+1)
0040 open (1)"*bitmap*;Width=1;Length=1"
0050 print (1)'picture'(0,0,@x(mxc(1)+1),@y(mxl(1)+1),"!"+f$,4),
0060 f$="/tmp/"+f$+".bmp"; erase f$,err=*proceed
0070 save file (1) to f$
0080 close (1)
0090 goto 0020

See Also *BITMAP* Virtual Bitmap