TftBmpFromCode(dwBmpAlias As dwTftLibParameter1, wOriginX As wTftLibParameter1, wOriginY As wTftLibParameter2, bTransparent As bTftLibParameter1, wAlphaColor As wTftLibParameter3, bInvert As bTftLibParameter2, bOverlay As bTftLibParameter3)
Description:
Prints a BMP image stored in program (flash) memory to the TFT screen, with optional image processing effects.
dwBmpAlias = Alias name of the BMP image table stored in flash memory
wOriginX = X coordinate of the bottom-left corner on the screen where the image will be drawn
wOriginY = Y coordinate of the bottom-left corner on the screen where the image will be drawn
bTransparent = Transparency mode:
0 = Normal rendering (no transparency)
1 = Transparent rendering (skip pixels matching the alpha color)
wAlphaColor = Alpha color value used when transparency is enabled
bInvert = Color inversion mode:
0 = Normal colors
1 = Invert image colors
bOverlay = Pixel overlay (blending) effect:
0 = NONE - No overlay; direct pixel replacement
1 = OR - Lightens overlapping areas (bitwise OR); merges bright regions
2 = AND - Keeps only common bits; intersection-style effect
3 = XOR - Highlights differences; toggles pixels where colors differ
4 = NAND - Inverts the intersection; brightens overlap zones
5 = NOR - Inverts the union; produces darker overlays
6 = XNOR - Preserves pixels where both values match; strong masking effect
7 = ADD - Adds color values; brightens overlapping regions (light addition)
8 = SUB - Subtracts color values; darkens overlapping regions (shadow-like effect)
9 = AVG - Averages source and destination colors; soft blending effect
10 = SCR - Screen blend (inverse multiply); brightens highlights
11 = MUL - Multiply blend; darkens overlapping areas (similar to Photoshop “Multiply”)
12 = CON - Contrast blend; enhances midtones using a non-linear mix
Notes:
Processing order is: transparency check → color inversion → overlay → final pixel output.
Transparent rendering is slower because each pixel must be evaluated individually, rather than using block-based transfers.
Overlay effects further reduce performance, as they require reading, modifying,and writing each destination pixel.
If the global "TftPixelCheck" flag is enabled, boundary checks are performed:
If the image lies completely outside the visible screen area, it will not be drawn.
If the image is partially outside the visible area, it will be clipped to the screen boundaries before rendering.
Created with the Personal Edition of HelpNDoc: Save time and frustration with HelpNDoc's WinHelp HLP to CHM conversion feature