更换图片处理库

This commit is contained in:
Wisp X
2022-01-19 11:00:25 +08:00
parent d8ee38573b
commit 24a0a576e8
4 changed files with 9 additions and 6 deletions
+3
View File
@@ -29,6 +29,9 @@ class Controller extends BaseController
return $this->error($e->getMessage());
} catch (\Throwable $e) {
Log::error("Web 上传文件时发生异常,", ['message' => $e->getMessage(), 'trace' => $e->getTraceAsString()]);
if (config('app.debug')) {
return $this->error($e->getMessage());
}
return $this->error('服务异常,请稍后再试');
}
return $this->success('上传成功', $image->setAppends(['pathname', 'links'])->only(
@@ -108,7 +108,7 @@ class ImageController extends Controller
} catch (FilesystemException $e) {
abort(404);
}
// 是否启用了水印功能
// 是否启用了水印功能 TODO 跳过gif
if ($image->group->configs->get(GroupConfigKey::IsEnableWatermark)) {
// TODO 缓存水印文件
$configs = $image->group->configs->get(GroupConfigKey::WatermarkConfigs);
+1 -1
View File
@@ -252,7 +252,7 @@ class ImageService
*/
private function getWatermark(string $driver, Collection $options): \Intervention\Image\Image
{
$manager = new ImageManager();
$manager = new ImageManager(config('image'));
if ($driver === 'image') {
$watermark = $manager->make($options->get(ImageOption::Image));
+4 -4
View File
@@ -1481,14 +1481,14 @@ select {
--tw-text-opacity: 1;
color: rgb(209 213 219 / var(--tw-text-opacity));
}
.text-gray-900 {
--tw-text-opacity: 1;
color: rgb(17 24 39 / var(--tw-text-opacity));
}
.text-green-600 {
--tw-text-opacity: 1;
color: rgb(22 163 74 / var(--tw-text-opacity));
}
.text-gray-900 {
--tw-text-opacity: 1;
color: rgb(17 24 39 / var(--tw-text-opacity));
}
.text-blue-500 {
--tw-text-opacity: 1;
color: rgb(59 130 246 / var(--tw-text-opacity));