davgothic/smushit
最新稳定版本:v3.0.1
Composer 安装命令:
composer require davgothic/smushit
包简介
SmushIt is a PHP client for the popular Yahoo! image compression web service Smush.it
README 文档
README
SmushIt is a PHP client for the popular Yahoo! image compression web service Smush.it
Basic Usage
use DavGothic\SmushIt\Client; use DavGothic\SmushIt\SmushIt; include __DIR__ . '/vendor/autoload.php'; $client = new Client\Curl(); $smushit = new SmushIt($client); // Compress a local/remote image and return the result object. $result = $smushit->compress('some/path/to/an/image.png'); print_r($result); // stdClass Object // ( // [src] => http://static0.resmush.it/output/1262dc777d8b239cfdf5f528a4032f02/source.png // [dest] => http://static1.resmush.it/output/a9ba82e7ba18e9482e085fadb126edad/output.png // [src_size] => 455200 // [dest_size] => 158075 // [percent] => 65 // [format] => png // [expires] => Sun, 19 Mar 2017 18:00:33 +0100 // [generator] => reSmush.it rev.1.4.22.20170224 // )
Installation
To install the most recent version via composer, run the following command:
composer require davgothic/smushit
Requirements
- PHP 5.5.0+
- PHP JSON extension
- PHP cURL extension (This requirement can be ignored if using any client other than the provided cURL client)
统计信息
- 总下载量: 2.51k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 34
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-03-19