Page 1 of 1

building --with-gslib what does this actually accomplish?

Posted: 2012-06-14T09:09:48-07:00
by mmlenz
I thought originally that it allowed IM to process PDF documents without launching the 'gs' command but I've noticed that on the debian/ubuntu distributed packages (which I'm sure use --with-gslib during their builds because they have deps on gslib) I still see a 'gs' process when working with PDF docs. Any insights?

Re: building --with-gslib what does this actually accomplish

Posted: 2012-06-14T09:36:04-07:00
by fmw42
IM uses GS to process PDF and PS files. So you have to have it installed for IM to use. Otherwise, just use gs as a standalone.

Re: building --with-gslib what does this actually accomplish

Posted: 2012-06-14T09:38:36-07:00
by mmlenz
IM uses GS if its available regardless. But what exactly does --with-gslib actually do? Because GS works with IM either way.

Re: building --with-gslib what does this actually accomplish

Posted: 2012-06-14T10:03:14-07:00
by fmw42
I have no idea. I have it in my configuration, because at one time it did not work without it.

Re: building --with-gslib what does this actually accomplish

Posted: 2012-06-14T16:42:34-07:00
by anthony
I believe if the GS library is available it with try to use the API library rather than the GS command.

This is a guess on my part though.

Re: building --with-gslib what does this actually accomplish

Posted: 2012-06-14T18:29:10-07:00
by magick
ImageMagick utilizes Ghostscript to interpret Postscript and PDF. If ImageMagick does not use the Ghostscript delegate library, its utilizes the gs program. The start-up time for a shared library may be less than that of a command-line executable. Some users may redistribute ImageMagick and may want to include the Ghostscript library rather than depend on an external program.

Re: building --with-gslib what does this actually accomplish

Posted: 2012-06-14T19:12:49-07:00
by mmlenz
Has there ever been discussion of switching to poppler? It is surprisingly fast and renders pdfs very well. Unfortunately it's completely undocumented :)

Re: building --with-gslib what does this actually accomplish

Posted: 2012-06-14T20:37:49-07:00
by anthony
Perhaps you like to try and create a delegate for a poppler utility, and publish it here.
Users can add delegates using the ".magick/delegate.xml file from their UNIX home.

See Delegates
http://www.imagemagick.org/Usage/files/#delegates

Some postscript delegate changes are shown in
http://www.imagemagick.org/Usage/formats/#ps

But no alternative input delegates as yet.

Re: building --with-gslib what does this actually accomplish

Posted: 2012-06-15T05:26:11-07:00
by magick
Can poppler render a CMYK image? Also, it looks like you need to use Ghostscript to convert Postscript to PDF before it could be rendered by poppler. Is poppler cross-platform, does it run under Windows, Linux, and Mac?

Re: building --with-gslib what does this actually accomplish

Posted: 2012-06-15T06:57:04-07:00
by mmlenz
anthony wrote:Perhaps you like to try and create a delegate for a poppler utility, and publish it here.
Users can add delegates using the ".magick/delegate.xml file from their UNIX home.

See Delegates
http://www.imagemagick.org/Usage/files/#delegates

Some postscript delegate changes are shown in
http://www.imagemagick.org/Usage/formats/#ps

But no alternative input delegates as yet.
That is a good suggestion. Thanks.

Just out of curiosity have any of you guys tried poppler 0.20 with pdfs? The resulting image quality and speed at which it works on pdfs is frightening compared to ghostscript. No messing with density, eating tons of memory etc with poppler. It "just works" and fast.

Re: building --with-gslib what does this actually accomplish

Posted: 2012-06-15T07:33:19-07:00
by magick
Fast is good but it does not meet our requirements of supporting CMYK. If the original PDF is in the CMYK colorspace, our users expect a CMYK image.

Re: building --with-gslib what does this actually accomplish

Posted: 2012-06-15T08:05:49-07:00
by mmlenz
Where did you see it doesn't support CMYK? I see multiple references to poppler and CMYK with a google search. Then again you guys are the image experts, I'm just a user/developer.

Re: building --with-gslib what does this actually accomplish

Posted: 2012-06-15T09:01:25-07:00
by magick
It interprets CMYK but we can't find a way to output CMYK. A cairo surface is a common renderer for poppler, and cairo only supports RGBA. If you find a way for poppler to export CMYK PDF's as CMYK pixels, let us know.