You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.2 KiB
29 lines
1.2 KiB
1 year ago
|
# The ThinkPHP5 Image Package
|
||
|
|
||
|
[](https://travis-ci.org/top-think/think-image)
|
||
|
[](https://codecov.io/github/top-think/think-image)
|
||
|
[](https://github.com/top-think/think-image/releases)
|
||
|
[](https://github.com/top-think/think-image/releases/latest)
|
||
|
[](https://github.com/top-think/think-image/releases/latest)
|
||
|
[](https://packagist.org/packages/topthink/think-image)
|
||
|
[](https://packagist.org/packages/topthink/think-image)
|
||
|
|
||
|
## 安装
|
||
|
|
||
|
> composer require topthink/think-image
|
||
|
|
||
|
## 使用
|
||
|
|
||
|
~~~
|
||
|
$image = \think\Image::open('./image.jpg');
|
||
|
或者
|
||
|
$image = \think\Image::open(request()->file('image'));
|
||
|
|
||
|
|
||
|
$image->crop(...)
|
||
|
->thumb(...)
|
||
|
->water(...)
|
||
|
->text(....)
|
||
|
->save(..);
|
||
|
|
||
|
~~~
|