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.
original image:
opened and saved image:
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?
As Reti43 said, You just need to use base.save('base.bmp')
This works :
base = Image.open('sam.bmp')
base.save('base.bmp')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With