Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task: Fix ImageMagick blur parameters #83

Merged
merged 1 commit into from
Sep 21, 2023
Merged

Conversation

goodtrailer
Copy link
Owner

The blur radius was calculated as a fraction of image resolution, while the blur sigma was left alone. This is completely incorrect. With ImageMagick, blur radius should be kept at 0, and blur sigma is measured in pixels (source). Sothe correct solution is to leave the radius at 0 and instead calculate the sigma as a fraction of image resolution.

Here's a decent comparison of analogous "before" (above) and "after" (below), taken from link above:
image

The box blur artifacts are significantly more noticeable in the "before", while the "after" is effectively indistinguishable from a Gaussian.

@goodtrailer goodtrailer added bug Something isn't working project/task labels Sep 21, 2023
@goodtrailer goodtrailer self-assigned this Sep 21, 2023
@pull-request-size pull-request-size bot added the size/L 100–499 lines label Sep 21, 2023
@goodtrailer goodtrailer merged commit 14bc46e into main Sep 21, 2023
@goodtrailer goodtrailer deleted the fix-blur-parameters branch September 21, 2023 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working project/task size/L 100–499 lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant