Claude reverse-engineers Direct2D for Paint.NET on WINE
Rick Brewster, the author of the Windows image editor Paint.NET, says Direct2D support has always been the biggest obstacle to running Paint.NET on WINE. He concluded that WINE's own Direct2D implementation will never be complete enough for what Paint.NET needs, and he can't simply disable the app's use of Direct2D. So instead, Paint.NET now ships an internal, from-scratch, clean-room reverse-engineered rewrite of Direct2D, used specifically when the app is run on WINE via the /wine flag. It lives in the file PaintDotNet.Windows.Direct2D1.Managed.dll, and Brewster says it was written by Claude, adding that the work would not have been possible, and would never have happened, without it.
The scale is large: the new module runs to about 180,000 lines of code, which Brewster says he "cannot possibly review" in full, given that the rest of Paint.NET, built up over more than 20 years, is only about 700,000 lines. He describes most of the new code as "vibe coded": not thoroughly reviewed, more "trust me bro" than audited line by line.
Brewster's account of working with Claude is mixed. At times, he writes, it worked "with the fury of 10 freshly unshackled Einstein genius-level 10x coders," and he was impressed by clever, tireless reverse-engineering work to figure out the formulas needed to implement Direct2D's built-in effects library. At other times he had to intervene directly: for a while, Claude wasn't doing the COM equivalent of AddRef() for reference-counted objects, a resource-management bug he had to catch and fix, and he says he had to correct some bad design and architecture decisions along the way.
Simon Willison quoted Brewster's account on his blog on 2 September 2026, without adding independent commentary beyond the citation.
Key facts
- Paint.NET now ships an internal, from-scratch, clean-room reverse-engineered rewrite of Direct2D, used when Paint.NET runs on WINE via the /wine flag, contained in PaintDotNet.Windows.Direct2D1.Managed.dll.
- The reimplementation, written by Claude, runs to about 180,000 lines of code, which Paint.NET creator Rick Brewster says he "cannot possibly review" in full, versus roughly 700,000 lines for the rest of Paint.NET built over more than 20 years.
- Brewster calls most of the code "vibe coded": not thoroughly reviewed, more "trust me bro" style. He says Claude initially omitted proper reference counting, the COM equivalent of AddRef(), for reference-counted objects, and made some bad design and architecture decisions he had to correct.
- He also praises Claude's clever, tireless reverse-engineering of the formulas needed to implement Direct2D's built-in effects library.
- Simon Willison quoted Brewster's account on his blog on 2 September 2026.
Why it matters
Direct2D support was the single biggest blocker to running Paint.NET on WINE, and Brewster had concluded that WINE's own Direct2D would never be complete enough for Paint.NET's needs, while simply disabling the app's use of it wasn't an option. Rather than work around the gap, he had Claude build a full clean-room reimplementation from scratch: a large, technically demanding piece of low-level graphics engineering that, in his telling, would not have happened otherwise.
Who it affects
Paint.NET users who run the Windows image editor under WINE, on Linux or macOS, via the /wine option. More broadly, it's a data point for developers weighing whether to hand an AI coding agent a large, self-contained subsystem rather than a small, bounded task.
How to use it
The rewritten Direct2D layer ships inside Paint.NET itself, in PaintDotNet.Windows.Direct2D1.Managed.dll, and is triggered automatically when the app is launched with the /wine flag on WINE. Brewster describes no separate install or configuration step.
How solid is it
Brewster is candid that most of the roughly 180,000 lines are "vibe coded": not thoroughly reviewed, because reviewing that much code in full isn't feasible for one person, on top of the roughly 700,000 lines that make up the rest of Paint.NET after more than 20 years of his own work. He describes uneven performance from Claude: at times highly effective, at other times requiring direct correction.
Risks and caveats
Brewster says he had to actively supervise the work: Claude initially failed to implement proper reference counting, skipping the COM equivalent of AddRef() for reference-counted objects, and he says he had to intervene on some bad design and architecture decisions. He gives no detail on any formal testing or QA process beyond his own spot-checking, and does not say whether this WINE support has shipped in a released version of Paint.NET or remains in progress.
“This was written by our good friend Claude, without whom this would NOT have been possible and would NEVER have happened.”
— Rick Brewster, author of Paint.NET