Commit e615abf
fix: restore column-major loop order in error diffusion
The perf optimisation changed x-outer/y-inner to y-outer/x-inner.
With the Floyd-Steinberg kernel this changes which neighbouring pixels
have already received error when the current pixel is processed.
Row-major scan causes error to accumulate horizontally, producing
large buildup along vertical edges that pushes pixels to wrong
bright palette colours (visible as coloured halos).
Restoring column-major (x-outer, y-inner) matches the original
processing order. Bounds check and Float32Array optimisations kept.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c5b0440 commit e615abf
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
0 commit comments