SptFromMemIndex(wFileIndex As wTftLibParameter1, bBuffer As bTftLibParameter1, bTransparent As bTftLibParameter2, wAlphaColor As wTftLibParameter2, bOverlay As bTftLibParameter3), Byte
Loads a BMP image from FLASH memory (by index) into a sprite buffer for further processing or later rendering to the TFT display.
When transparent mode is enabled, pixels matching the specified alpha color are skipped, preserving existing pixels already present in the sprite buffer. If an overlay mode is selected, it is applied in accordance with the transparency rule.
wFileIndex - Zero-based index of the BMP file stored in FLASH memory.
bBuffer - Sprite buffer index into which the image data will be loaded.
bTransparent - Specifies whether transparency is enabled:
0 – Normal load (no transparency)
1 – Transparent load (pixels matching wAlphaColor are skipped)
wAlphaColor - Alpha color value used when transparent loading is enabled.
bOverlay - Pixel overlay effect applied during the load operation:
0 – NONE: Direct pixel replacement
1 – OR: Bitwise OR; lightens overlapping areas
2 – AND: Bitwise AND; keeps only common bits
3 – XOR: Bitwise XOR; highlights differences
4 – NAND: Inverted AND; brightens overlap zones
5 – NOR: Inverted OR; produces darker overlays
6 – XNOR: Keeps pixels where both match; strong masking effect
7 – ADD: Adds color values; brightens overlapping regions
8 – SUB: Subtracts color values; darkens overlapping regions
9 – AVG: Averages colors; soft blending effect
10 – SCR: Screen blend (inverse multiply); brightens highlights
11 – MUL: Multiply blend; darkens overlapping areas
12 – CON: Contrast blend; enhances midtones using a non-linear mix
Return:
0 – Operation completed successfully
6 – Invalid buffer index
7 – Buffer size is smaller than the file size
Created with the Personal Edition of HelpNDoc: Leave the tedious WinHelp HLP to CHM conversion process behind with HelpNDoc