diff --git a/codec_visualizer/codec_visualizer.py b/codec_visualizer/codec_visualizer.py index 919c3d3..dcac798 100755 --- a/codec_visualizer/codec_visualizer.py +++ b/codec_visualizer/codec_visualizer.py @@ -3,7 +3,7 @@ """ Author: Hendrik Schutter, localhorst@mosad.xyz Date of creation: 2022/01/22 - Date of last modification: 2022/01/25 + Date of last modification: 2022/08/25 """ import os @@ -63,7 +63,7 @@ def zoom_at(img, crop_factor): image_width, image_height = img.size img = img.crop((int(image_width/2) - int(image_width/crop_factor) / (crop_factor * 2), int(image_height/2) - int(image_height/crop_factor) / (crop_factor * 2), int(image_width/2) + int(image_width/crop_factor) / (crop_factor * 2), int(image_height/2) + int(image_height/crop_factor) / (crop_factor * 2))) - return img.resize((int(image_width/crop_factor*2), int(image_height/crop_factor*2)), Image.LANCZOS) + return img.resize((int(image_width/crop_factor*2), int(image_height/crop_factor*2)), Image.Resampling.LANCZOS) def create_collage(images_A, images_B, statistics, output_file): image_width, image_height = images_A[0].size @@ -112,7 +112,7 @@ def create_collage(images_A, images_B, statistics, output_file): cropped_image = zoom_at(images_A[i], crop_factor) cropped_image_with, _ = cropped_image.size output_image.paste(cropped_image, (int(x_offset/2) + image_width - cropped_image_with , y)) - cropped_image = zoom_at(images_B[i].transpose(PIL.Image.FLIP_LEFT_RIGHT), crop_factor) + cropped_image = zoom_at(images_B[i].transpose(PIL.Image.Transpose.FLIP_LEFT_RIGHT), crop_factor) output_image.paste(cropped_image, (int(x_offset/2) + image_width, y)) i += 1 y += image_height @@ -182,4 +182,4 @@ def main() -> None: delete_temp_dir() if __name__ == "__main__": - main() + main() \ No newline at end of file diff --git a/codec_visualizer/demo_output.png b/codec_visualizer/demo_output.png deleted file mode 100644 index b8411c3..0000000 Binary files a/codec_visualizer/demo_output.png and /dev/null differ