tapakan/watermark
Composer 安装命令:
composer require tapakan/watermark
包简介
Add watermark to image
关键字:
README 文档
README
#ImageBuilder Library that helps you easily add watermark to your images. It can be integrated with any system without problems.
##Install Edit composer.json file and add next lines in require section.
"require": { "tapakan/watermark": "1.0.1" }
##Using
require 'vendor/autoload.php' use Tapakan\Watermark\Watermark; $watermark = new Watermark($arg1, $arg2); //$arg1 - Path to watermark file. For example: images/watermark.png //$arg2 - By second argument you can change destination position of watermark. See Available positions sector. // Then add watermark to someone image. $watermark->add('/images/image.jpeg');
Image will be saved with same name and to the same directory.
Available Positions
There are 5 available constants to change the destination position of watermark.
| CONSTANT | POSITION |
|---|---|
| RIGHT_TOP_CORNER | Right top. Margin from borders 10px |
| RIGHT_DOWN_CORNER | Right down. Margin from borders 10px |
| LEFT_TOP_CORNER | Left top. Margin from borders 10px |
| LEFT_DOWN_CORNER | Left down. Margin from borders 10px |
| MIDDLE_CENTER | Middle. |
EVERYWHERE new |
Duplicating a watermark across the image. |
统计信息
- 总下载量: 34
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-04-23