Page 1 of 1

Problem preserving Gradient when converting .PDF to .jpg

Posted: 2014-10-28T14:11:03-07:00
by Mavent
I run a website for a printer. I'm trying to create an automated Proofing system for them, but it's difficult because I just can't get IM to maintain gradients and color spaces. Here's an example of what I'm facing. The client uploaded a .pdf, and I had to convert it to .jpg for the Proof system. Unfortunately, it shifted the colors, and even worse, completely flattened the gradient:

Image


And there's the file itself: https://www.dropbox.com/s/l4i74jwt5yoks ... 4.pdf?dl=0

Anyone have any idea on how I can avoid this?
Thanks!

Re: Problem preserving Gradient when converting .PDF to .jpg

Posted: 2014-10-28T14:22:04-07:00
by snibgo
It would help if you provided the actual files, not screenshots.

But I will hazard a guess that the gradient comes from transparency. JPGs can't contain transparency, so the alpha channel is ignored. If you flatten the image against white, the gradation may be okay.

Re: Problem preserving Gradient when converting .PDF to .jpg

Posted: 2014-10-28T14:29:01-07:00
by Mavent
https://www.dropbox.com/s/l4i74jwt5yoks ... 4.pdf?dl=0

This is a dropbox link to the actual file. I opened it on Photoshop, and there is indeed a massive transparency. However, I've attempted to flatten it against a white background, and I'm still getting the same "flat blue" results. I'm obviously doing something wrong, but I can't figure out what it is.

EDIT: A developer friend of mine is telling me that there's a bug in the latest IM build that causes this problem. Does anyone know if this is true or not? :D

Re: Problem preserving Gradient when converting .PDF to .jpg

Posted: 2014-10-28T15:03:50-07:00
by Bonzo
EDIT: A developer friend of mine is telling me that there's a bug in the latest IM build that causes this problem. Does anyone know if this is true or not?
What bug, has it been reported? Usually if there is a bug like that the developers get right onto it but only if they know about it.

What version are you running?

I tried converting the file to a png and jpg and the transparency was white but it was not like your original gradient; but better than your result.
It had a darker blue line across the top and the gradient ended sooner.
Version 6.8.8

Re: Problem preserving Gradient when converting .PDF to .jpg

Posted: 2014-10-28T15:45:25-07:00
by snibgo
With IM v6.8.9-5 with Ghostscript v9.15, it converts fine for me. Mavent: if your versions are old, an update is needed, especially Ghostscript. (GS 9.10 gives results as Bonzo describes.)

Re: Problem preserving Gradient when converting .PDF to .jpg

Posted: 2014-10-28T17:30:45-07:00
by fmw42
On my Mac, I can find the version of GS by typing in the terminal window the following:

gs --version
9.10

For IM version

convert -version


Some other delegate versions can be found by

convert -list format


You should always provide your IM version and platform when asking questions.