slaxweb/image-processor
Composer 安装命令:
composer require slaxweb/image-processor
包简介
Image processing
README 文档
README
Image manipulation using PHP ImageMagick. Functionality is added as is needed. More of just a wrapper around ImageMagick for easier use.
How to use
Initialization
To initialize the Image class, the config class must be initialized, which only holds the image save path at the moment. When initialized, it needs to be passed as the parameter to the Image class constructor. If using composer, just include the autoloader, if not, include the classes in your scripts.
$config = new \SlaxWeb\ImageProcessor\ConfigImage(); $config->path("/path/to/images"); // or $config->path = "/path/to/images/"; $image = new \SlaxWeb\ImageProcessor\Image($config);
If you did not include the config at initialization, you can call it later, or if you want to change the config.
$image->setConfig($config);
Loading the image
You can either load the image from a file:
$image->loadImage("imagename.jpg");
Or from a base64 string:
$image->loadImageBase64($base64String);
To be continued...
统计信息
- 总下载量: 31
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPLv3
- 更新时间: 2014-06-12