cday wrote: ↑Sat Jan 23, 2021 10:16 am
So, if an image were to be opened and then resaved repeatedly, what would you expect the final 'quality' to be if a file with initial Q = 80 is resaved ten times:
0.80 * 0.80 * 0.80 * 0.80 * 0.80 * 0.80 * 0.80 * 0.80 * 0.80 * 0.80 * 0.80 = 0.107 ?
I have now performed a test to find the answer: I selected an image having a high level of detail, in particular straight edges that would be most likely to reveal the predicted loss of detail after being resaved many times, a clock face.
I first saved a downloaded clock face image in XnView MP at Q=80, then used a batch file to save the resulting image to a new file, then saved the resulting image to a further image, and so on until the original high quality image had been resaved a total of 10 times. All saves were made at Q=80 as above, using the following code:
Code: Select all
nconvert.exe -out jpeg -q 80 -o S1.jpg S0.jpg
nconvert.exe -out jpeg -q 80 -o S2.jpg S1.jpg
nconvert.exe -out jpeg -q 80 -o S3.jpg S2.jpg
nconvert.exe -out jpeg -q 80 -o S4.jpg S3.jpg
nconvert.exe -out jpeg -q 80 -o S5.jpg S4.jpg
nconvert.exe -out jpeg -q 80 -o S6.jpg S5.jpg
nconvert.exe -out jpeg -q 80 -o S7.jpg S6.jpg
nconvert.exe -out jpeg -q 80 -o S8.jpg S7.jpg
nconvert.exe -out jpeg -q 80 -o S9.jpg S8.jpg
nconvert.exe -out jpeg -q 80 -o S10.jpg S9.jpg
It would be expected from the discussion above that an image resaved 10 times would show a substantial loss of quality, the calculated Q=0.107 value would be a very
low quality setting, so how did the final image compare with the original image? Was there indeed a substantial loss of quality?
The image below s0 is the original image that was resaved 10 times:
The image below s10 is the same image after being resaved 10 times at Q=80:
Compare the two images, is the lower image obviously quite unusable as predicted? For easier comparison, save each image, and then open the two images in adjacent tabs in XnView MP. Then if you like, zoom in and lock the zoom in each image for a really close comparison.
Zooming in, it is possible to see some slight
loss of quality, but doesn't the image above remain quite usable for any reasonable purpose?
Details of the two images are: Width 1789px, Height 1752px, DPI 240 x 240, Sub-sampling 2x2, 1x1, 1x1 and 'Estimated quality' 80.
Those file properties are as displayed in XnView MP 'File information', which displayed the second image as still having Q=80...
Although the original file was selected for its high level of detail, the reasonably large image pixel dimensions are probably favourable for maintaining quality. A slight improvement in the output image quality might be expected if sub-sampling 2x2, 1x1, 1x1 were used. File size was very slightly decreased by the first save. The fact that all saves were made using the same software is probably relevant, in this case NConvert.