new to convert - have error message

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?".
Posts: 1
Joined: 2019-08-22T19:55:39-07:00
Authentication code: 1152

new to convert - have error message

Post by waltpacz »

I'm new to Imagemagick (just downloaded and installed) and using convert so my question is very basic. I have a pdf file (exportTest.pdf) with an image I'd like to convert to a png file. The pdf is in my c:\temp directory. I used the following command from a Windows 10 command prompt from the c:\temp directory:

magick exportTest.pdf exportTest.png

I got the following error message:

magick: FailedToExecuteCommand `"gswin32c.exe" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=C:/Users/Owner.000/AppData/Local/Temp/magick-22300OYtljMR33aOt%d" "-fC:/Users/Owner.000/AppData/Local/Temp/magick-22300ZrqnQA9LzZdj" "-fC:/Users/Owner.000/AppData/Local/Temp/magick-22300yUAqL3SgioWw"' (The system cannot find the file specified.
) @ error/delegate.c/ExternalDelegateCommand/475.
magick: PDFDelegateFailed `The system cannot find the file specified.
' @ error/pdf.c/ReadPDFImage/651.

How can I make this work? What file could it not find?



User avatar
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: new to convert - have error message

Post by fmw42 »

If you are sure the file is in the directory from which you specified your command, then you likely do not have Ghostscript installed as a delegate. ImageMagick uses it to convert PDF files to other formats. Check if you have Ghostscript installed. See if gswin32c.exe can be found on your system.

Also, try

Code: Select all

magick -version
Does it list gs or gslib? If not, and you cannot find Ghostscript on your system, then install Ghostscript.

How did you install ImageMagick? From binary or source? Where did you get your installation?

I generally do not recommend keeping images and running ImageMagick from temp directories.

Sorry, I am not a Windows expert.

To be sure you have ImageMagick installed properly. Try

Code: Select all

magick logo: logo.gif
magick logo.gif logo.png
Do they work?