DitherInk

3.7" e-paper image converter

3.7-inch e-paper panels come in 2 resolutions: 480×280 and 416×240. They are available as black & white, 4-level grayscale. Pick the resolution and colors that match your panel, upload a photo and DitherInk will crop it, dither it with its tuned Atkinson algorithm and give you a file your firmware can use directly.

3.7" 480×280

Native resolution480 × 280 (134,400 pixels, 12:7)
Portrait image size280 × 480
Landscape image size480 × 280
ColorsBuffer format.bin size
Black & Whitemono_1bpp16,800 bytes (16.4 KB)
4-level Grayscalegray_2bpp33,600 bytes (32.8 KB)

Convert an image for 3.7" 480×280 →

3.7" 416×240

Native resolution416 × 240 (99,840 pixels, 26:15)
Portrait image size240 × 416
Landscape image size416 × 240
ColorsBuffer format.bin size
Black & Whitemono_1bpp12,480 bytes (12.2 KB)
4-level Grayscalegray_2bpp24,960 bytes (24.4 KB)

Convert an image for 3.7" 416×240 →

Portrait or landscape?

The panel always receives its buffer in its native 480×280 layout. If your frame stands upright, choose Portrait: you crop a 280×480 image and DitherInk rotates the buffer 90° counterclockwise before writing the file. If your driver expects a different rotation, change it under Advanced output options.

Which file should I download?

  • .h: a C array you can #include in an Arduino or ESP-IDF project. Easiest for a single fixed image.
  • .bin: the raw frame buffer. Store it on an SD card or in flash and stream it to the panel. Best when images change.
  • .png: an indexed PNG whose pixel values are the color codes. Handy for Python on a Raspberry Pi.
  • .bmp: an indexed bitmap for photo frames and tools that read BMP files.
Ad

Tips for black & white

High-contrast images, line art and text work best. For photos, Auto mode lifts the shadows a little so dark areas do not collapse into solid black.

Example code (480×280, Black & White)

Arduino / ESP-IDF with the .h file

#include "my_image.h"  // downloaded from DitherInk

// MY_IMAGE_WIDTH x MY_IMAGE_HEIGHT = 480 x 280, mono_1bpp
// Color codes: black=0, white=1
// The buffer is already in the panel's native orientation.

void showImage() {
  epd_write_frame(my_image, MY_IMAGE_SIZE);  // your driver's full-frame write
  epd_refresh();
}

Replace epd_write_frame and epd_refresh with the functions your display driver provides. Most drivers have a function that takes a full frame buffer.

ESP32 loading the .bin file from flash

#include <LittleFS.h>

constexpr size_t FRAME_BYTES = 16800;
static uint8_t frame[FRAME_BYTES];

bool loadFrame(const char* path) {
  File f = LittleFS.open(path, "r");
  if (!f || f.size() != FRAME_BYTES) return false;  // wrong size = wrong panel settings
  f.read(frame, FRAME_BYTES);
  f.close();
  return true;
}

Python (Raspberry Pi) reading the .bin file

import numpy as np

data = np.fromfile("my_image.bin", dtype=np.uint8)
assert data.size == 16800
bits = np.unpackbits(data).reshape(280, -1)[:, :480]  # 1 = white, 0 = black

Not sure about your panel's details? See how e-paper frame buffers are laid out.