def resize_image_to_fit_height(image, dest_h):
scale_factor = dest_h / image.size[<NUM_LIT:1>]<EOL>dest_w = image.size[<NUM_LIT:0>] * scale_factor<EOL>scaled_image = image.resize((int(dest_w), int(dest_h)), PIL.Image.ANTIALIAS)<EOL>return scaled_image<EOL>
Resize and image to fit the passed in height, keeping the aspect ratio the same

:param image: PIL.Image
:param dest_h: The desired height