TftBmpSdToMem()

Library Description ›› Memory ››
Parent Previous Next

TftBmpSdToMem(sFileName As String * 12), Byte 


sFileName: File name of the image to transfer


Result Byte: Transfer status

• 0 = No error

• 1 = No response from the card

• 2 = Card not formatted with FAT16 or FAT32

• 3 = File not found

• 4 = File is in use

• 5 = Read/Write error

• 6 = Memory read/write error

• 7 = Exceeded memory size


This command transfers a BMP file from an SD card with a FAT16 or FAT32 file system to memory using a simplified sequential file system. 


The file name should be 12 characters or fewer, including the dot and file extension.


Files are written sequentially, and the file names are managed through a rudimentary file system. Note that files cannot be deleted individually—only new files can be added. If you want to erase the entire memory, use the TftBmpMemFormat() function, which must be executed the first time you use the FLASH memory or any time you want to completely erase it.


Example:

TftBmpSdToMem("PIC001.BMP")


Important Notes:

• The BMP file should:

• Be smaller than the screen’s width and height

• Have a 16-bit RGB (565) color depth

• Have a row direction from bottom to top (default)

• Not be compressed


You can use various tools to convert the file format, such as: 

Online BMP Converter: https://online-converting.com/image/convert2bmp/#

Select the correct format, then upload the files, wait for the conversion, and download the converted file.


Alternatively, you can use the included library tool SdCardWriteRGB565 to convert the image.






Created with the Personal Edition of HelpNDoc: Effortlessly create a professional-quality documentation website with HelpNDoc