Fixing the Image.ANTIALIAS

#8
by multimodalart HF staff - opened
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)