python图像抠取处置
python图像抠取处理Python coderesultc.makeChart(os.getcwd()+/img/+filename)import pdbpdb.set_tra
python图像抠取处理
Python code result=c.makeChart(os.getcwd()+'/img/'+filename) import pdb;pdb.set_trace() print result img=Image.open(os.getcwd()+'/UI/img/'+filename) last=(0,0,500,250) region=(0,250,500,500) region=img.crop(region) img.paste(region,last) img.show()
问题是paste后原始的图像没有变?怎么让原始的图像也改变.??
[解决办法]img.save()
[解决办法]貌似paste是返回新图像,不是就地修改,所以...
img = img.paste(region,last)
[解决办法]