updated check_metadata

This commit is contained in:
Hendrik Schutter 2022-08-25 10:36:37 +02:00
parent 7740b2e300
commit 7fc9beec45
3 changed files with 10 additions and 2 deletions

8
.gitignore vendored
View File

@ -138,3 +138,11 @@ dmypy.json
# Cython debug symbols
cython_debug/
*.png
*.mkv
*.mp4

View File

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 MiB