Created attachment 126243 [details]
Patch fixing the bug
We've been carrying this patch downstream for quite a while, and we
have decided to try and get it integrated upstream since it seems
pretty generally useful. It applies cleanly against git "master".
Adobe PhotoShop generates CMYK JPEG files with inverted CMYK. When a
JPEG file with this format is included in a PDF file, a `/Decode`
array must be included to convert to "normal" CMYK.
These JPEG files can be detected via the presence of the APP14 "Adobe"
marker. However, PDF viewers are not required to detect and handle
this private marker, so it must be detected and handled (by adding a
`/Decode`) by the PDF generator.
*** Bug 93031 has been marked as a duplicate of this bug. ***