TftBmpFromSdRaw(wX_Pos As Word, wY_Pos As Word, dwStartSector As Dword), Byte
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
dwFileStartSector = File start sector (zero-based) in the SD card memory
Result Byte:
255 = No errors detected
Else = Errors detected
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:
• The BMP file must be:
• Smaller than the screen’s width and height
• 16-bit RGB (565) color depth
• Stored with bottom-to-top row direction (default)
• Not compressed
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) 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: Single source CHM, PDF, DOC and HTML Help creation