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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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.ANTIALIAS).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
 
 
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