What this converter does
Three separate things happen in order, and it helps to keep them apart. First the image is fitted to the panel resolution and tone-adjusted. Then every pixel is mapped to the nearest color in the selected palette, optionally with error diffusion. Finally the palette indices are packed into a binary buffer you can drop into firmware.
All of it runs locally. There is no upload queue, no account, and no per-image limit beyond what your browser can hold in memory.
Palettes: what each option actually is
| Option | What it contains | When to use it |
|---|---|---|
| 4-color · BWRY | Generic black, white, red, yellow reference values | Quick composition check for common 4-color panels |
| 6-color · Spectra 6 (often written E6) | Reference approximations of a six-color photo panel | Draft layouts before you have a measured profile |
| 8-color · illustrative | Eight spread colors, explicitly not device-certified | Palette experiments; never as a production target |
| Imported device profile | Your JSON: native color codes plus measured sRGB values | Anything that ships — this is the only accurate mode |
The first three are convenience presets. A measured profile is the only one that can produce a defensible result, because it separates the panel’s native color code from the sRGB value you measured under a stated light source.
Export formats
| Output | Contents | Packing |
|---|---|---|
| PNG | Preview using reference RGB values | — |
| RAW8 (.bin) | One palette index per pixel | Row-major, one byte per pixel |
| RAW4 (.bin) | Two palette indices per byte | Row-major, first pixel in the high nibble, no row padding |
| JSON | Palette, method, dimensions, histogram | Metadata for reproducing the run |
The RAW4 convention is the one that trips people up: a five-pixel-wide image is not padded to whole bytes per row. The indices 0 1 2 3 4 / 5 0 1 2 3 pack to 01 23 45 01 23, with 0x45 straddling the row boundary. A driver that expects byte-aligned rows needs a different layout, and you have to decide that before writing the transfer code.
Frame sizes for common panels
| Panel | Resolution | Pixels | RAW4 | RAW8 |
|---|---|---|---|---|
| 1.54 in | 200 × 200 | 40,000 | 20,000 B | 40,000 B |
| 2.13 in (current) | 250 × 122 | 30,500 | 15,250 B | 30,500 B |
| 2.13 in (legacy) | 212 × 104 | 22,048 | 11,024 B | 22,048 B |
| 2.9 in | 296 × 128 | 37,888 | 18,944 B | 37,888 B |
| 4.2 in | 400 × 300 | 120,000 | 60,000 B | 120,000 B |
| 5.83 in | 648 × 480 | 311,040 | 155,520 B | 311,040 B |
| 7.5 in | 800 × 480 | 384,000 | 192,000 B | 384,000 B |
| 13.3 in | 1600 × 1200 | 1,920,000 | 960,000 B | 1,920,000 B |
The last column is usually the surprise: a 13.3-inch frame needs 1.92 MB in RAW8, which decides whether you buffer in PSRAM or stream in strips. See the full e-paper pipeline guide for the transfer side of the same budget.
How to use it
- Choose the palette. Start with 6-color if you are exploring; switch to an imported profile before anything ships.
- Set fit and tone. Crop to the real panel aspect ratio rather than stretching, and adjust brightness before dithering — the order changes the result.
- Pick a dithering method. Nearest-color with edge protection for text and UI, Floyd–Steinberg for photos, Bayer 4×4 when you need a repeatable pattern.
- Compare the preview, then export. Check the histogram, download RAW4 or RAW8 plus the JSON record, and keep the JSON with the build so the run can be reproduced.
Limits worth knowing before you ship
- The preview uses light-emitting RGB values; a reflective panel under room light will not match it.
- Exported indices are palette positions, not controller-native color codes.
- Row stride, rotation, bit order and inversion are driver concerns — this tool does not apply them.
- The eight-color preset is illustrative and must not be treated as a device profile.
- Only PNG, JPEG and WebP up to 20 MB are accepted; HEIC from an iPhone needs converting first.
Reproducible RAW4 packing test
For 800 × 540 pixels, a continuous RAW4 buffer is 216,000 bytes, but neither its four-bit palette values nor its packing order is universal across panel controllers. Use a corner-pixel pattern and a checkerboard before attempting full photographs. Validate native index mapping, rotation, row stride and waveform selection separately.
Choosing a test image and reporting evidence
Compare nearest-color, Floyd–Steinberg, Atkinson and Bayer 4×4 using the same source dimensions, palette and tone settings. Test gradients, saturated blocks and small black text. Reference-color browser output must not be described as measured reflective-panel color. For measured-profile testing, record instrument, illuminant, panel model, temperature and waveform revision.
Frequently asked questions
Is the image uploaded to a server?
No. The file is read with the browser File API, decoded on a canvas and quantized inside a Web Worker. Nothing is sent over the network, and the page works offline once loaded.
What is the difference between RAW4 and RAW8?
RAW8 stores one palette index per pixel, so an 800 × 480 frame is 384,000 bytes. RAW4 packs two indices into one byte, high nibble first, row by row without padding, so the same frame is 192,000 bytes. Neither file includes row alignment, rotation or a controller command set.
Can I use this for a 7-color panel?
Not by picking a menu item. The built-in 8-color set is illustrative, not a certified device profile. For a real panel, import a JSON profile that maps your measured sRGB values to the controller’s native color codes, then quantize against that profile.
Why do the colors look different on the panel than in the preview?
The preview draws light-emitting RGB pixels. E-paper reflects ambient light, and the final color depends on the panel, waveform, temperature and viewing light. Treat the preview as a composition check, and measure the panel if color accuracy matters.
Which dithering method should I choose?
For text and UI screenshots, nearest-color with edge protection keeps glyphs crisp. For photographs, Floyd–Steinberg usually preserves gradients best; Atkinson gives a lighter, grainier look; Bayer 4×4 produces a stable pattern that survives repeated refreshes predictably.
Does the exported RAW file work directly with my display controller?
Usually not as-is. Controllers differ in native palette codes, row stride, bit order, rotation and required command sequences. Use the export as a verified pixel buffer, then apply your driver’s mapping in firmware.
What is the file size limit?
PNG, JPEG and WebP up to 20 MB, and the decoded frame is capped so the browser does not run out of memory. Very large photos should be cropped or resized before conversion.
Related reading
- RAW4 byte-level verification guide — the odd-width test vector and where drivers disagree
- Why SPI transport is not panel refresh — where the seconds actually go
- The e-paper pipeline, end to end — image, transfer, refresh and acceptance tests
- M5Stack PaperDIY review — a 4.7-inch kit with published schematics
- E-paper names decoded — E6, SSD1680 and UC8151, and how to find your own module
Reference projects: EPD Optimize · DITHR · E Ink technology overview.