Ink Frame Lab

e-ink tooling

Ink Frame Lab

A browser-based tool for preparing images for e-ink picture frames. Start by importing images, and cropping them to the aspect ratio and resolution of your e-ink panel. Then preview the results in a 3D view in different lighting conditions at different angles. It dithers photos down to the limited colour palettes used by e-paper displays and exports ready-to-use PNG files for uploading.

I’ve written a blog post detailing the need for this tool and a related standalone firmware for displaying images on an i-ink panel.

A functional web version can be accessed at psmyles.github.io/ink-frame-lab, and the source code at github.com/psmyles/ink-frame-lab.

Workflow

Supported displays

Resolution presets are included for common e-ink displays. Any custom resolution and related color palette values can be entered manually.

Running

This is a static web app with no build step. Because it uses ES modules it must be served over HTTP, not opened directly as a file.

npx serve .

Then open the URL shown in the terminal (typically http://localhost:3000).

Project layout

index.html        entry point
css/styles.css    all styles
js/
  main.js         app init and event wiring
  state.js        shared mutable state
  sidebar.js      resolution, palette, and dithering controls
  ui.js           filmstrip, crop tool, canvas preview
  export.js       image processing and file download
  dithering.js    palette data loading and dithering algorithms
  viewer3d.js     Three.js 3D frame viewer
presets.json      device presets and calibrated colour palettes
IBL/              environment maps for the 3D viewer

Credits