From: Yuwono on
Say I have a three dimensional array 'A', contain an RGB image.
I 'imwrite' this array 'A' in JPG format, with quality = 100 (maximum), let's say it is saved in the name 'A.jpg'.
Then I 'imread' the picture 'A.jpg' and save it in 'A2' array.
If I 'imsubtract' array 'A' from 'A2', I can see from the result that their pixel's values are far different. Well not that far, but yeah they are different (in a range of 8 till 50 or so).

If I treat a grayscale image that way (from the 'imwrite' till the 'imsubtract' process) the difference won't be that far (just in a range of -1 til 1).

This does not happen in BMP, PNG, or TIF format. So I guess it's because of the JPEG compression effect.
But why the RGB image affected more?
Anybody can explain why?
Thank you very much...

Best regards