fix image resize
Browse files
app.py
CHANGED
@@ -45,7 +45,7 @@ def query_image(img):
|
|
45 |
return None
|
46 |
|
47 |
img = Image.fromarray(img)
|
48 |
-
scale = 1024 /
|
49 |
img = img.resize(
|
50 |
(int(img.size[0] * scale), int(img.size[1] * scale)), Image.LANCZOS
|
51 |
)
|
|
|
45 |
return None
|
46 |
|
47 |
img = Image.fromarray(img)
|
48 |
+
scale = 1024 / max(img.size)
|
49 |
img = img.resize(
|
50 |
(int(img.size[0] * scale), int(img.size[1] * scale)), Image.LANCZOS
|
51 |
)
|