Skip to content
0then0Public

About

Make sleep-screen images for Kindle, Kobo, BOOX, Xteink and other e-readers, with per-model install guidance. Runs entirely in the browser; images never leave the device.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

InkDoze icon: an e-reader with a crescent moon on its screen

InkDoze

Turn your images into sleep screens for e-readers, right in the browser.

CI status License: Apache-2.0

InkDoze resizes, crops and tones images for the exact screen of your e-reader and tells you how (or whether) the device can use them as a sleep screen. Everything runs locally: after the page loads, no image, file name or metadata leaves your device, and the production build blocks network requests with a Content Security Policy.

Open it in your browser: https://0then0.github.io/inkdoze/

How to use

  1. Add images: drop PNG, JPEG, WebP or HEIC files onto the page or choose Add images. HEIC photos can be added as they are.
  2. Pick your e-reader once. Search by model, generation or resolution, or choose Custom size. InkDoze remembers the choice for your next visit.
  3. Download the selected image, or all images as a ZIP. For Kindles that only show book covers, download an EPUB instead (see below).

That is the whole workflow. Automatic e-ink adjustment is on by default: for each image it stretches the contrast and lifts the midtones so it reads well on e-ink, picks colour or grayscale to match the screen, fills the screen at its native resolution and uses the format recommended for the e-reader. The line above the download buttons shows what you will get, for example 480 × 800 px · BMP 24-bit colour · Grayscale.

How to install explains whether the selected model can show your own image at all, which firmware or app that needs, and the file name to use. Everything else is optional: crop, rotate, zoom and position an image under the preview, or open Manual settings for size, framing, background, tone, gray levels, dithering and format. Apply changes to decides whether a manual setting affects all images or only the selected one.

Limits per batch: 40 files, 40 MB and 40 megapixels per file, output up to 8192 px per side.

Features

  • Device catalog. 367 e-readers from 35 brands, from the 2004 Sony Librie to current Kindle, Kobo, BOOX, PocketBook, reMarkable and Xteink models, with generations kept apart. The list is ordered by approximate popularity. Search by model, generation, alias or resolution (pw5, paperwhite 2021, 1264x1680), filter by brand and colour screen, or set a custom size.
  • Honest install guidance. Screen size and install method are separate. Each method has a status (custom image, book cover only, third-party firmware or app, size confirmed only), a community-documented flag where applicable, steps, limitations and sources with the date they were checked.
  • Framing. Fit, Fill and Stretch; crop with aspect lock (mouse, touch or keyboard); zoom; offset; 90° rotation; background colour for empty and transparent areas.
  • Tone. Automatic per-image adjustment for e-ink (levels stretch with a capped gain and a midtone curve, measured on the visible part of the image only). Manual colour or grayscale, brightness and contrast on top of it, invert, 256/16/4/2 gray levels and Floyd–Steinberg or Atkinson dithering.
  • Same pipeline for preview and export. The preview is rendered at full output resolution by the same code that writes the file. The optional e-ink simulation is labelled as an approximation.
  • Formats. PNG, JPEG and uncompressed BMP at 24, 8, 4, 2 and 1 bit. The recommended format and file name come from the selected install method.
  • EPUB for Kindle Display Cover. For ad-free Kindles on stock firmware, which can only show the cover of a book, Download EPUB for Kindle packs the selected image, rendered exactly as the image export, into an EPUB 3 book with that image as its cover. One image per book; batches are not packed into EPUBs.
  • HEIC photos. Still HEIC photos in the layout iPhones write are decoded on the device: by the browser where it can (Safari), otherwise by a WebAssembly build of libheif that ships with InkDoze. See HEIC photos.
  • Batches. Drag and drop or pick several PNG, JPEG, WebP and HEIC files, rename outputs, give single images their own settings, download one file or a ZIP of all. Work runs in a Web Worker with bounded concurrency and can be cancelled.
  • Seven languages. English, Русский, Español, Deutsch, Français, 日本語 and Português (Brasil).
  • Mobile and keyboard friendly. Native controls, visible focus, a sticky download bar on phones.

Catalog at a glance

Brand Models Years Best documented status
Kindle 27 2007–2025 Book cover on stock firmware; custom images need a jailbreak (Screen Saver Hack on 2.x–4.x firmware, KOReader)
Kobo 25 2010–2024 Book cover; community-documented .kobo/screensaver folder; KOReader
BOOX 196 2009–2026 Custom image (Apps › Screensaver) on recent models; «Set as screensaver» on Russian-market models whose manual covers it; Picco via CrossPoint
PocketBook 23 2010–2025 Size only, except Verse Pro firmware 6.9 logos
Sony 15 2004–2018 Size only (Reader PRS series, Digital Paper)
tolino 10 2013–2024 Cover only on 2024 models; own picture on earlier models
Bookeen 8 2004–2014 Size only (Cybook)
NOOK 7 2011–2023 Screensavers folder on early models; size only on later ones
reMarkable 5 2017–2026 Community SSH method
Xteink 4 2025–2026 CrossPoint sleep.bmp; stock wallpaper
Supernote 4 2020–2024 Custom image (Settings › Display & Input › Screensaver)
24 other brands 43 2006–2025 Size only (Bigme, Meebook, Likebook, Boyue, Hanlin, Hanvon, iRex, Icarus and others)

