LoadGraphic

=LoadGraphic= toc

A graphic image can be loaded simply and directly into a graphic object and rendered. See also LoadImage and DrawImage and Graphic Statement.

Syntax
LOADGRAPHIC #handle, path$ //- Load an image file from path$ and make a graphic object #handle//

Methods
Images loaded with **LoadGraphic** have the same methods as graphics created with the Graphic statement. You can draw objects and text onto the loaded graphic, retrieve its dimensions and do other things. See Graphic for examples of all graphic methods.

code format="html4strict" loadgraphic #pic,"public\programmingbanner.JPG" render #pic code

LoadGraphic drawing example from the Run BASIC helpfile:

code format="vbnet" 'Now we can also draw on the graphic object. 'Here is a quick example:

loadgraphic #picture, "polandboating.jpg" howTall = #picture height #picture color("white") title$ = "Boating in Poland, 2007" xPosition = (#picture width - #picture stringwidth(title$)) / 2 #picture place(xPosition, howTall - 14) #picture "\";title$ render #picture code