multimodalart HF staff commited on
Commit
e66d8a6
1 Parent(s): ce98fc2

Fixing the Image.ANTIALIAS (#8)

Browse files

- Fixing the Image.ANTIALIAS (14ec86905acb72f0a0bd0785459299b4170ae362)

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -40,7 +40,7 @@ def inference(img,mode):
40
  basewidth = 256
41
  wpercent = (basewidth/float(img.size[0]))
42
  hsize = int((float(img.size[1])*float(wpercent)))
43
- img = img.resize((basewidth,hsize), Image.ANTIALIAS)
44
  img.save(INPUT_DIR + "1.jpg", "JPEG")
45
  if mode == "base":
46
  run_cmd("python inference_realesrgan.py -n RealESRGAN_x4plus -i "+ INPUT_DIR + " -o " + OUTPUT_DIR)
 
40
  basewidth = 256
41
  wpercent = (basewidth/float(img.size[0]))
42
  hsize = int((float(img.size[1])*float(wpercent)))
43
+ img = img.resize((basewidth,hsize), Image.LANCZOS)
44
  img.save(INPUT_DIR + "1.jpg", "JPEG")
45
  if mode == "base":
46
  run_cmd("python inference_realesrgan.py -n RealESRGAN_x4plus -i "+ INPUT_DIR + " -o " + OUTPUT_DIR)