Fixes decoding for CMYK jpegs.
Merge pull request #5414 from yurydelendik/bug1072164

Fixes decoding for CMYK jpegs.