Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:
Contain
not preserving aspect ratio of tall images
When both width and height is set to `Contain`, the scaling uses the wrong direct proportional scaling formula for tall images. This is due to `aspect` being `width / height`: By dividing (original), the formula expands to `scaled_width / scaled_height : height / width` which inversely scaled the width of tall images. By multiplying instead, the formula correctly expands to `scaled_width / scaled_height : width / height` which preserves aspect ratio when scaling.
- Loading branch information