TftBmpFromSdRaw()

 visits
Parent Previous Next

Syntax

TftBmpFromSdRaw(wX_Pos As Word, wY_Pos As Word, dwStartSector As Dword), Byte

Parameters

Parameter

Description

wX_Pos

X-position for the lower-left corner of the image to print

wY_Pos

Y-position for the lower-left corner of the image to print

dwStartSector

File start sector (zero-based) in the SD card memory

Return value

Value

Meaning

255

No errors detected

Else

Errors detected

Overview

This procedure prints a BMP file directly from an SD card without using a file system. 


It is much faster for displaying images (e.g., buttons, backgrounds) than using an SD card formatted with FAT32.
As a result, menu or button transitions will appear smoother. There is no need to initialize the SD card.

Example

TftBmpFromSdRaw(20,30,8)

Notes

You can convert files using various tools, such as: Online BMP Converter.

Simply select the correct format, upload the file, wait for the conversion, and download the result.

Alternatively, you can use the included library tool, SdCardWriteRGB565, to convert and upload files.

$define Button      8       '0,85,33,8,19,Button.bmp

$define Dog         20      '1,320,240,20,320,Dog.jpg

$define Cat         321     '2,320,240,321,621,Cat.jpg

TftSetUp(0, 0)

TftBmpFromSdRaw(0,0,Cat)

DelayMS 1000

TftBmpFromSdRaw(0,0,Dog)

DelayMS 1000

TftBmpFromSdRaw(73,85,Button)

TftBmpFromSdRaw(130,165,Button)

Created with the Personal Edition of HelpNDoc: Free EPub and documentation generator