No Jpeg Compression Ghosting for Anaglyphs

Original image(Left)
Original image(Right)

Michael Koch suggested this method. Thanks Michael !

Standard Jpeg files are compressed in the YCbCr color-space which leads to ghosts caused by the compression method.
If we don't use CbCr sub-sampling, we can reduce the Jpeg compression ghosting, but it's not a perfect solution.
If we use the RGB color-space for the jpeg compression, there is no Jpeg compression-ghosting for anaglyphs.
SPM uses the RGB color-space if you check the 'No compression ghosting' option when saving a stereo image.

I compared three methods of Jpeg compression with the same-file-size image.
1. YCbCr color-space, CbCr color sub-sampling (Standard Jpeg compression)
2. YCbCr color-space, no color sub-sampling
3. RGB color space

File Size about 20KB
1.YCbCr color-space (Standard Jpeg compression)
-->
2.YCbCr color-space (no color subsampling)
-->
3.RGB color-space
-->



File Size about 30KB
1.YCbCr color-space (Standard Jpeg compression)
-->
2.YCbCr color-space (no color subsampling)
-->
3.RGB color-space
-->



File Size about 40KB
File Size about 40KB
1.YCbCr color-space (Standard Jpeg compression)
-->
2.YCbCr color-space (no color subsampling)
-->
3.RGB color-space
-->