dinhnam2901/image-helper
最新稳定版本:1.0.0
Composer 安装命令:
composer require dinhnam2901/image-helper
包简介
Single class PHP for image helper with main feature as resize image, getting information of image file
README 文档
README
Single class PHP for image helper.
Main feature:
- Resize the image.
- Getting information of image.
Basic usage
If you have a image at 'upload/image1.jpg' with: width=1000px, height=1200px.
And you want to resize it to 'thumb/image1.jpg' with width=300px, and remain ratio as the same (calc height automatically).
You can use bellow code:
$imageHelper = new ImageHelper();
$imageHelper->resize('upload/image1.jpg', 'thumb/image1', [
ImageHelper::OPTION_WIDTH => 300
]);
Required
This image helper use GD library. So, ensure you was install and turn on the GD library on your web server.
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-03