Back in November I posted a study of the effect of multiple rewrites on jpg files.
https://www.uglyhedgehog.com/t-672440-1.html#11714204One thing I tried to do was to produce a quantitative comparison of the original file to a jpg after multiple rewrites. I used the luminance of the image for the comparison, based on the square root of (R^2+G^2+B^2) where R,G, and B are the Red, Green, and Blue channels. I looked at both images and found the RMS difference between the luminance in the two images at each pixel. That gave me a number that I could use to express the change due to the jpg compression applied multiple times.
After thinking a bit about it, I realized that most of us don't have the computer skills to do that analysis and I don't have the skill to write a program that would be general enough that anyone could use it. So most people will have to stick with putting two images side by side and looking for differences. If you have a fast enough viewing program you can use a blink test, where you switch back and forth between two images and look for elements that blink, indicating a difference between the images. I use IrfanView for that, but that's Windows only so you Mac guys are left out there (although there may well be similar Mac software with which I am unfamiliar that would do the job).
Also, when looking at a multimegapixel image, it's hard, even with a blink test, to spot where the differences occur. Large areas of uniform color may show posterization, but more frequently in the images I used for testing, the large uniform areas appeared to be where the differences were insignificant. So I rewrote the comparison program to split the original image up into bits so I could get the RMS differences at different points in the image.
I took a test image and when calculating the luminance changes I stored the data in a 10 x 10 array based on the location of the comparison pixels. That gave me a rough map of differences so I would know where to look when doing a blink test. Preliminary results are shown below.
For those of you who might want to look for differences without numerical analysis, there is a test you can do in Photoshop or equivalent layer enabled software. Load the original and the multiply written copy into separate layers in Photoshop. Change the blending mode on the top layer to difference. That will give you an image showing the differences in individual pixels. You might have to increase the brightness of the image to see anything but you will probably find that the real differences lie on the edges in the images.
When you do that, you will see color information that I ignored in my original study. The luminance information is probably more important but it may be worth looking at the color differences too. I will take that as a future project.
The original test image I used was a tif file, which is too large to load on UHH. I put it on Dropbox at
https://www.dropbox.com/s/sms0w121z16lnid/Image2.tif?dl=0. Shown below are the jpg file after 40 rewrites and the map showing where the main differences lie. Black is no difference and red is maximum difference. The peak luminance in the image is about 440 and the RMS differences in the selected areas range from 4 to 15.
Also shown is an example of the Photoshop comparison. Note in the panel on the right that I have pumped up the brightness using levels. The white point is set at 5 instead of 255 so the brightness is increased by a factor of about 50.
.