Hopding / pdf-lib

Create and modify PDF documents in any JavaScript environment
https://pdf-lib.js.org
MIT License
6.68k stars 644 forks source link

JPG images with embedded CMYK profile show inverted in Illustrator #784

Open adriaanmeuris opened 3 years ago

adriaanmeuris commented 3 years ago

Hi, first of all let me say I'm impressed with this library and all functionalities it offers. Looks like a very promising replacement package for pdfkit!

I've noticed an issue with JPG files with an embedded color profile, they are rendered inverted in Adobe Illustrator. After some digging through the issues/pr's, I used the "after" PDF found in this PR https://github.com/Hopding/pdf-lib/pull/415.

Illustrator

Screen Shot 2021-02-01 at 16 31 33

Did some digging in and the source image has the U.S. Web Coated (SWOP) v2 profile embedded:

embedded-profile

I'm not sure why this happened but I replaced the image in Illustrator with the original one and exported to a new PDF (out-new.pdf) which renders fine.

Any idea what might cause this issue?

septem1997 commented 3 months ago

same issue, any news?