-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add basic mimpmap downscaling support #145
base: main
Are you sure you want to change the base?
Conversation
2de9b5b
to
4cffa27
Compare
Thanks a lot 🎉 |
This is small patch to fix quality issues when scaling images down. It'll create a number of mipmap/half-scaled versions of a given source as required and use the next largest version as the source for bilinear or bicubic scaling. This uses the same downsampling functions as Skia, but similarly doesn't run SIMD versions of these. As they are integer-based, these should be reasonably quick.
4cffa27
to
a79233a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking pretty good!
Any thoughts on adding a couple of tests?
@waywardmonkeys any idea of what sort of tests would be useful in this case? I'm imagining just integration tests, but if there are sensible unit tests I could add those? (I think Integration tests would involve some source and expected PNGs so might be a little tricky to keep the size down, but I'm guessing would include:
|
This is small patch to fix quality issues when scaling images down. It'll create a number of mipmap/half-scaled versions of a given source as required and use the next largest version as the source for bilinear or bicubic scaling.
This uses the same downsampling functions as Skia, but similarly doesn't run SIMD versions of these. As they are integer-based, these should be reasonably quick.
This addresses issue #13, but probably wants some work and tests before merging.