image icon indicating copy to clipboard operation
image copied to clipboard

Consider making `math::resize_dimensions` function public

Open phil-opp opened this issue 1 year ago • 1 comments

The resize_dimensions would be quite useful when working with imageops::resize and imageops::thumbnail. Unfortunately it's not part of the public API, so downstream crates cannot use it.

This was already requested in https://github.com/image-rs/image/issues/1354 a few years ago. The issue was closed without a comment.

Draft

It would be nice if we could make the function public.

phil-opp avatar Dec 16 '24 12:12 phil-opp

Looks like there was also an abandoned PR: #1356. For reference (since I didn't remember off hand what it did), this is the implementation of resize_dimensions... https://github.com/image-rs/image/blob/2125965fdc23ea0544fd585f6e934cc7762c1f51/src/math/utils.rs#L5-L40

fintelia avatar Dec 16 '24 21:12 fintelia