Do JPEG recompressions degrade images?
Posted: 2009-11-21T10:15:14-07:00
I am running a simple Magick++ application that does the following:
- Create a sample 8x8 Image X1.
- Set X1 type to JPEG.
- Set X1 quality to 95.
- Save X1 to Blob B.
- Create Image X2 from B.
- Set X2 type to JPEG.
- Set X2 quality to 95.
- Save X2 to B.
- Create Image X3 from B.
For quite a few sample images, X2 and X3 turn out to be different.
For instance, starting from this sample image: , it takes some 25 iterations to get to a stable state where the source and the target images are identical.
It looks a bit strange to me that the JPEG compression and decompression algorithms should not be "symmetrical".
Maybe I have made a mistake in my application... or has anyone else come across these kinds of results?
- Create a sample 8x8 Image X1.
- Set X1 type to JPEG.
- Set X1 quality to 95.
- Save X1 to Blob B.
- Create Image X2 from B.
- Set X2 type to JPEG.
- Set X2 quality to 95.
- Save X2 to B.
- Create Image X3 from B.
For quite a few sample images, X2 and X3 turn out to be different.
For instance, starting from this sample image: , it takes some 25 iterations to get to a stable state where the source and the target images are identical.
It looks a bit strange to me that the JPEG compression and decompression algorithms should not be "symmetrical".
Maybe I have made a mistake in my application... or has anyone else come across these kinds of results?