Spaces:
Running on Zero
Running on Zero
modify output_factor
Browse files- ominicontrol.py +3 -3
ominicontrol.py
CHANGED
|
@@ -106,9 +106,9 @@ def generate_image(
|
|
| 106 |
}[ratio]
|
| 107 |
|
| 108 |
|
| 109 |
-
width, height
|
| 110 |
-
width = int(
|
| 111 |
-
height = int(
|
| 112 |
|
| 113 |
|
| 114 |
print(
|
|
|
|
| 106 |
}[ratio]
|
| 107 |
|
| 108 |
|
| 109 |
+
output_factor = max(width, height) / max(original_width, original_height)
|
| 110 |
+
width = int(original_width * output_factor)
|
| 111 |
+
height = int(original_height * output_factor)
|
| 112 |
|
| 113 |
|
| 114 |
print(
|