Adds color components decoding to the JPEG

Fixes #4883