Issue with image colors when converting to PDF
Discussed in https://github.com/prawnpdf/prawn/discussions/1310
Originally posted by HAWAWINI September 11, 2023 Hi everyone,
I have an issue with some images when putting an image from Active Storage to Prawn PDF. Apparently the colors are different and as i'm generating PDF for an ART gallery, they are not happy with the results. Here is an example of the problem :
Original Image
Thank you in advance for your help
My guess would be the color profile is ignored. Unfortunately, Prawn currently doesn't support color profiles (either for images or for the whole document) and as far as I can tell, there's no workaround. You'd have to either extend JPG/PNG image support to add color profile support, or dive deep into PDF spec to manually add color profile to you documents (hint: there are PRs that try to add document color profile support, search for PDF/A).