title: Best way to produce 'colour correct' raster from a PDF or PS with ghostscript
body: <p>What is the best way to produce colour correct raster files with ghostscript?</p>
  
  <p>The various ways that ColorConversionStrategy, UseCIEColour and ICC profiles interact is not that obvious, and its quite easy to produce images that are way off in terms of colour.</p>
  
  <p>So far the below command is the best that I've managed, but its still produces slightly different hues for our test files when compared against previewing in Acrobat Pro and I'm wondering if anyone has a more 'scientific' answer.
  Cheers!</p>
  
  <pre><code>./software/ghostscript-9.04/bin/gs -sOutputICCProfile=./profiles/sRGB.icc    -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -r94  -dUseCropBox -dEPSCrop -dMaxBitmap=50000000 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dAlignToPixels=0 -dGridFitTT=0 -dPrinted=false -dLastPage=1 -sDEVICE=jpeg -sOutputFile=/dev/stdout imm.pdf  &gt; imm.jpg
  </code></pre>