|
|
|
@ -527,11 +527,11 @@ Class SiteController extends Controller {
@@ -527,11 +527,11 @@ Class SiteController extends Controller {
|
|
|
|
|
//保存base64格式的缩略图到缓存文件 |
|
|
|
|
if (!empty($imgSource)) { |
|
|
|
|
$dst_img = imagecreatetruecolor($width, $height); |
|
|
|
|
$copy_done = imagecopyresized($dst_img, $imgSource, 0, 0, 0, 0, $width, $height, $naturalWidth, $naturalHeight); |
|
|
|
|
|
|
|
|
|
$copy_done = imagecopyresampled($dst_img, $imgSource, 0, 0, 0, 0, $width, $height, $naturalWidth, $naturalHeight); |
|
|
|
|
if ($copy_done) { |
|
|
|
|
ob_start(); |
|
|
|
|
imagejpeg($dst_img); |
|
|
|
|
$quality = !empty(FSC::$app['config']['smallImageQuality']) ? FSC::$app['config']['smallImageQuality'] : 90; |
|
|
|
|
imagejpeg($dst_img, null, $quality); |
|
|
|
|
$img_data = ob_get_clean(); |
|
|
|
|
ob_end_clean(); |
|
|
|
|
} |
|
|
|
|