TftBmpScreenshotMem1()

Library Description ›› Memory ››
Parent Previous Next

TftBmpScreenshotMem1(sFileName As String * 12, wX_Pos As Word, wY_Pos As Word, wWidth As Word, wHeight As Word), Word


sFileName: The name of the BMP file to create on the SD card, including the extension. Must be 12 characters or fewer, including the dot and file extension.

wX_Pos: The x-coordinate of the lower-left corner of the screenshot area.

wY_Pos: The y-coordinate of the lower-left corner of the screenshot area.

wWidth: The width of the screenshot area.

wHeight: The height of the screenshot area.


Result: Transfer status

• 0xFFFF = Memory write error

• Else = File index in memory


Captures a screenshot using bi-directional SDA Pin and saves it as a BMP file to flash memory.


Example:

TftBmpScreenshotMem1("PIC001.BMP", 0,0, 320,240)


Note: 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.


Multiple files can share the same name. However, the TftBmpFromMemName() function will only return the first occurrence of a file with the specified name. To ensure the correct file is displayed, it is recommended to use the file memory index with TftBmpFromMemIndex() instead.


Note: For TFT screens using SPI transfer lines, not all have separate MISO (Master In Slave Out) and MOSI (Master Out Slave In) lines. Some screens use a single bi-directional SDA (Serial Data) line for both input and output. In such cases, you must use the dedicated bi-directional SDA line functions provided in the library to read data from the screen.





Created with the Personal Edition of HelpNDoc: Free Web Help generator