在MySQL中从blob调整PHP中图像的大小

| 我要放大图像,同时要保持比例不变     
已邀请:
   $blob = mysql_fetch_...();

   $gd = imagecreatefromstring($blob);
   $resized = imagecreatetruecolor(X, Y); // new image dimensions
   imagecopyresampled(....);

   ob_start();
   imagejpeg($resized);
   $new_blob = ob_get_clean();

   mysql_query(... update table ...);
    
那里有无数的图像调整大小脚本(Google关键字:php thumbnailer)。也可以使用GD自己滚动。将Blob加载到字符串中,然后使用imagecreatefromstring()函数创建图像。     

要回复问题请先登录注册