Hi,
I want to resize image with gd.getting image from db.But still having some problems.
<?
if($id){
$baglan =mysql_connect(\\"localhost\\",\\"user\\",\\"passwd\\") OR DIE (\\"DB err\\");
mysql_select_db(\\"DB\\") or die (\\"DB err\\");
$sorgu = \\"select imagedata from image where id=$id\\";
$sonuc = MYSQL_QUERY($sorgu);
$data = MYSQL_RESULT($sonuc,0,\\"imagedata\\");
function hola($eb){
Header(\\"Content-type: image/gif\\");
echo $eb;
}
$dst_img = ImageCreate(100,100);
$src_img = ImageCreateFromgif(hola($data));
ImageCopyResized($dst_img,$src_img,0,0,0,0,100,100,ImageSX($src_img),ImageSY($src_img));
imagegif($dst_img);
}
?>
Code shows image with original size.not 100x100.I used something like this with image file and it works fine but when i used db for getting image, it shows img in original size.
Need some help! and sorry for bad english.=)