Magickwand
Posted: 2008-04-16T07:58:33-07:00
We have some php to convert a tiff into a jpeg, all in memory, and echo out the results via a web application. Here is the code:
<?php
$resolution=$_GET["res"];
$presize=($resolution*2);
$photo="test.tif";
$cmd = "convert \"$photo\" -scale 50% -strip -unsharp 0.2x0.6+1.0 -quality 87 JPG:-";
header("Content-type: image/jpeg");
passthru($cmd, $retval);
?>
Does anyone know how to rewrite this using Magickwand? We are trying to shave a few seconds off the conversion and we are oping this will help. Thank you.
<?php
$resolution=$_GET["res"];
$presize=($resolution*2);
$photo="test.tif";
$cmd = "convert \"$photo\" -scale 50% -strip -unsharp 0.2x0.6+1.0 -quality 87 JPG:-";
header("Content-type: image/jpeg");
passthru($cmd, $retval);
?>
Does anyone know how to rewrite this using Magickwand? We are trying to shave a few seconds off the conversion and we are oping this will help. Thank you.