Convert vector image to jpeg directly using gs -sDEVICE=jpeg

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
stefandlt
Posts: 2
Joined: 2016-12-12T08:33:07-07:00
Authentication code: 1151

Convert vector image to jpeg directly using gs -sDEVICE=jpeg

Post by stefandlt »

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:

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""/>
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?
Post Reply