Hello guys,
I'm stuck trying to convert PDF to JPG files.
The issue is, that the (light) yellow color on the PDF's first page becomes (light) green on exported JPGs.
When I export the PDF as JPG from Adobe Acrobat, (applying sRGB IEC61966-2.1 profile) it looks fine.
But I need to do that on the ImageMagick's side.
I blindly tried few Color Profiles (eg. sRGB_v4_ICC_preference.icc, AdobeRGB1998.icc), but nothing help.
Do you know what might be wrong?
Used cmd: convert -verbose -density 72 -profile AdobeRGB1998.icc -quality 100 file.pdf file.jpg
PDF file: http://46.41.130.153/pdf/file.pdf
JPG exported from Adobe Acrobat: http://46.41.130.153/pdf/adobe.jpg
JPG exported from ImageMagick: http://46.41.130.153/pdf/convert.jpg
Issue: convert PDF to JPG - Yellow color becomes Green
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Issue: convert PDF to JPG - Yellow color becomes Green
For starters, try the command in the correct order: read the input, process it, and write it:
But what are you trying to do with colour profiles? Converting the PDF to PNG, with no profiles:
... then viewing the PDF in Adobe Reader, and the PNG in MS Photo Viewer, they look the same to me.
IM v6.9.1-0 on Windows 8.1.
Code: Select all
convert -verbose -density 72 file.pdf -profile AdobeRGB1998.icc -quality 100 file.jpg
Code: Select all
convert file.pdf m.png
IM v6.9.1-0 on Windows 8.1.
snibgo's IM pages: im.snibgo.com
Re: Issue: convert PDF to JPG - Yellow color becomes Green
Thank you for your reply, but it doesn't solve my issue.
When I do:
It generates JPGs, but with wrong color (same as before - the yellow becomes green).
The same result with PNG:
I tried:
ImageMagick 6.6.9-7 under Ubuntu 12
ImageMagick 6.7.7-10 under Debian 7
When I do:
Code: Select all
convert -verbose -density 72 file.pdf -profile AdobeRGB1998.icc -quality 100 file.jpg
The same result with PNG:
Code: Select all
convert file.pdf m.png
I tried:
ImageMagick 6.6.9-7 under Ubuntu 12
ImageMagick 6.7.7-10 under Debian 7
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Issue: convert PDF to JPG - Yellow color becomes Green
Code: Select all
convert file.pdf m.png
You are using very old versions of IM. If you don't get #ffff98, upgrading might fix the problem.
If you assign a profile, you will correctly get a different colour. Why do you want to asign the AdobeRGB1998 profile?
snibgo's IM pages: im.snibgo.com
Re: Issue: convert PDF to JPG - Yellow color becomes Green
Thank you for your assistance.
I've found a sollution.
ImageMagick was installed from the latest server's repository,
but even when I installed the latest ImageMagick (6.9.1-2) based on http://www.imagemagick.org/script/install-source.php,
the result was the same.
The issue was an old GhostScript version:
# gs --version
I upgraded it to the latest one:
9.16
But then another issue appeared:
alpha / transparency was converted to black,
so I had the right color, but most of the area was black.
The sollution for it was to use: -alpha remove
So the final cmd is:
I'm happy I've found a sollution,
thank you for your replies
and I hope it will help someone else.
Best regards!
I've found a sollution.
ImageMagick was installed from the latest server's repository,
but even when I installed the latest ImageMagick (6.9.1-2) based on http://www.imagemagick.org/script/install-source.php,
the result was the same.
The issue was an old GhostScript version:
# gs --version
Code: Select all
9.05
9.16
But then another issue appeared:
alpha / transparency was converted to black,
so I had the right color, but most of the area was black.
The sollution for it was to use: -alpha remove
So the final cmd is:
Code: Select all
convert -verbose file.pdf -alpha remove jpg/file.jpg
I'm happy I've found a sollution,
thank you for your replies
and I hope it will help someone else.
Best regards!
Re: Issue: convert PDF to JPG - Yellow color becomes Green
Thanks for getting back with the answer quaker.