0

I try to convert a eps file to a png in PHP using Imagemagick.

exec('convert /tmp/test.eps /tmp/test.png'); // Won't create any file!?
exec('convert /tmp/picture.png /tmp/picture_copy.png'); // This works

But, if I try to convert the EPS in a shell, that works...

convert /tmp/test.eps /tmp/test.png

Why does it work in the shell, but not PHP? I do not even receive any error/warning messages...

Egon Schmid
  • 61
  • 1
  • 3
  • Are you calling the same version of convert? – dlemstra Feb 06 '14 at 16:25
  • First of all I'd suggest to switch on error reporting in PHP. Something like `error_reporting(E_ALL);`. Second: Since converting of png's works while eps's don't, it is probably because the "postscript delegate" isn't found. Check for the location of `gs` and make sure that this is added to the PATH environment within your PHP app. – leu Feb 07 '14 at 11:14

0 Answers0