Since Pillow==6.0, when doing this:
pillow_image.save(
file_path,
dpi=(812.8, 812.8)
)
the resolution of the of the saved file is (813, 813), even if the dpi value is a PIL.TiffImagePlugin.IFDRational object. (I use Photoshop CS6 to check the resolution)
before 6.0 it was (812.8, 812.8).
I've found that using the resolution argument solve this issue but then the img.info is a bit weird as it gives two different values for the resolution and dpi
{'dpi': (813, 813), 'resolution': (812.8000797477443, 812.8000797477443)}
Since
Pillow==6.0, when doing this:the resolution of the of the saved file is
(813, 813), even if the dpi value is aPIL.TiffImagePlugin.IFDRationalobject. (I use Photoshop CS6 to check the resolution)before
6.0it was(812.8, 812.8).I've found that using the
resolutionargument solve this issue but then theimg.infois a bit weird as it gives two different values for the resolution and dpi{'dpi': (813, 813), 'resolution': (812.8000797477443, 812.8000797477443)}