The data lives in src/catalog as typed records. Every model has a stable ID, brand, model, generation, aliases, portrait resolution, colour flag, sources and a verification date. Sources are tagged as manufacturer, firmware source, community tooling or secondary. Models backed only by secondary sources are marked in the UI. Every ONYX BOOX model sold in Russia, including the archive (Darwin, Faust, Vasco da Gama, Kon-Tiki, Monte Cristo and others), comes from the specification pages of onyx-boox.ru, the official distributor. Most other discontinued models are documented on the MobileRead Wiki, maintained by device owners; where firmware-level data exists (CrossPoint, Plato, KOReader) it takes precedence.

The device list is sorted by an approximate popularity score: brand reach, flagship product lines and how recent the model is. There is no public per-model sales data, so the order is an editorial estimate; the weights live in src/catalog/popularity.ts. Recency is counted from the current year, so the order ages on its own.

Data notes:

  • Kindle Paperwhite (12th generation) and Colorsoft render at 1272 × 1696. Many spec sheets say 1264 × 1680; device screenshots collected by the Kindle Comic Converter project show the larger grid.
  • Note Air3 (1404 × 1872) and Note Air3 C (1860 × 2480) share a name but not a resolution, as do Paperwhite generations 5 (1236 × 1648) and 6.
  • Current tolino models (2024, built with Kobo) only show the book cover; the "own picture" option belongs to earlier generations.

Kindle cover EPUB

The EPUB is built in the browser like every other file: InkDoze uploads nothing and never talks to Amazon. To use it:

  1. Choose a Kindle model whose install method is the stock-firmware book cover, add an image and select Download EPUB for Kindle.
  2. Send the EPUB yourself with Send to Kindle. This uploads the file to your Amazon account, where Amazon converts it.
  3. Open the book on the Kindle and turn on Display Cover (Settings › Screen and brightness on current firmware). Kindles with ads show ads instead of covers.

Limits: the sleep screen follows the last book you opened, so after reading another book you have to open this one again. It is a book cover, not an independent permanent screensaver, and images do not rotate. Copying the EPUB over USB does not work, because stock Kindle firmware does not open EPUB files. Availability of Send to Kindle and Display Cover depends on the model, firmware and region.

The book holds a mimetype entry stored first, META-INF/container.xml, an EPUB 3 package document whose image item has the cover-image property, a navigation document, one XHTML page with the image and the PNG or JPEG cover itself, under fixed paths. The legacy <meta name="cover"> is added as described in Amazon's KDP cover guidance. The output passes EPUBCheck 5.4.0 without errors or warnings. Display Cover has not been verified on a real Kindle yet; reports with model and firmware version are welcome.

CrossPoint and PXC

CrossPoint 2.0.0 ships builds for Xteink X3/X4, X4 Classic, X4 Pro and BOOX Picco. Custom sleep images are sleep.bmp in the SD card root or .bmp files in /.sleep, read as uncompressed BMP (1, 2, 4, 8, 24 or 32 bit, up to 2048 × 3072). InkDoze writes BMP variants that pass a port of CrossPoint's header checks; 24-bit is recommended as in the CrossPoint guide, and 2-bit stores exactly the four native gray levels.

PXC sleep images are only implemented in an unmerged pull request; released firmware uses the .pxc layout only as an internal cache. InkDoze contains a tested PXC encoder for that layout, but does not offer it for any device until a release reads PXC sleep images.

HEIC photos

Files are recognised by their content, not by name or MIME type, so photos with no extension or an empty type work too. Before anything is decoded, InkDoze reads the HEIF container and checks the file size and the size of the primary image; for tiled (grid) images, as iPhones write them, every tile counts towards the 40 megapixel limit. Damaged containers and images whose size cannot be determined are rejected at that point, and the decoded image is checked again.

  • Supported: still HEIC images whose primary image is HEVC-coded, either as one image or as a grid of tiles. Rotation and mirroring stored in the container (irot, imir) are applied once; the EXIF orientation copy is not applied on top.
  • Not supported: image sequences (HEICS), AVIF, other codecs inside HEIF (JPEG, uncompressed), derived identity and overlay images. Only the primary image is used: depth maps, HDR gain maps, thumbnails and other auxiliary images are ignored. Each case is reported next to the file with its own message.
  • Decoding path: the worker first decodes a small built-in HEIC sample with createImageBitmap and checks its size and orientation. If that works, the browser decodes the photos; if the browser then rejects a particular photo, the WebAssembly decoder gets one try. Otherwise the photos go to the WebAssembly decoder: libheif 1.23 with libde265, from the libheif-js package. It runs in its own worker, one photo at a time, and is loaded from the app's own files the first time it is needed (about 2 MB, 0.7 MB compressed, with the WebAssembly binary embedded, so no other request is made). PNG, JPEG, WebP and natively decoded HEIC never load it. The decoder worker stops after a minute without work, or at once when the photo it is decoding is removed, which also returns its memory.
  • Colour: the WebAssembly path converts to RGB without applying the embedded ICC profile, so Display P3 photos look slightly less saturated than in the browser's own decoder. For grayscale e-ink output the difference is negligible.
  • Output: the HEIC file and its metadata (EXIF, XMP) are never copied into exported images.

