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.
For https://github.com/image-rs/image/issues/2238,
I've renamed
DynamicImage::resize()
toresize_exact()
,resize_to_fill()
toresize_crop_to_fill()
andimageops::resize()
toresize_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 bothDynamicImage::resize()
andimageops::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 theimageproc
crate and removed from theimage
crate.Since
resize()
uses interpolation I also added apub interpolate(image, x, y, interpolation: Interpolation)
method and also made the specific interpolation variant functions likeinterpolate_bilinear()
public as well which should fix #546.