我漫步是在Zend Framework中調整圖像大小的一些特殊工具? 或者我應該使用這樣的代碼:在zend框架上調整圖像大小
$upload = new Zend_File_Transfer_Adapter_Http();
try {
$upload->receive();
} catch (Zend_File_Transfer_Exception $e) {
$e->getMessage();
}
$im_org = imageCreateFromJpeg($upload);
$im_bg = imageCreateTrueColor(300, 300);
imageCopyResampled($im_bg, $im_org, 0, 0, 0, 0, 300, 300, imageSX($im_org), imageSY($im_org));
imageJpeg($im_bg, "pict/" . $id . "_bg.jpg", 100);
imagedestroy($im_org);
imagedestroy($im_bg);
謝謝!
嘗試一些開源的圖像調整大小庫ex phpThumb()http://phpthumb.sourceforge.net/ –
謝謝你的回覆!我會嘗試... – lubart