概述
# get data from old image (as you already did) data = list(oldimg.getdata()) # create empty new image of appropriate format newimg = Image.new(format,size) # e.g. ('RGB',(640,480)) # insert saved data into the image newimg.putdata(data)
总结
以上是编程之家为你收集整理的如何在PIL / Python中构建图像对象全部内容,希望文章能够帮你解决如何在PIL / Python中构建图像对象所遇到的程序开发问题。
如果您也喜欢它,动动您的小指点个赞吧