Support » Plugin: PDF Thumbnails » CMYK PDF results in incorrect color conversion

  • Resolved johnny_n


    Hi @stianlik

    Great plugin, very useful for us! However, we’re having an issue where CMYK .pdfs aren’t generating accurate .jpegs — there are sometimes significant color shifts.

    Converting the .pdf to RGB first, then uploading it, does not result in any color shifts. But for a variety of reasons, it’s not possible for us to do this. The .pdfs need to remain in CMYK.

    It looks like the solution to the problem is to explicitly declare a CMYK color space before converting to JPEG:

    “It’s necessary because otherwise Ghostscript (before returning pam image to ImageMagick) will perform CMYK to CMYK convertion (assuming DeviceCMYK to be CIEbased CMYK), and you probably don’t want that, as colors will shift considerably.”

    Would it be possible for you to implement this extra command for CMYK images?

    All the best,

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author stianlik


    Thanks. I will look into it, do you have an example PDF that I can use for testing?

    Thank you! Absolutely, I will contact you via email to send you a link — I can’t make the .pdf link public. We can follow up in this thread.

    Plugin Author stianlik


    Thank you for the files. I was not able to see a significant change, but I did notice that one of the generated images was somewhat brighter than the original.

    I do not have much knowledge about color profiles and such, but I found a post that may be relevant: images and browser. The author suggests that the color space should be converted to from CMYK to RGB using an ICC profile from Adobe. I tested with RBG color profiles from Adobe, but the colors did not improve. This may be a long shot, but do you have an ICC profile that works well for the PDFs?

    Thanks Stian —

    Acrobat Pro tells me the profile of the files is ‘DeviceCMYK’ — which is maybe the problem based on the quote from Stackoverflow above.

    I don’t have a lot of experience in this either to be honest… but definitely saw much larger changes than you did. I will look into this more on my end and follow-up with you. We have a dev server which is setup quite differently than the production server.

    I will test these same files there, and see if perhaps it’s an issue with the version or build of ImageMagick on the production server.

    Stian is right – we have tested these same files on our development server and are getting results equal to Stian’s — in other words, very good.

    So it must be an issue with the ImageMagick/Ghostscript installation on the production server then. We will test this soon and will report back here in case anyone else has this issue.

    The plugin is working as it should.

    Plugin Author stianlik


    Thank you for looking into it. I’m marking this as resolved for now, but it would be great if you follow up with your results.

    This is the system I used for testing:

    Operating system
    lsb_release -a: Debian 7.8 (wheezy)

    phpinfo(): ImageMagick 6.7.7-10 2014-03-08 Q16

    gs --version: 9.05

    php -v: 5.4.39

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘CMYK PDF results in incorrect color conversion’ is closed to new replies.