Convert vector image to jpeg directly using gs -sDEVICE=jpeg
Posted: 2016-12-16T07:15:55-07:00
My requirement is that I have to convert a lot of CMYK vector images (pdf, ai, eps ) to a well defined jpg format (RGB, 1600 width, jpegquality 100).
By default IM does this by using the delegate "ps:cmyk" , which runs ghostscript to convert to -sDEVICE=pamcmyk32, creating a gigantic bitmap . This result is then processed to jpeg.
Now, what I would like to do is that IM will use ghoscript with the sDEVICE=jpeg directly, that will be a lot more efficient. I think this can be done by configuring delegates.xml . But I can t find any documentation on how to do this.
My current attempt looks like this in delegates.xml. It is for EPS:
But when i convert an eps with the -verbose option I can see that IM is still using the delegate configuration with the -sDEVICE=pamcmyk32 .
How can I configure delegates.xml to use the -sDEVICE=jpeg when converting from eps to jpeg?
By default IM does this by using the delegate "ps:cmyk" , which runs ghostscript to convert to -sDEVICE=pamcmyk32, creating a gigantic bitmap . This result is then processed to jpeg.
Now, what I would like to do is that IM will use ghoscript with the sDEVICE=jpeg directly, that will be a lot more efficient. I think this can be done by configuring delegates.xml . But I can t find any documentation on how to do this.
My current attempt looks like this in delegates.xml. It is for EPS:
Code: Select all
<delegate decode="eps" encode="jpeg" command=""gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -sDEVICE=jpeg -dEPSFitPage "-sOutputFile=%o" "-f%i""/>
How can I configure delegates.xml to use the -sDEVICE=jpeg when converting from eps to jpeg?