convert stops at GS prompt

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
twodown
Posts: 5
Joined: 2016-11-17T19:04:14-07:00
Authentication code: 1151

convert stops at GS prompt

Post by twodown »

When I run convert against a pdf it is stopping at a Ghostscript prompt (GS>) When I run i with verbose it seems to be pulling correct delegate entry but not executing in the correct way, stops at a GS prompt. Works correctly on another machine. What does stopping at GS prompt indicate?

convert -verbose /tmp/CCMC.pdf -density 72 -auto-orient -resize "450x450>" /tmp/ImageMagickContentTransformerWorker_target_979552780204846943.png
"gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=/tmp/magick-23773eqjhLPZLdPuN%d" "-f/tmp/magick-237735LbgzE7CZxY5" "-f/tmp/magick-23773ypW2D4aBQpso"
GPL Ghostscript 8.64 (2009-02-03)
Copyright (C) 2009 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert stops at GS prompt

Post by snibgo »

Your version of GS (8.64) is very old. I suggest you upgrade it.

If that doesn't solve it, what version of IM are you running? If old, upgrade it.

If that doesn't solve it, please post your pdf file somewhere like dropbox.com and paste the URL here.
snibgo's IM pages: im.snibgo.com
twodown
Posts: 5
Joined: 2016-11-17T19:04:14-07:00
Authentication code: 1151

Re: convert stops at GS prompt

Post by twodown »

will upgrade GS, but with same version of ImageMagick and PDF this works fin on another machine/environment:

convert -verbose /home/test/CCMC.pdf -density 72 -auto-orient -resize "450x450>" /tmp/ImageMagickContentTransformerWorker_target_979552780204846943.png
"gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=/tmp/magick-13028bu5JnBmsJvuj%d" "-f/tmp/magick-13028e9YyY17KSpe8" "-f/tmp/magick-13028weQD1jmtioYW"
/tmp/magick-13028bu5JnBmsJvuj1 PNG 612x792 612x792+0+0 8-bit sRGB 99.8KB 0.000u 0:00.000
/tmp/magick-13028bu5JnBmsJvuj2 PNG 612x792 612x792+0+0 8-bit sRGB 78.1KB 0.000u 0:00.000
/home/michaelwallach/Desktop/CCMC.pdf[0] PDF 612x792 612x792+0+0 16-bit sRGB 99.8KB 0.000u 0:00.000
/home/test//CCMC.pdf[1] PDF 612x792 612x792+0+0 16-bit sRGB 99.8KB 0.000u 0:00.000
/home/test//CCMC.pdf=>/tmp/ImageMagickContentTransformerWorker_target_979552780204846943-0.png[0] PDF 612x792=>348x450 348x450+0+0 16-bit sRGB 264KB 0.000u 0:00.000
/home/test//CCMC.pdf=>/tmp/ImageMagickContentTransformerWorker_target_979552780204846943-1.png[1] PDF 612x792=>348x450 348x450+0+0 16-bit sRGB 230KB 0.000u 0:00.000
[testuser@localhost ~]$ gs -version
GPL Ghostscript 8.70 (2009-07-31)
Copyright (C) 2009 Artifex Software, Inc. All rights reserved.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert stops at GS prompt

Post by fmw42 »

Do you have the same versions of Ghostscript on both systems?

What do you get from each system when you type

convert -version
twodown
Posts: 5
Joined: 2016-11-17T19:04:14-07:00
Authentication code: 1151

Re: convert stops at GS prompt

Post by twodown »

Version: ImageMagick 6.9.1-10 Q16 x86_64 2015-08-12 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules
Delegates (built-in): freetype jng jpeg ltdl png tiff wmf

I'm not sure why ImageMagick is using different versions of ghostscript in diff environments. How does ImageMagick identify version of gs to use? Is it what resolved from PATH?
twodown
Posts: 5
Joined: 2016-11-17T19:04:14-07:00
Authentication code: 1151

Re: convert stops at GS prompt

Post by twodown »

obviously gs is not finding something it needs (or is not installed completely) because:

"gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=/tmp/magick-13028bu5JnBmsJvuj%d" "-f/tmp/magick-13028e9YyY17KSpe8" "-f/tmp/magick-13028weQD1jmtioYW"

works with both 8.64 & 8.7 of gs in working environment. Just not sure how to detect what is missing/corrupt
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert stops at GS prompt

Post by fmw42 »

Did you try upgrading Ghostscript as user snibgo suggested? What is your platform?

Try reinstalling GS (and upgrading) and then install IM again.
twodown
Posts: 5
Joined: 2016-11-17T19:04:14-07:00
Authentication code: 1151

Re: convert stops at GS prompt

Post by twodown »

Is there a way to see which delegate is actually being used (assuming one is)?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert stops at GS prompt

Post by fmw42 »

convert -verbose ...

Will show you which GS version is being used. Or will give an error message regarding GS

How do you know it is stopping at GS? All verbose tells you is that it is using GS unless there is an error message and I do not see one above.

What is your version libpng?

convert -list format

will tell you that and others (but not GS), e.g.


PNG* PNG rw- Portable Network Graphics (libpng 1.6.24)

You can find what version of GS is on your system via

gs --version

at least on unix systems.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert stops at GS prompt

Post by fmw42 »

I would concur with user snibgo. The best thing would be to upgrade ghostscript and then upgrade IM.
Post Reply