Parthjain9925 commited on
Commit
d6c0673
·
verified ·
1 Parent(s): a892bdd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -39,7 +39,7 @@ def imageprepare(argv,Single):
39
  if (nheight == 0): # rare case but minimum is 1 pixel
40
  nheight = 1
41
  # resize and sharpen
42
- img = im.resize((20, nheight), Image.ANTIALIAS).filter(ImageFilter.SHARPEN)
43
  wtop = int(round(((28 - nheight) / 2), 0)) # calculate horizontal position
44
  newImage.paste(img, (4, wtop)) # paste resized image on white canvas
45
  else:
 
39
  if (nheight == 0): # rare case but minimum is 1 pixel
40
  nheight = 1
41
  # resize and sharpen
42
+ img = im.resize((20, nheight), Image.Resampling.LANCZOS).filter(ImageFilter.SHARPEN)
43
  wtop = int(round(((28 - nheight) / 2), 0)) # calculate horizontal position
44
  newImage.paste(img, (4, wtop)) # paste resized image on white canvas
45
  else: