Fix color conversion and jpeg colorspace

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>