下面两种方法都可以,读取一个图片然后保存到另外一个地方
f = open('C:\\Users\\del\\Desktop\\123.gif','rb') s = f.read() f.close() with open('C:\\Users\\del\\Desktop\\新建文件夹\\1.png','wb') as f: f.write(s)
==================================================================================
f = open('C:\\Users\\del\\Desktop\\123.gif','rb')
s = f.read()
f.close()
x = open('C:\\Users\\del\\Desktop\\新建文件夹\\1.png','wb')
x.write(s)