Speed Processing
Posted: 2008-04-15T11:49:57-07:00
Hi guys, right now I am using Imagemagick quite a bit where I work, on several different functions. Right now what I am using it for is to load an image into memory, convert a high quality tiff into a jpeg that's a much smaller file size, all without touching the original file. This is all part of a larger web application that allows users to browse imaged historical documents. Here is the php script we are using for the process:
<?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);
?>
This takes some time to load an image, approximately seven seconds. We would like to get this load time reduced by as much as possible. Is there any way in imagemagick to reduce these load times, such as sacrificing some quality for speed? Or is there some kind of complementary program that can be used? 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);
?>
This takes some time to load an image, approximately seven seconds. We would like to get this load time reduced by as much as possible. Is there any way in imagemagick to reduce these load times, such as sacrificing some quality for speed? Or is there some kind of complementary program that can be used? Thank you.