Tools for images.

ImageOrientation[source]

Enum = [TOP, TOP_FLIPPED, BOTTOM, BOTTOM_FLIPPED, RIGHT_FLIPPED, RIGHT, LEFT_FLIPPED, LEFT]

Image EXIF orientations.

get_image_scale[source]

get_image_scale(image_size, target_size)

Calculates the scale of the image to fit the target size. image_size: The image size as tuple of (w, h) target_size: The target size as tuple of (w, h). :return: The image scale as tuple of (w_scale, h_scale)