Skip to content

docs: document ImageMagick path fill rendering bug#234

Merged
DASPRiD merged 1 commit intomainfrom
docs/imagick-known-issue
Apr 5, 2026
Merged

docs: document ImageMagick path fill rendering bug#234
DASPRiD merged 1 commit intomainfrom
docs/imagick-known-issue

Conversation

@DASPRiD
Copy link
Copy Markdown
Member

@DASPRiD DASPRiD commented Apr 5, 2026

ImageMagick's GetFillAlpha function (MagickCore/draw.c) has two interacting bugs that can produce single white pixel artifacts in filled regions:

  1. The winding number calculation uses x <= bounds.x1 instead of x < bounds.x1, causing pixels at an edge's leftmost x to be incorrectly classified as outside the polygon.

  2. DestroyEdge does not decrement the loop counter after removing an edge, causing the next edge in the array to be skipped in the distance phase.

Neither canvas padding nor post-processing can reliably fix this. Users should use SvgImageBackEnd or GDLibRenderer instead.

Closes #195

ImageMagick's GetFillAlpha function (MagickCore/draw.c) has two interacting
bugs that can produce single white pixel artifacts in filled regions:

1. The winding number calculation uses `x <= bounds.x1` instead of
   `x < bounds.x1`, causing pixels at an edge's leftmost x to be
   incorrectly classified as outside the polygon.

2. DestroyEdge does not decrement the loop counter after removing an
   edge, causing the next edge in the array to be skipped in the
   distance phase.

Neither canvas padding nor post-processing can reliably fix this.
Users should use SvgImageBackEnd or GDLibRenderer instead.

Closes #195

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.81%. Comparing base (bf7d67c) to head (22b215c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #234   +/-   ##
=========================================
  Coverage     71.81%   71.81%           
  Complexity      995      995           
=========================================
  Files            49       49           
  Lines          3151     3151           
=========================================
  Hits           2263     2263           
  Misses          888      888           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DASPRiD DASPRiD merged commit 03c2273 into main Apr 5, 2026
9 checks passed
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.

Margin 0 error code is output in png files.

1 participant