You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.
Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.
`Store current bitmap so it can be restored
currentBitmap = Current Bitmap()
`Get a free bitmap if it exists.
For i = 1 to 31
If Bitmap Exist(i) = 0 then bitmapNum = i
`Create a new bitmap width of the image you want to create (to be efficient)
Create Bitmap bitmapNum, 512, 512
`Set the current bitmap to your new bitmap. 2D drawing and image/sprite pasting will draw to this instead of the screen.
Set Current Bitmap bitmapNum
`******DRAW THE IMAGE CONTENTS HERE - Or call a function to do it.******
`Put the bitmap contents into an image
imageNum = 100
Get Image imageNum, 0, 0, 512, 512, 3
`Set the current bitmap to back to what it was previously (probably the screen)
Set Current Bitmap currentBitmap
`Delete the bitmap we created since it is nolonger needed
Delete Bitmap bitmapNum
Login to post a reply