LOADBMP
Jump to navigation
Jump to search
![]() |
![]() |
![]() |
![]() |
Description
- Retrieves a bitmap image stored on disk as "filename.bmp" and places it in memory. The program may then use the image by calling on its alias, "name".
Syntax
- loadbmp "name", "filename.bmp"
Hints
- When moving bitmaps to and from the disk, both the "name" and "filename.bmp" are required for reference.
- When displaying the images within the program, refer to the "name" only. For this reason, when possible, choose a name that represents the image (such as "copyimage") so the code will be easier to follow.
These commands are generally used when working with bitmaps:
Example
'Run this example from the main JustBASIC program folder so 'the bmp\subfolder and bmp image are accessible. loadbmp "copyimage", "bmp\copy.bmp" open "Loadbmp Test" for graphics as #main #main "trapclose [quit]" print #main, "drawbmp copyimage 10 10; flush" wait [quit] unloadbmp "copyimage" close #main end
Useful Procedures
' Place a useful function or sub using this keyword here