0

For an online design application I'm using Ghostscript to convert some kind of files into PNG and/or PDF (depending on user request). Consider this EPS file: http://designer.realtimedesigner.com/images/1/cliparts/99010.eps

With GS 8.70 I used to convert it to PNG this way:

gs -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sDEVICE=pngalpha -dEPSCrop -sOutputFile=./result.png -r458 ./99010.eps

I noticed 8.70 has some bugs when the resolution is higher, which may happen in my application. So I gave GS 9.06 (latest version) a try. However, by using the very same command, the output is different.

With 8.70 the main rasterized color is a pure RGB black (0,0,0), while with 9.06 it's 35,31,32. This is a problem for me, because for some specifics of my application I need the RGB values to be exactly the same for further processing. I cannot understand while there's this difference between the versions, perhaps I'm missing some option that could be set in 9.06?

My goal, at the end, is to rasterize EPS files to PNG via GS 9.06 with colors converted to same RGB values as of 8.70.

Thanks in advance for any help/suggestion you may provide.

zessx
  • 68,042
  • 28
  • 135
  • 158

1 Answers1

1

9.06 uses a colour management engine (in fact the whole 9.x series does). To control this you need to supply ICC profiles which determine the mapping between the input and the output, there is more information in the documentation.

In the short term you could use -dUseFastColor, but if you care about colour reproduction, you should investigate the colour management more thoroughly.

KenS
  • 30,202
  • 3
  • 34
  • 51
  • This is interesting. Will explore this solution very soon and will post again when I'll have some result in case everyone else will be looking to solve the same problem – user1632719 Aug 29 '12 at 14:52