mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
The automatic sampling margin was three quarters of the selection's larger side, computed as `ext * 3` in u32 (edit.fill) or i32 (edit.contentAwareFill) before the window cap, so a loaded document with a far-flung selection overflowed and panicked. edit.contentAwareFill also had no window cap at all and could try to allocate a canvas-sized window. The margin is now one shared function computed in u64 and saturated to i32, and both commands check the window against the same 400 M-pixel cap before reading or allocating. Content-Aware Move uses the shared margin too. Co-Authored-By: Claude Opus 5.5 <[email protected]>