ap2010
ap2010

Reputation: 29

PDF to JPEG conversion using Ghostscript - Not Proper

I am trying to convert following PDF to JPEG using Ghostscript 9.14.

PDF - https://drive.google.com/file/d/0B1LA_arF4NqmWlFKbGpxTnItdFE/view

Command:

gswin64 -sDEVICE=jpeg -r600x600 -dUseCIEColor=true -sOutputFile=e:\\Watch.jpg ^
        -dBATCH -dNOPAUSE e:\\Watch.pdf

Output JPEG is missing few colors from original PDF - especially the shiny gold colors in upper watch band and dial is not coming proper.

Can someone please guide me the correct parameter from Ghostscript that will resolve this?

Upvotes: 2

Views: 2739

Answers (2)

Kurt Pfeifle
Kurt Pfeifle

Reputation: 90295

You convert PDF to JPEG and expect the colors to be preserved?

Forget it!

Why? JPEG is a "lossy" format. It will (almost) never preserve the original colors. It can only "almost-preserve" colors if you apply color management methods (which involves the use of correct ICC color profiles matching your hardware) to your workflow. But JPEG output will be lossy anyway, leading to some typical artifacts occuring very visibly around sharp edges.

If you want a better image format, use PNG output. But also do apply color management when converting...


A few additional hints, about how you may be able to improve output:

  1. Add -dJPEGQ=95 to your command line parameters. This will set the default JPEG quality to 95% and reduce the JPEG artifacts.

  2. Use -sDEVICE=jpegcmyk in case your PDF used CMYK color space. Because -sDEVICE=jpeg uses RGB color space, this would minimize all color changes which were due to the CMYK->RGB transformation.

I also noticed (from running pdfinfo -meta on your PDF) that the PDF may be using Pantone colors -- specifically: PANTONE Warm Gray 11, PANTONE Cool Gray 2 and PANTONE 200 C.

Upvotes: 1

KenS
KenS

Reputation: 31199

This has already been raised as a bug report at:

http://bugs.ghostscript.com/show_bug.cgi?id=695975

I very much doubt if asking questions here is going to get you an answer.

Upvotes: 1

Related Questions