Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,7 +48,7 @@ def imageprepare(argv,Single):
|
|
| 48 |
if (nwidth == 0): # rare case but minimum is 1 pixel
|
| 49 |
nwidth = 1
|
| 50 |
# resize and sharpen
|
| 51 |
-
img = im.resize((nwidth, 20), Image.
|
| 52 |
wleft = int(round(((28 - nwidth) / 2), 0)) # caculate vertical pozition
|
| 53 |
newImage.paste(img, (wleft, 4)) # paste resized image on white canvas
|
| 54 |
|
|
|
|
| 48 |
if (nwidth == 0): # rare case but minimum is 1 pixel
|
| 49 |
nwidth = 1
|
| 50 |
# resize and sharpen
|
| 51 |
+
img = im.resize((nwidth, 20), Image.Resampling.LANCZOS).filter(ImageFilter.SHARPEN)
|
| 52 |
wleft = int(round(((28 - nwidth) / 2), 0)) # caculate vertical pozition
|
| 53 |
newImage.paste(img, (wleft, 4)) # paste resized image on white canvas
|
| 54 |
|