Color space - RGB and YCbCr question
- by HardCoder1986
Hello!
I am now trying to understand how JPEG encoding works and everything seems fine except the color transformation part.
Before attempting to do a DCT in JPEG algorithm, the image is transformed into YCbCr color space. To me this essentially means that we just (comparing to initial RGB image) take a chunk of color information and dispose it while applying the RGB -> YCbCr transformation.
So, our encoding steps look generally like RGB -> YCbCr -> DCT -> Huffman. The decoding means inversing this process.
And my question is - why does the image (for example, created and exported to JPEG) remain the same in terms of color, although we have to make inverse YCbCr -> RGB transform. Where does the disposed part of color information comes from or how is it handled?