Shape-true fills and style preservation (flood masks already exist, renderer discards them) #5

Open
opened 2026-07-22 07:22:54 +02:00 by scarlet · 0 comments
Member

Two quality gaps that share a root cause — the renderer only knows "white rounded rect":

  1. Shape-true fills: v0_annotate.py --flood X,Y already computes the exact pixel mask of a bubble interior, and the typesetter throws it away in favour of a rounded rectangle. Persisting the mask (or its polygon) per region and filling that shape would eliminate the whole class of inset/corner hacks (fill_inset, fill_square_corners).

  2. Style preservation: coloured bubbles, black shout bubbles, and white-on-dark text all flatten to white-fill + black-text, losing authorial intent. Sampling the region's background and foreground from the source and rendering with those instead would preserve it.

Blocks/blocked-by: freetext (#2) is implemented but gated on "cleaned": true because outlined English over undeleted Japanese glyphs is unreadable — it needs the inpainting toolchain (#1) before it can render as intended.

Two quality gaps that share a root cause — the renderer only knows "white rounded rect": 1. **Shape-true fills**: `v0_annotate.py --flood X,Y` already computes the exact pixel mask of a bubble interior, and the typesetter throws it away in favour of a rounded rectangle. Persisting the mask (or its polygon) per region and filling that shape would eliminate the whole class of inset/corner hacks (`fill_inset`, `fill_square_corners`). 2. **Style preservation**: coloured bubbles, black shout bubbles, and white-on-dark text all flatten to white-fill + black-text, losing authorial intent. Sampling the region's background and foreground from the source and rendering with those instead would preserve it. Blocks/blocked-by: `freetext` (#2) is implemented but gated on `"cleaned": true` because outlined English over undeleted Japanese glyphs is unreadable — it needs the inpainting toolchain (#1) before it can render as intended.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
TeamAI/doujin-translator#5
No description provided.