stoffel / console-image
Symfony Console 打印图像的助手
0.2.2
2020-11-30 18:13 UTC
Requires
- php: ^7.4
- ext-gd: *
- symfony/console: ^5.2
- symfony/mime: ^5.2
Requires (Dev)
- phpunit/phpunit: ^9.4
README
使用 Symfony Console 打印图像的助手,灵感来源于 新特性 和 viu。
示例
$ git clone git@github.com:chr-hertel/console-image.git
$ cd console-image
$ composer install
$ example/printer path/to/image.jpg
安装
$ composer require stoffel/console-image
PHP 中的使用
use Stoffel\Console\Image\ImageHelper; ImageHelper::create($output) ->print('/path/to/image.jpg'); // or with explicit maximal dimensions (still scaled in correct aspect ration) ImageHelper::create($output) ->print('/path/to/image.jpg', 40, 20);