UI element utilities¶
Fits a given image to fit on any sized screen whilst maintaining the aspect ratio. Any remaining space is filled with borders. The resized image is returned as
image: A PIL image to be resized.
o: output device object. Used to find the width and height of the screen.