I=imread('lena.jpg');
imwrite(I,'new_lena.jpg','Quality',100);
I1=imread('new_lena.png');
As per imwrite documentation ('Quality',100) pair means no compression but I get a psnr around 59. I expect psnr value = inf. Can anyone explain why and if I am doing something wrong either writing or reading the image?