sami alajrami - 2010-10-02 13:47:07
i have used this class to compress a gif image for inserting it in to database ...thats the code which i used:
<? header("Content-Type: image/gif");
function upload(){
include("lzwc.php");
$l = new LZW;
$filename = "C:\\AppServ\\pta.GIF";
$handle = fopen($filename, "rb");
$imgfp = fread($handle, filesize($filename));
fclose($handle);
// echo $imgfp;
$en = $l->compress($imgfp);
$de = $l->decode($en);
echo $de;
//echo $en;
}
upload();
?>
when i echo "$imgfp" (the original image), its shown on the page..but when trying to output the "$de" or "$en" its not working
what would be erong in the code above ??!