tapakan/watermark

为图片添加水印

1.0.1 2016-05-01 19:23 UTC

This package is not auto-updated.

Last update: 2024-09-14 19:14:41 UTC


README

##ImageBuilder 库,帮助您轻松为图片添加水印。它可以与任何系统无缝集成。

##安装 编辑 composer.json 文件,并在 require 部分添加以下行。

    "require": {
        "tapakan/watermark": "1.0.1"
    }

##使用

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');

图片将以相同的名称和目录保存。

可用位置

有 5 个可用的常量,可以更改水印的目标位置。