daniebker

Mangle

· [Daniel Baker]

Hardware: Jailbroken Kindle

Status: In progress

Source: github.com/daniebker/Mangle

Mangle lets you read manga panel by panel on a Kindle.

Caveat: Mangle only works on a jailbroken Kindle with KUAL installed. It won’t run on a stock Kindle.

Why I built it

I wanted to read manga on my Kindle, but a whole page shrunk down to fit the screen is often too small to read. The text in the speech bubbles and panels was hard to make out, and zooming in by hand on e-ink is slow and fiddly.

So I wanted the Kindle to zoom to one panel at a time. Detecting panels is too much work for the Kindle to do while you read, so Mangle does it ahead of time. A preprocessor on your computer takes PDFs and CBZs, finds the panels, then compresses and converts every page and panel for the Kindle’s e-ink screen. The Kindle only has to show small images that are already the right size, so page turns stay fast.

How it works

Mangle has two parts:

  1. Preprocessor (Python, runs on your computer). It reads a PDF, CBZ or ZIP of pages and:
    • finds the panels with Kumiko, falling back to a simpler OpenCV detector, and sorts them into reading order (right to left for manga, or left to right for western comics);
    • shows pages it isn’t confident about whole, rather than guessing;
    • crops each panel from the full-resolution original, so zoomed panels stay sharp;
    • converts every image to grayscale, resizes it to fit the screen, tunes the contrast for e-ink and dithers it down to 16 gray levels as a small 4-bit PNG;
    • packs everything into a ZIP with a manifest.
  2. Reader (C, runs on the Kindle, started from KUAL). It opens those ZIPs and shows them panel by panel or page by page.

Reading on the Kindle

Changelog

v0.4.0

Added

v0.3.0

Added

v0.2.0

Added

Changed

v0.1.0

Full changelog on GitHub