I wanted to try out some simple operations on files and I started with opening and saving files (I use Python)
image = cv2.imread(\"image.png\") cv2.imwrite(
You can use a third-party command line tool optipng to re-compress and shrink the png file size without losing anything.
Reference:
http://optipng.sourceforge.net/pngtech/optipng.html
https://github.com/johnpaulada/optipng