I wanted to try some simple file operations, and I started by opening and saving files (I use Python)
image = cv2.imread("image.png")
cv2.imwrite("image_processed.png", image)
After this operation, my original image33kB image is converted to the same 144kB image.
I tried to do something like this: http://opencv.itseez.com/modules/highgui/doc/reading_and_writing_images_and_video.html?highlight=imwrite#imwrite
params = list()
params.append(cv.CV_IMWRITE_PNG_COMPRESSION)
params.append(8)
image = cv2.imread("image.png")
cv2.imwrite("image_processed.png",image,params)
But that hasn’t changed much (the size has decreased to 132 KB)
This is the image I'm working with:

source
share