lundi 29 août 2016

Convert image with mogrify and output it to variable

I am trying to convert a bmp to jpg with mogrify.The jpg should then be store in a variable.

Here is my attempt thus far

$jpg_content = shell_exec("gm mogrify -format jpg ". escapeshellarg($image) . " && cat " . escapeshellarg($image)."2>&1");

However $jpg_content is null

Aucun commentaire:

Enregistrer un commentaire