TftBmpFromSdOver()

Parent Previous Next

TftBmpFromSdOver(sFileName As sStringParameter1, wX_Pos As wTftLibParameter2, wY_Pos As wTftLibParameter3, bTransparent As bTftLibParameter1, wAlphaColor As wTftLibParameter4, bInvert As bTftLibParameter2, bOverlay As bTftLibParameter3), Byte


Draws a BMP image from an SD card to the display, optionally applying transparency, color inversion, and pixel overlay effects.


sFileName – BMP file name (8.3 format), maximum 12 characters including the dot and extension.

wX_Pos – X coordinate of the image’s lower-left corner.

wY_Pos – Y coordinate of the image’s lower-left corner.

bTransparent – Transparency mode:

0 – Normal drawing (no transparency)

1 – Transparent drawing (skip pixels matching the alpha color)

wAlphaColor – Alpha-key color used when transparency is enabled.

bInvert – Color inversion:

0 – Normal colors

1 – Invert image colors

bOverlay – Pixel overlay mode:

0 – NONE Direct pixel replacement

1 – OR Lightens overlapping areas (bitwise OR)

2 – AND Keeps only common bits

3 – XOR Highlights differences

4 – NAND Inverted intersection

5 – NOR Inverted union

6 – XNOR Keeps matching pixels unchanged

7 – ADD Adds color values (brightening effect)

8 – SUB Subtracts color values (darkening effect)

9 – AVG Averages source and destination colors

10 – SCR Screen blend (inverse multiply)

11 – MUL Multiply blend (darkens overlaps)

12 – CON Contrast-enhancing blend


Return:

0 – Success

1 – No response from SD card

2 – Card not formatted as FAT16 or FAT32

3 – File not found

4 – File already in use

5 – Read/write error

99 – Image exceeds screen boundaries


Notes:

Effect processing order: Transparency → Color Inversion → Overlay → Draw


Transparent drawing is slower because pixels are processed individually instead of using block transfers.

Overlay effects are slower because each destination pixel must be read and written.


If the global TftPixelCheck flag is enabled:

Images completely outside the visible area are not drawn.

Partially visible images are clipped to screen boundaries.


For maximum performance without effects, use TftBmpFromSd(), which is significantly faster.

Created with the Personal Edition of HelpNDoc: Import and export Markdown documents