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(
As hinted by ypnos, your source file is jpg (even if it has the png extension). That is why, when you save it in png format, it will use more space, as you are changing the format (jpg to png).
Try replacing the last line with:
cv2.imwrite("image_processed.jpg",image,params)
And you will see that the size doesn't change that much.
Alternatively, keep the code as it is, but use a different image, such as http://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png