我已经安装了干预/图像。
这是我从修补匠那里得到的:
C:\Users\USER\p3>composer require intervention/image
Using version ^2.5 for intervention/image
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: intervention/image
Discovered Package: laravel/tinker
Discovered Package: laravel/ui
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Package manifest generated successfully.
然后我使用了这样的包:
use Intervention\Image\Facades\Image
然后我应用了这样的代码:
image = Image::make(public_path("storage/{$imagePath}"))->fit(1200, 1200);`
我得到的错误是:
Intervention\Image\Exception\NotSupportedException GD 库扩展在此 PHP 安装中不可用。
关于如何解决这个问题的任何建议?