Converting CMYK PDF to sRGB PNG
Posted: 2019-09-23T23:16:50-07:00
Hi all,
I use to be able to run a command like this using ImageMagick 6.x to convert a CMYK PDF to a PNG image:
This could be combined with -resize to give me a nice thumbnail of a PDF. In ImageMagick 7 (v7.0.7-34, using GhostScript 9.26), I instead get an error that looks like this:
If I remove "-colorspace sRGB" it completes successfully, but of course the colours in the output are all wonky. Does anyone know what's going on here? Is there another way I should now be doing this in ImageMagick 7? I've already spent hours on this.
I use to be able to run a command like this using ImageMagick 6.x to convert a CMYK PDF to a PNG image:
Code: Select all
magick -colorspace sRGB input.pdf output.png
Code: Select all
magick: FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' -dFirstPage=1 -dLastPage=1 '-sOutputFile=/tmp/magick-14647WacR78O8Ph1%d' '-f/tmp/magick-1464d2IonIEo0TJ4' '-f/tmp/magick-1464o76XGjKsznc8'' (-1) @ error/delegate.c/ExternalDelegateCommand/462.