/** * 生成并输出图片 * * @access public * @param mixed $src * @param mixed $dst * @param mixed $width * @param mixed $height * @param mixed $mode * @return void */ public function make_crop_thumb($src, $dst, $width, $height, $mode) { $ic = new ImageCrop($src, $dst); $ic->Crop($width, $height, $mode); list($width, $height, $type) = getimagesize($src); if ($type === IMAGETYPE_PNG) { $ic->SaveAlpha(); } else { $ic->SaveImage(); } $ic->destory(); }