Checked so far: Safari 27.2 on macOS 15.7 (by hand) and Playwright's WebKit build decode HEIC natively; Playwright's Chromium and Firefox builds use the WebAssembly decoder. A real 4000 × 3000 camera photo (48-tile grid) converts in all of them; at original size both paths give the same image with a largest channel difference of 9 of 255, and the same holds for a portrait photo with stored rotation. The automated tests use synthetic photos written by Apple's ImageIO in the iPhone layout (scripts/make-heic-fixtures.swift). iOS and original iPhone photos have not been verified yet.

Browser support

InkDoze needs OffscreenCanvas, module Web Workers and createImageBitmap, which current versions of Chrome, Edge, Firefox and Safari provide. The automated tests run in Chromium (desktop and Android emulation); HEIC import is also tested in Firefox and WebKit.

Run locally

Requirements: Node.js 22.12 or newer (CI uses the version in .nvmrc) and npm.

npm ci

Development server with hot reload at http://localhost:5173/:

npm run dev

Production build served locally at http://localhost:4173/:

npm run build && npm run preview
Command What it does
npm run catalog:check Validates the device catalog and install methods
npm run typecheck TypeScript 7 type check of the app and tooling
npm run lint ESLint
npm test Unit tests (Vitest)
npm run build Production build into dist/
npm run test:e2e Playwright tests against the production build
npm run check Everything except Playwright

Install the Playwright browsers once with npx playwright install chromium firefox webkit.

Hosting

npm run build writes a static site to dist/. All paths are relative, so it works from a domain root or any sub-directory on any static host.

The repository deploys itself to GitHub Pages with .github/workflows/pages.yml: after the CI workflow succeeds on main, the site is built and published to https://<owner>.github.io/inkdoze/. To enable it in a fork, open Settings › Pages and set Source to GitHub Actions; until then the workflow skips deployment with a notice. You can also run it manually from the Actions tab.

Project layout

src/catalog/   devices, install methods, sources, validation
src/pipeline/  geometry, tone and dithering, render job, canvas renderer
src/formats/   BMP, PXC, ZIP and EPUB writers, format registry
src/io/        header and HEIF container probing, limits, file names, task queue
src/worker/    render worker, HEIC decoding and its worker, client
src/i18n/      translator and locale files
src/ui/        Preact components
tests/         unit tests
e2e/           Playwright tests

Tests

Unit tests cover catalog validation (duplicates, incomplete records, wrong orientation, unknown methods or message keys), geometry (crop, rotation, placement, clipping), transparency, tone curves, palettes and dithering, BMP and PXC packing and row alignment checked against independent readers, ZIP structure against zlib's CRC-32, EPUB container layout, metadata and escaping, header probing, HEIF container parsing (HEIC versus AVIF and other ISO BMFF files, grids, damaged boxes), the task queue and locale completeness.

Playwright runs against the production build served from /inkdoze/, as on GitHub Pages. It converts real files end to end, decodes the downloads with the browser's own decoders and checks sizes and control pixels, verifies ZIP contents, the Kindle cover EPUB (parsed with the browser's XML parser, cover identical to the image export, cancellation, errors and changes during export), per-file settings, error reporting, cancellation, offline use after load, HEIC import in Chromium, Firefox and WebKit (orientation in the list, preview and export, empty MIME type, mixed batches, damaged files, oversized grids, an unavailable decoder, removal during decoding, which files are loaded and when), and layout in all seven languages at desktop, tablet and phone widths.

Contributing

Corrections to the catalog are the most valuable contribution. See CONTRIBUTING.md for what sources a model or install method needs.

License

Apache License 2.0

The HEIC decoder used as a fallback is libheif-js (libheif and libde265, LGPL-3.0; it also contains the BSD-licensed dav1d). It is built into a separate file that is loaded only when needed and can be replaced. The build includes the license texts under licenses/; see THIRD_PARTY_NOTICES.txt.

About

Make sleep-screen images for Kindle, Kobo, BOOX, Xteink and other e-readers, with per-model install guidance. Runs entirely in the browser; images never leave the device.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages