docs: document ImageMagick path fill rendering bug#234
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ImageMagick's GetFillAlpha function (MagickCore/draw.c) has two interacting bugs that can produce single white pixel artifacts in filled regions:
The winding number calculation uses
x <= bounds.x1instead ofx < bounds.x1, causing pixels at an edge's leftmost x to be incorrectly classified as outside the polygon.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