forked from Hi-Joe/TiledWatermark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.php
37 lines (31 loc) · 971 Bytes
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
require_once './TiledWatermark.class.php';
$test = TiledWatermark::getInstance();
$config = array(
# 设置绘制类型'img'图片水印,'txt'文字水印
'draw_type' => 'img',
# 背景图片,支持jpeg,png
'draw_bg' => './resources/test.jpg',
# 水印透明度 0-127
'opacity' => 33,
# 水印是否随机位置
'random_location' => false,
# logo水印
'logo_img' => './resources/ohcodes_logo.png',
# 字体文件
'font_file' => './resources/1.ttf',
# 倾斜度,仅文字水印生效
'rotate_angle' => 0,
# 水印文字
'watermark_text'=> '某某有限责任公司',
# 水印文字颜色13同等于RGB 13,13,13
'text_rgb' => 13,
# 文字水印是否开启阴影
'shadow' => false,
# 文字水印阴影颜色
'shadow_rgb' => '160,210,119',
# 阴影偏移量,允许负值如-3
'shadow_offset' => 3
);
$test->okIsRun($config);
?>