pyvips
pyvips copied to clipboard
Simply opening a photo and saving it doubles the file size with Q=100
As the title says, simply doing this:
file = open(sys.argv[1], mode="rb")
image = pyvips.Image.new_from_buffer(file.read(), options="", access="sequential", autorotate=True)
image.write_to_file("applied_layer.jpg", Q=100)
Results in a photo being double the size. 1.8MB results in 3.6MB. I've tested this with 3 photos taken with different DSLR cameras and they all reproduce.
My code actually adds a watermark to the photo, so I don't want to have so much extra storage, but I don't want to lose any photo quality.
Could anyone help me with this? I uploaded a sample photo but I am not sure if github will save it properly to reproduce the issue Thanks