FLX
FLX

Reputation: 2679

Ghostscript pdf to jpg windows/linux color differences

I'm coding a function using ghostscript to convert a multipages PDF into one JPG per page.

Everything works fine on windows with ghostcript 9.05 and WAMP Server.

The problem is that I have differences between WAMP and my linux server (1&1 Hosting) :

The command is working : i can convert pdf to jpg, but problem : colors are totally over-saturated.

I tried the option -dUseCIEColor : colors are now fine, except for dark background who are now gray / lighter.

Why these differences ? I used same version on windows and linux.

I heard about ICC color profiles, but i don't know if its the good way because i use default.

If someone have informations... Thanks

Or, if you know a good alternative to ghostscript to convert PDF into JPG...

Here is the command I'm using :

$ghostscriptCommand="gs -dUseCIEColor -dSAFER -dBATCH -dNOPAUSE -dPDFSETTINGS=/screen -sDEVICE=jpeg -dJPEGQ=60 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r144 -sOutputFile=$dir/p%03d.jpg $pdfFile"; exec($ghostscriptCommand);

Upvotes: 2

Views: 1107

Answers (1)

chrisl
chrisl

Reputation: 491

Having dicussed this on the Ghostscript IRC channel, the problem is that the Linux server is running Ghostscript 8.71, rather than 9.05 - the 9.xx versions introduced an entirely new color workflow, based on ICC profiles.

The only realistic solution is to update the Linux server to 9.05.

Upvotes: 2

Related Questions