-
Notifications
You must be signed in to change notification settings - Fork 0
Image Support
Kristian Virtanen edited this page Jan 11, 2026
·
1 revision
Load BMP images as shapes that can be moved, rotated, and scaled.
id$ = LOADIMAGE("filepath.bmp")Parameters:
-
filepath- Path to BMP image file (relative or absolute)
Returns:
- Shape ID string (use with MOVESHAPE, ROTATESHAPE, etc.)
SCREEN 12, 640, 480, "Image Demo"
REM Load image
DIM sprite$
LET sprite$ = LOADIMAGE("player.bmp")
REM Position and transform
MOVESHAPE sprite$, 320, 240
ROTATESHAPE sprite$, 45
SCALESHAPE sprite$, 2.0
REM Draw
SCREENLOCK ON
CLS
DRAWSHAPE sprite$
SCREENLOCK OFF
SLEEP 3000
REM Cleanup when done
REMOVESHAPE sprite$Once loaded, images work exactly like other shapes:
DIM img$
LET img$ = LOADIMAGE("logo.bmp")
MOVESHAPE img$, x, y ' Position
ROTATESHAPE img$, angle ' Rotate (degrees)
SCALESHAPE img$, scale ' Scale (1.0 = original size)
SHOWSHAPE img$ ' Make visible
HIDESHAPE img$ ' Make invisible
DRAWSHAPE img$ ' Render to screen
REMOVESHAPE img$ ' Delete and free memoryTo create a test BMP for the demo:
- Open Paint
- Create image (e.g., 64x64 pixels)
- Draw something
- File → Save As → BMP Picture
- Save as "test.bmp" in your BazzBasic directory
- Create new image (64x64)
- Draw content
- File → Export As
- Choose "Windows BMP image"
- Save as "test.bmp"
- BMP only: Currently only supports .BMP files (uncompressed)
- No transparency: BMP format doesn't support alpha channel
- Memory: Images consume more memory than primitive shapes
- Color depth: 24-bit BMP recommended
Planned:
- PNG support (with transparency)
- JPG support
- Sprite sheets