Futurebasic/Language/Reference/usr imagefiletopict

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Syntax[edit | edit source]

USR IMAGEFILETOPICT

Revised[edit | edit source]

June 2001 (Release 5)

Description[edit | edit source]

Use this simple function to read the contents of a graphic image from the disk and convert it into a picture handle. When you are finished with the handle, you will need to dispose of it using KILL PICTURE. INCLUDE "Subs Image Files.Incl"

 WINDOW 1
 pHndl = USR IMAGEFILETOPICT(fName$,vRef%)
 LONG IF pHndl

PICTURE (0,0), pHndl KILL PICTURE pHndl

 XELSE

PRINT "Could not convert image file."

 END IF END IF DO
 HANDLEEVENTS

UNTIL 0 Note: Before you can use this function, you must include it in your project with the following statement: include "Subs Image Files.Incl

See Also[edit | edit source]

USR CONVERTIMAGEFILE, USR SAVEIMAGEFILEASPICT