Skip to content

Keep mid-sized colored areas filled in black and white - #244

Open
toolicious wants to merge 1 commit into
pynicolas:mainfrom
toolicious:raw-fill
Open

toolicious wants to merge 1 commit into
pynicolas:mainfrom
toolicious:raw-fill

Conversation

@toolicious

@toolicious toolicious commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

I'm still running special cases through the b&w mode, and today I found this bug:
Mid-sized colored areas (like the buttons or the logo in the screenshot of your website) turn white with a black rim because flattening lightens them toward paper before the fill step runs. The fix adds a check on the original photo: a region that is clearly darker and distinctly colored versus its surroundings is content, one that matches the paper's tone is a shadow and left alone. This adds ~100ms per page (it runs on a 2MP copy) with no regressions elsewhere (as far as I can see).

It would be nice to have this in the first release. If that's too late for you, the next update is fine.

fill-fix

@pynicolas

pynicolas commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner

@toolicious Thanks a lot for this new PR. The black and white processing is already quite complex, and as the maintainer of this project, I don't feel ready to expand it further at this point. I'll come back to it later. Thank you for your understanding.

@toolicious

Copy link
Copy Markdown
Contributor Author

Sure, no rush. It's an edge case for mid-sized colored areas, so the release is fine without it. I'll leave the PR open for later.

@toolicious toolicious changed the title Find colored fills in the capture as well Keep mid-sized colored areas filled in black and white Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants