Skip to content

Apply sharp filters before upsizing #1

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abewieland
Copy link

Comparing results of this library with the ANSI C implementation by John Costella (at https://johncostella.com/magic/) led to differences when scaling up - the issue turned out to be that this library was applying the sharp filters after upscaling, which are supposed to be done before:

That implies that we must first apply the three-tap Sharp 2013 kernel, to the input image, before using the Magic Kernel to upsize the result.

(From here.)

I don't work in Rust often, so if there's a more idiomatic way to implement this, please feel free to close the PR and do so.

@jamsinclair
Copy link

jamsinclair commented May 26, 2025

That makes sense! I was curious why I couldn't quite replicate the results seen on John's blog.

@SevInf, when you have time, would be amazing if you could take a look – thank you 🙏

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.

2 participants