PIL: ValueError: unknown resampling filter, How to resize images uploaded on Flask?

前端 未结 2 1433
醉话见心
醉话见心 2021-02-19 05:28

I\'m making a web app using Flask, and I want to resize the images that are uploaded. I\'m using PIL to do this, but an error is thrown.

The process to do it is like thi

2条回答
  •  误落风尘
    2021-02-19 06:03

    The most important thing to remember is not to pass the size as object but as a tuple in resize function new_image = image.resize((img_width,img_size))

    and NOT AS

    new_image = image.resize(img_width,img_size)

提交回复
热议问题