DEV Community

Guuguo
Guuguo

Posted on Edited on

MangaInlay: In-Place AI Manga & Webtoon Translator Without Ugly White Boxes

If you read raw Japanese manga or Korean webtoons in Chrome or Edge, most translation extensions slap opaque rectangular white boxes over the speech bubbles—chopping off radial spikes, sound effects, and background artwork.

I built MangaInlay (hub.guuguo.top/mangainlay · GitHub) to handle erasure and typesetting locally on an offscreen HTML5 Canvas, so translated dialogue blends right back into the original panel.

MangaInlay In-Place Typesetting and Alt-Hold Original Peek Demo

MangaInlay Webtoon Scroll Prefetch and Tilted Sign Marginalia

How It Works

Instead of sending full-resolution pages back and forth or overlaying clunky DOM boxes:

  1. Compact NDJSON Only: The backend returns only normalized bubble bounding boxes ([ymin, xmin, ymax, xmax]), orientation (horizontal / vertical), category (dialogue / sfx / sign), and translated text across 17 target languages.
  2. Local Offscreen Canvas Harmonic Inpainting: The extension samples interior bubble colors in-browser, solves 14 rounds of discrete Laplace relaxation inside the true bubble cavity (using Manhattan distance sealing on open starbursts), and wraps translated lines along 16-slice horizontal contours.
  3. Artwork, Signs & Hold-Alt Original Peek:
    • Radial Starbursts: Preserves spiky shout-bubble borders cleanly without clipping.
    • Tilted Signs & Handwritten SFX: Keeps original artwork untouched and places perspective-matched parallel notes next to signs.
    • Hold Alt to Peek Original: Hold Alt at any moment to toggle back to the raw artwork, then release to keep reading.

Encrypted Canvas Reader Support and 17 Target Languages

  1. Encrypted <canvas> & Long-Strip Webtoon Streaming: Supports scrambled <canvas> readers like Shonen Jump+ (including two-page spread alignment), slices tall webtoons cleanly, runs viewport-prioritized streaming requests with 2-screen lookahead, and tracks horizontal/carousel page turns at 60fps via requestAnimationFrame.

MangaInlay 40s Promo Overview Poster

Try MangaInlay (Official Chrome & Edge Stores Live)

Top comments (0)