Download any Picture with Letters from FreePik.com
2Gimp:Crop Letters as Picture
For every Letter:
1. Cut the Letter with Rect Select Tool
2. Copy Selected Area (Ctrl +C)
3. Paste as new Picture (Shift+Ctrl+V)
4. Image-> Crop To Content (You can add a shortcut in Preferences->Surface->Shortcuts, as Example Ctrl+Shift+B)
5. Save as Example "A.xcf" (Ctrl+S)
3Gimp: Install Davids Batch Processor Plugin
1 Input: Add all XCF Files
2 Output as BMP
4Explorer: Find heighest and Widest Pixels
1. Open Folder in Explorer and Show Headers width and Height in Explorer.
2. Now look ordered as width and height to max width and height
3. Maybe edit Letters, very Big "W"
5Gimp: Resize all Letters without cutting edges to same Size
1. Add BMPs from Folder in Batch Processor
2. Go To Resize, Enable, absolute Centered with Padding Background Black
3. Resize to Width and Height from heighest and Widest Letter.
6IrfanView: Rename Files To "P#"
1. Open IrfanView Batch Renaming
2. Rename Pictures ordered alphabetical to P#
3. Convert Picture to Bin or/and Hex File
To Find the data for every Letter its a Simple trick. As Example The Letter "A" is first Char in Image.bin and has 100x100 Pixel (100x100x3 Pixels), 'B' starts behind 'A' with startpoint Byte 30000 etc.
We start with 'A' on byte 0, The ascii Code of 'A' is 61.
int asciicode = (int) 'A';
uint32_t charpos = (String.charAt(X) - (int)61) * width * height * 3);
In this case the Startpoint of (int) 'B'-61=1 * 100*100*3 (30000) or (int) 'C'-61=2 * 100*100*3 (60000)
Send letter to Display with TFT_espi:
tft.setWindow(x, y, x + width - 1, y + height - 1); uint32_t charpos = (String.charAt(X) - (int)61) * width * height * 3); int startbyte*= binarray+charpos; vspi->writeBytes((uint8_t*)binarray, width * height * 3);