Expand description
Shared mathematical utility functions.
Functionsยง
- resize_
dimensions ๐Calculates the width and height an image should be resized to. This preserves aspect ratio, and based on thefill
parameter will either fill the dimensions to fit inside the smaller constraint (will overflow the specified bounds on one axis to preserve aspect ratio), or will shrink so that both dimensions are completely contained within the givenwidth
andheight
, with empty space on one axis.