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

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
mmlenz
Posts: 23
Joined: 2012-05-30T08:08:21-07:00
Authentication code: 13

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

Post 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?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
mmlenz
Posts: 23
Joined: 2012-05-30T08:08:21-07:00
Authentication code: 13

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

Post by mmlenz »

IM uses GS if its available regardless. But what exactly does --with-gslib actually do? Because GS works with IM either way.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post by fmw42 »

I have no idea. I have it in my configuration, because at one time it did not work without it.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
mmlenz
Posts: 23
Joined: 2012-05-30T08:08:21-07:00
Authentication code: 13

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

Post 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 :)
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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?
mmlenz
Posts: 23
Joined: 2012-05-30T08:08:21-07:00
Authentication code: 13

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

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
mmlenz
Posts: 23
Joined: 2012-05-30T08:08:21-07:00
Authentication code: 13

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

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
Post Reply