|
3 | 3 | A browser-based pixel editor that exports Arduino-ready C++ code. Create pixel art and get optimized code for: |
4 | 4 |
|
5 | 5 | - **1-bit packed bytes** for SSD1306 OLED displays (Adafruit_GFX drawBitmap) |
6 | | -- **RGB565 16-bit values** for color TFT displays (ILI9341/ST7735/etc.) |
| 6 | +- **RGB565 16-bit values** for color TFT displays (ST7735/ILI9341/etc.) |
| 7 | +- **RGB24 24-bit values** for ESP32/high-memory color displays |
| 8 | +- **RGB332 8-bit values** for low-memory color displays (SSD1331) |
| 9 | +- **4-bit grayscale** for e-ink/EPD displays with 16 gray levels |
7 | 10 |
|
8 | 11 | ## Features |
9 | 12 |
|
@@ -32,23 +35,42 @@ A browser-based pixel editor that exports Arduino-ready C++ code. Create pixel a |
32 | 35 | ## Usage |
33 | 36 |
|
34 | 37 | 1. **Set canvas size** - Choose dimensions suitable for your display |
35 | | -2. **Select mode** - 1-bit for OLED, RGB565 for color TFT |
| 38 | +2. **Select format** - Choose from 1-bit OLED, RGB565 TFT, RGB24, RGB332, or 4-bit grayscale |
36 | 39 | 3. **Draw your sprite** - Use pen, erase, fill, or eyedropper tools |
37 | | -4. **Export** - Click "Export .h" to download Arduino-ready header file |
38 | | -5. **Test** - Run built-in tests to validate packing logic |
| 40 | +4. **Generate code** - Click "Generate Code" to see complete Arduino setup |
| 41 | +5. **Export** - Click "Export .h" to download Arduino-ready header file |
| 42 | +6. **Test** - Run built-in tests to validate all format conversions |
39 | 43 |
|
40 | 44 | ## Export Formats |
41 | 45 |
|
42 | | -### 1-bit (OLED/SSD1306) |
| 46 | +### 1-bit (SSD1306 OLED) |
43 | 47 | ```cpp |
44 | 48 | const uint8_t sprite_bits[] PROGMEM = { 0xAA, 0x55, ... }; |
45 | 49 | display.drawBitmap(x, y, sprite_bits, width, height, 1); |
46 | 50 | ``` |
47 | 51 |
|
48 | | -### RGB565 (TFT/ILI9341) |
| 52 | +### RGB565 (ST7735/ILI9341 TFT) |
49 | 53 | ```cpp |
50 | 54 | const uint16_t sprite_pixels[] PROGMEM = { 0xF800, 0x07E0, ... }; |
51 | | -// Use with tft.setAddrWindow() and tft.writePixel() |
| 55 | +// Complete setup with tft.setAddrWindow() and fast pixel writing |
| 56 | +``` |
| 57 | + |
| 58 | +### RGB24 (ESP32/High Memory) |
| 59 | +```cpp |
| 60 | +const uint8_t sprite_pixels[] PROGMEM = { 0xFF, 0x00, 0x00, ... }; |
| 61 | +// Full 24-bit color for high-quality displays |
| 62 | +``` |
| 63 | +
|
| 64 | +### RGB332 (SSD1331/Low Memory) |
| 65 | +```cpp |
| 66 | +const uint8_t sprite_pixels[] PROGMEM = { 0xE0, 0x1C, 0x03, ... }; |
| 67 | +// 8-bit color (3-3-2 bits for R-G-B) |
| 68 | +``` |
| 69 | + |
| 70 | +### 4-bit Grayscale (E-ink/EPD) |
| 71 | +```cpp |
| 72 | +const uint8_t sprite_pixels[] PROGMEM = { 0x0F, 0xA5, ... }; |
| 73 | +// 16 grayscale levels, 2 pixels per byte |
52 | 74 | ``` |
53 | 75 |
|
54 | 76 | ## Development |
|
0 commit comments