I'm new to PIL library and have some problem.
base = Image.open('sam.bmp')
base.save(open('base.bmp', 'w'), 'BMP')
when I execute that block of code, saved image is distorted in some strange way.
As you can see, I'm not doing any transformations with the image - only load and save. Do you have any clue, why is it working that way?
正如Reti43所说,你只需要使用base.save('base.bmp')
This works :
base = Image.open('sam.bmp')
base.save('base.bmp')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.