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

Add resize() methods and an interpolate() method. #671

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

Conversation

ripytide
Copy link
Member

@ripytide ripytide commented Jun 22, 2024

For image-rs/image#2238,

I've renamed DynamicImage::resize() to resize_exact(), resize_to_fill() to resize_crop_to_fill() and imageops::resize() to resize_max_no_crop().

I've added doc-tests, they're not amazing as they just use zeros at the moment but they're better than nothing.

As an aside: image having both DynamicImage::resize() and imageops::resize() but them having different semantics, _max_no_crop() vs _exact(), seems like such a foot-gun and all the more reason image processing operations should be standardized in the imageproc crate and removed from the image crate.

Since resize() uses interpolation I also added a pub interpolate(image, x, y, interpolation: Interpolation) method and also made the specific interpolation variant functions like interpolate_bilinear() public as well which should fix #546.

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.

make interpolate_* public
1 participant