updated check_metadata
This commit is contained in:
parent
7740b2e300
commit
7fc9beec45
8
.gitignore
vendored
8
.gitignore
vendored
@ -138,3 +138,11 @@ dmypy.json
|
||||
# Cython debug symbols
|
||||
cython_debug/
|
||||
|
||||
|
||||
*.png
|
||||
*.mkv
|
||||
*.mp4
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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 |
Loading…
Reference in New Issue
Block a user