workleto / image
支持图像处理和操作的库
1.0.1
2023-07-06 07:19 UTC
Requires
- php: >=5.4.0
- ext-fileinfo: *
- guzzlehttp/psr7: ~1.1 || ^2.0
Requires (Dev)
- mockery/mockery: ~0.9.2
- phpunit/phpunit: ^4.8 || ^5.7 || ^7.5.15
Suggests
- ext-gd: to use GD library based image processing.
- ext-imagick: to use Imagick based image processing.
- intervention/imagecache: Caching extension for the Intervention Image library
This package is not auto-updated.
Last update: 2024-09-27 10:50:49 UTC
README
Intervention Image 是一个 PHP 图像处理和操作 库,提供了一种更简单、更易于表达的方式来创建、编辑和组合图像。该包包括 ServiceProviders 和 Facades,以方便地集成到 Laravel 中。
要求
- PHP >=5.4
- Fileinfo 扩展
支持的图像库
- GD 库 (>=2.0)
- Imagick PHP 扩展 (>=6.5.7)
入门
代码示例
// open an image file $img = Image::make('public/foo.jpg'); // resize image instance $img->resize(320, 240); // insert a watermark $img->insert('public/watermark.png'); // save image in desired format $img->save('public/bar.jpg');
有关 Intervention Image 的更多信息,请参阅官方文档。
贡献
欢迎对 Intervention Image 库做出贡献。在提交您的 pull request 之前,请注意以下指南。
- 遵循 PSR-2 编码标准。
- 为新函数和新增特性编写测试
- API 调用应与 GD 和 Imagick 驱动程序一致
许可证
Intervention Image 根据 MIT 许可证 许可。
版权 2017 Oliver Vogel