I'm resizing .png files with python's PIL. For some reason the file size is 3x times bigger than the original, even though I the resolution got reduced. So how do I save the file correctly?
Test1: png(6kb, 200x200) >> png(17kb, 100x100) <-- the one that concerns me
Test2: png(6.7mb, 3600x2025) >> png(7.0mb, 3555x2000)
Test3: png(6.7mb, 3600x2025) >> png(0.1mb, 355x200)
img = Image.open(file_path)
img = img.resize((100, 100), Image.ANTIALIAS)
img.save(file_path, optimize=True)
Current conclusion: It seems there is no big difference with large PNG's so I can move on with my program. Though it is still silly that the size increases.
The topic has almost been talked about:
How to reduce the image file size using PIL
how to reduce png image filesize in PIL