square1 / resized
按需图像处理服务。
v1.3.0
2021-09-16 10:07 UTC
Requires
- php: ~7.2|~8.0
Requires (Dev)
- phpunit/phpunit: ~9.5.9
- scrutinizer/ocular: ~1.1
- squizlabs/php_codesniffer: ~2.3
This package is auto-updated.
Last update: 2024-09-16 16:56:57 UTC
README
这是resized.co的PHP客户端,resized.co是一个实时图像调整大小处理服务。
安装
通过Composer
$ composer require square1/resized
使用方法
//Initialize and authenticate $resized = new \Square1\Resized\Resized('key', 'secret'); //Override host if applicable $resized->setHost('https://img.resized.co'); //Set the default failover image $resized->setDefaultImage('http:/www.example.com/no-image.jpg'); //Set default options $resized->setDefaultOptions(['quality' => 100]); //Process image resize with the parameters: ($url, $width, $height, $title) $img = $resized->process('http://www.example.com/some-image.jpg', '100', '100', 'This is a title');
测试
$ composer test
许可证
MIT许可证(MIT)。请参阅许可证文件以获取更多信息。