yilanboy/preview
最新稳定版本:1.0.1
Composer 安装命令:
composer require yilanboy/preview
包简介
Generate the preview image
README 文档
README
A simple package to generate preview image.
Installation
Install the package with composer.
composer require yilanboy/preview
Then create an image builder.
use Yilanboy\Preview\Image\Builder; (new Builder()) ->size(width: 1200, height: 600) ->backgroundColor('#777bb3') ->header(text: 'Preview', color: 'white', fontSize: 75) ->title(text: 'A simple PHP package to create preview image', color: 'white', fontSize: 50) ->output();
This code will display the following image on the web page.
You can modify the text on the preview image.
Currently, the text only support english and chinese.
Start a Local Server to Show the Image
There is a output.php file in examples folder, you can simply start a local server to see the image in browser.
php -S localhost:8000 examples/output.php
Then open your browser and visit localhost:8000.
Run Tests
composer run-tests
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-28
