Spaces:
Running
Running
parenthesis
Browse files
app.py
CHANGED
|
@@ -50,10 +50,10 @@ def overlay_png_on_side_by_side_images(
|
|
| 50 |
img2 = insect_image_path.convert("RGBA")
|
| 51 |
png_img = Image.open(overlay_image_path).convert("RGBA")
|
| 52 |
min_height = 3600
|
| 53 |
-
img1_hpercent =
|
| 54 |
-
img1_wsize = int((float(img1.size[0) * float(img1_hpercent)))
|
| 55 |
-
img2_hpercent =
|
| 56 |
-
img2_wsize = int((float(img2.size[0) * float(img2_hpercent)))
|
| 57 |
img1 = img1.resize((img1_wsize, min_height), Image.LANCZOS)
|
| 58 |
img2 = img2.resize((img2_wsize, min_height), Image.LANCZOS)
|
| 59 |
combined_width = img1.width + img2.width
|
|
|
|
| 50 |
img2 = insect_image_path.convert("RGBA")
|
| 51 |
png_img = Image.open(overlay_image_path).convert("RGBA")
|
| 52 |
min_height = 3600
|
| 53 |
+
img1_hpercent = min_height / float(img1.size[1])
|
| 54 |
+
img1_wsize = int((float(img1.size[0]) * float(img1_hpercent)))
|
| 55 |
+
img2_hpercent = min_height / float(img2.size[1])
|
| 56 |
+
img2_wsize = int((float(img2.size[0]) * float(img2_hpercent)))
|
| 57 |
img1 = img1.resize((img1_wsize, min_height), Image.LANCZOS)
|
| 58 |
img2 = img2.resize((img2_wsize, min_height), Image.LANCZOS)
|
| 59 |
combined_width = img1.width + img2.width
|