I'm having trouble with getting ImageMagick and Ghostscript to work together - everything seems difficult, from installation, to testing, to actually using the software. Does anyone have any tips?
I was facing the same issue I installed Ghostscript 9.54.0 for Windows (64 bit) it solved my issue:
Followed the following steps:
Go to https://www.ghostscript.com/download.html clicked Ghostscript under "Postscript and PDF interpreter/renderer:". It opened a new page: https://www.ghostscript.com/download/gsdnld.html
From the page installed Ghostscript 9.54.0 for Windows (64 bit).
After downloading install it on the windows machine.
After that restated kernel and re-executed jupyter notebook.
Steve already provided a guide on running the command line version of ImageMagick from PHP. After having a similar experience installing the extension version of ImageMagick, I'd like to elaborate a bit on how the different components work together.
First you'll need the PHP extension. It's basically an adapter between PHP and the ImageMagick functions.
php_imagick.dll
from the extension ZIP to the PHP extension directoryHowever, this is not enough. The php_imagick.dll
does not contain any ImageMagick functionality and the CORE_RL_...
DLLs that come bundled with the extension are not complete. You're gonna need some more DLLs from an ImageMagick release as well.
Theoretically the version doesn't have to match exactly, but apparently somewhere between ImageMagick 6.8.1 and 6.8.8 the function MagickGetImageMatte
has been removed from the DLLs, so the safest way is to find the exact same ImageMagick release that the Imagick extension was build for:
It is not necessary to install ImageMagick. In fact, if you happen to have an incompatible ImageMagick in your PATH, the PHP extension might fail.
This applies to both the command line version of ImageMagick (convert
) and the PHP extension described above.
For reading files of the Postscript family, Ghostscript is needed.
ImageMagick will find Ghostscript following these steps:
GS_DLL
entry in the registry, pointing to the path of gswin32.dll
, it will use that one and ignore the delegates altogether.delegates.xml
next to php5(n)ts.dll
or convert.exe
respectively or in ~\.magick
.@PS_Delegate@
in the delegate, it will replace it with gswin32c.exe
and then continue looking for that EXE in the PATH. You can replace this string with the full path to gswin32c.exe
or even gswin64c.exe
that ImageMagick should call.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With