mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
@@ -59,9 +59,9 @@ def save_image(image_numpy, image_path, aspect_ratio=1.0):
|
||||
# h, w, _ = image_numpy.shape
|
||||
#
|
||||
# if aspect_ratio > 1.0:
|
||||
# image_pil = image_pil.resize((h, int(w * aspect_ratio)), Image.BICUBIC)
|
||||
# image_pil = image_pil.resize((h, int(w * aspect_ratio)), Image.Resampling.BICUBIC)
|
||||
# if aspect_ratio < 1.0:
|
||||
# image_pil = image_pil.resize((int(h / aspect_ratio), w), Image.BICUBIC)
|
||||
# image_pil = image_pil.resize((int(h / aspect_ratio), w), Image.Resampling.BICUBIC)
|
||||
|
||||
image_pil.save(image_path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user