I am calling imagemagick from php, and using it to create custom sized thumbnails of a image.
I want to avoid saving the thumbnail to disk, and send it right to the browser.
I have something similar to this:
<?
$command = "/usr/local/bin/convert -geometry ".$width."x /tmp/foo.jpg";
$command ; // backtick command
$expired = gmdate("D, d M Y H:i:s",(time() + 3600)." GMT");
header("Expires: $expired");
header("Content-type: image/jpeg");
readfile("/tmp/foo.jpg");
?>
I want to avoid writing out foo.jpg, then reading it back it. Is there anyway to send the output from convert directly to the browser?
thanks