Hello
i'm new in php and mysql
i tryed to create thumbnails on the fly form images in a blob field of database
But did`nt have sucess
With images, wich are stored as files on my server i used this code
if($size[2]==2) {
// JPG
$altesBild=ImageCreateFromJPEG("$PicPathIn"."$bild");
$neuesBild=ImageCreateTrueColor($neueBreite,$neueHoehe);
imageCopyResized($neuesBild,$altesBild,0,0,0,0,$neueBreite,$neueHoehe,$breite,$hoehe);
ImageJPEG($neuesBild,"$PicPathOut"."$bild",85);
}
but i like to do it on the fly from database
For to show the image in orginal size i used this small get.php file
$query_get = "select * from $pic_tbl where id=$pic_id";
$result = @MYSQL_QUERY($query_get);
$data = @MYSQL_RESULT($result,0, "bin_data");
$type = @MYSQL_RESULT($result,0, "filetype");
Header("Content-type: $type");
echo $data;
and my php-file gives the picture out with this code
echo "<IMG SRC='get.php?id=$pic_id'>"
but remember, it is in orginal size and not in a small thumbnail size
how is the code to change the imagesize on the fly??
please help
thanks