diff --git a/desktop_env/evaluators/metrics/slides.py b/desktop_env/evaluators/metrics/slides.py index dac4fd1..90eea64 100644 --- a/desktop_env/evaluators/metrics/slides.py +++ b/desktop_env/evaluators/metrics/slides.py @@ -49,11 +49,16 @@ def check_image_stretch_and_center(modified_ppt, original_ppt): the_image = original_slide_images[0] + the_modified_image = None + # Get the images that modified in width and height for modified_image in modified_slide_images: if the_image.image.blob == modified_image.image.blob: the_modified_image = modified_image + if the_modified_image is None: + return 0. + if (abs(the_modified_image.width - original_pres.slide_width) > Inches(0.5) or abs(the_modified_image.height - original_pres.slide_height) > Inches(0.5) or abs(the_modified_image.left - (original_pres.slide_width - the_modified_image.width) / 2) > Inches(0.5) or