webvimark/image

此软件包最新版本(1.0.0)没有可用的许可证信息。

为 yii 2 的 Kohana 图像库包装器

1.0.0 2014-07-02 07:33 UTC

This package is auto-updated.

Last update: 2024-08-29 03:15:51 UTC


README

图像处理(调整大小、裁剪、水印等)

安装

安装此扩展的首选方式是通过 Composer

运行以下命令:

php composer.phar require --prefer-dist webvimark/image "*"

或将以下内容添加到您的 composer.json 文件的 require 部分中:

"webvimark/image": "*"

配置

在您的 config/web.php 中

	'modules'=>[
		...

		'migrations'=>[
			'class'=>'webvimark\modules\migrations\MigrationModule'
		],

		...
	],

在您的 config/console.php 中

	...

	'controllerMap'=>[
		'migrate'=>[
			'class'=>'webvimark\modules\migrations\components\MigrateController',
		],
	],

	...

将您想要的模块包含在 config/console.php 中

使用方法

\webvimark\image\Image::factory($pathFromFile)->resize(500, 300)->save($pathToFile);