When I have this function in an included file (function.php):
function Thumb($width, $path, $image)
{
$command = "convert -geometry ".$width." $path$image jpeg:-";
$imagedata = $command;
header("Expires: $expired");
header("Content-type: image/jpeg");
echo "$imagedata";
}
my index file reads:
<?php
include ("function.php");
Thumb("100", "images/", "mypic.jpg");
?>
I get the same confused code that makes up the jpeg image. Is it possible to show me the work around for doing this using the function? I tried doing the echo "<img src=\"Thumb(\"100\", \"images/\", \"mypic.jpg\")\">"; but to no avail. TX in advance for the help all.