def get_image_dimensions_from_image(self, image): image_details = ImageDetails() image_details.set_mime_type(image.format) width, height = image.size image_details.set_width(width) image_details.set_height(height) return image_details
def get_image_dimensions(self, identify_program, path): image = Image.open(path) image_details = ImageDetails() image_details.set_mime_type(image.format) width, height = image.size image_details.set_width(width) image_details.set_height(height) return image_details