lorddashme/php-image-squeezer
Composer 安装命令:
composer require lorddashme/php-image-squeezer
包简介
A simple PHP package for image compression powered by FFMPEG.
README 文档
README
A simple PHP package for image compression powered by FFMPEG.
Requirement(s)
-
PHP version from 5.4.* up to latest.
-
Operating System: Windows, Linux or Mac OS X.
Install
via Composer
- Use the command below to install the package via composer:
composer require lorddashme/php-image-squeezer
Usage
- Below are the simple implementation of the package:
<?php include __DIR__ . '/vendor/autoload.php'; // Import the main class of the PHP Image Squeezer. use LordDashMe\ImageSqueezer\ImageSqueezer; // Initialize the main class. $imageSqueezer = new ImageSqueezer(); // Load the necessary requirements and validate // if the package fit for the current environment. $imageSqueezer->load(); // Provide the source file path of the desire image // that will be compress later on. $imageSqueezer->setSourceFilePath('/path/source-filename'); // Provide the output file path of the compressed image. $imageSqueezer->setOutputFilePath('/path/output-filename'); // Execute the image compression. $imageSqueezer->compress();
License
This package is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 40
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-02-15