IMAGE
Commands for loading and saving images on an attached LCD display panel. Images can be used to display logos, backgrounds, or save screenshots.
Loading Images
LOAD IMAGE filename$ [, StartX, StartY]
Loads an image from the Flash Filesystem or SD Card for display on an attached LCD display panel. This can be used to draw a logo or add a background on the display.
Parameters:
filename$: The image file to load (file extension is optional - .BMP will be added if not specified)StartX: (Optional) X-coordinate of the top left corner where the image will be displayed (defaults to 0)StartY: (Optional) Y-coordinate of the top left corner where the image will be displayed (defaults to 0)
Supported Formats: The image must be in BMP format. All types of BMP formats are supported including black and white and true colour 24-bit images.
Example:
LOAD IMAGE "logo.bmp", 10, 20
Cross-reference: See LOAD JPG for loading JPG format images.
LOAD JPG filename$ [, StartX, StartY]
Loads a JPG image from the Flash Filesystem or SD Card for display on an attached LCD display panel. This can be used to display photographs or high-quality compressed images.
Parameters:
filename$: The JPG image file to load (file extension is optional - .JPG will be added if not specified)StartX: (Optional) X-coordinate of the top left corner where the image will be displayed (defaults to 0)StartY: (Optional) Y-coordinate of the top left corner where the image will be displayed (defaults to 0)
Supported Formats: All types of JPG formats are supported including black and white and true colour 24-bit images.
Example:
LOAD JPG "photo.jpg", 0, 0
Cross-reference: See LOAD IMAGE for loading BMP format images.
Saving Images
SAVE IMAGE filename$ [, StartX, StartY, width, height]
Saves the current image on the LCD screen to a file as a 24-bit true colour BMP file.
Parameters:
filename$: The filename to save to (file extension is optional - .BMP will be added if not specified)StartX: (Optional) X-coordinate of the top left corner of the area to save (defaults to 0)StartY: (Optional) Y-coordinate of the top left corner of the area to save (defaults to 0)width: (Optional) Width of the area to save in pixels (defaults to full screen width)height: (Optional) Height of the area to save in pixels (defaults to full screen height)
Notes:
- The image is saved as a 24-bit true colour BMP file
- If no area parameters are specified, the entire screen will be saved
- Note that 'width', if used, must be a multiple of 2
Example:
SAVE IMAGE "screenshot.bmp"
SAVE IMAGE "partial.bmp", 10, 20, 100, 80
Cross-reference: See SAVE COMPRESSED IMAGE for saving with RLE compression.
SAVE COMPRESSED IMAGE filename$ [, StartX, StartY, width, height]
Saves the current image on the LCD screen to a file as a compressed 24-bit true colour BMP file using RLE compression to reduce file size.
Parameters:
filename$: The filename to save to (file extension is optional - .BMP will be added if not specified)StartX: (Optional) X-coordinate of the top left corner of the area to save (defaults to 0)StartY: (Optional) Y-coordinate of the top left corner of the area to save (defaults to 0)width: (Optional) Width of the area to save in pixels (defaults to full screen width)height: (Optional) Height of the area to save in pixels (defaults to full screen height)
Notes:
- The image is saved as a 24-bit true colour BMP file with RLE (Run-Length Encoding) compression
- RLE compression reduces file size for images with areas of solid colour
- If no area parameters are specified, the entire screen will be saved
- Note that 'width', if used, must be a multiple of 2
Example:
SAVE COMPRESSED IMAGE "compressed.bmp"
SAVE COMPRESSED IMAGE "partial_compressed.bmp", 0, 0, 320, 100
Cross-reference: See SAVE IMAGE for saving without compression.