//$src_img = imagecreatefromjpeg($imgpath); // 创建图片资源失败
$src_img = imagecreatefromstring(file_get_contents($imgpath));// 成功