views:

139

answers:

0

I'm using ImageMagick to render PDFs as master JPGs as an intermediate step before making thumbnail images of various sizes, and I'm getting different results when I execute the command in PHP using exec() than I get when I run it on the command line directly.

This is the command I'm using:

exec("/opt/local/bin/convert -geometry 1000x1000 -density 300x300 -units pixelsperinch  -authenticate TMOflyer " . escapeshellarg("$basefile/{$base}.pdf[0]") . " -antialias -colorspace RGB -adaptive-resize 1000x1000 -quality 100 " . escapeshellarg("$basefile/$master") . "", $output);

When run directly on the command line, it renders the transparency correctly, but the same command in PHP using exec() does not. I'm at a loss as to why!

I've made some changes to my delegates.xml for ImageMagick, to insert additional arguments for Ghostscript for color profile use and such. Perhaps those arguments are getting ignored in one case or the other?