使用Python PIL /枕头调整图像大小时出现问题

问题描述

我已经通过Image.fromarray方法将数据数组读入了枕头。虽然我可以将其放入枕头中并将其成功粘贴到内存中的另一张图像上,但是img.resize((1920,1080))img,thumbnail((1920,1080))无效(也没有错误)。

解决方法

这是因为此操作将创建受相应转换影响的副本。您尝试过img = img.resize((1920,1080))吗?

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...