Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

JPG is a lossy file format, you will loose in image quality every time you save the image - even if normally it's not very visible for the human eye.

If you need a lossless format, use PNG or TIFF instead. It's easy, just change the file extension: use imwrite("test.png"); isntead of imwrite("test.jpg");