This is my ImageMagick code which works fine on my webserver by creating new image with the file name \'coloured_font.png\' in a default directory ...
You will have to create a temporary file
Steps
temp_image.jpg
by running imagemagick
command in shellSend this as http response
$file = 'pathto/temp_image.jpg';
$type = 'image/jpeg'; // set appropriate type
header('Content-Type:'.$type); // set content type
header('Content-Length: ' . filesize($file));
readfile($file);
Delete temp_image.jpg
Suppose this is in getImage.php
, it can be given as the source of an image tag