Abnermouke\Supports\Library\PictureLibrary::make($source)
$main_img_path = 'path to image';
$water_img_path = 'path to water image';
$width = 100; //水印图片宽度
$height = 100; //水印图片高度
$x = 10; //水印图片X轴坐标
$y = 10; //水印图片Y轴坐标
$position = 'top-left'; //水印图片对其位置(默认:左上)
$save_img_path = 'path to save image';
Abnermouke\Supports\Library\PictureLibrary::make($main_img_path)
->draw($water_img_path, $width, $height, $x, $y, $position)
->save($save_img_path);
$main_img_path = 'path to image';
$string = 'xxxxxxx'; //水印文字内容
$ttf = 'path to ttf file'; //水印文字字体文件地址
$x = 10; //水印文字X轴坐标
$y = 10; //水印文字Y轴坐标
$font_size = 20; //水印文字大小
$save_img_path = 'path to save image';
Abnermouke\Supports\Library\PictureLibrary::make($main_img_path)
->text($string, $ttf, $x, $y, $font_size, '#000000', 'left', 'top')
->save($save_img_path);
$main_img_path = 'path to image';
$save_img_path = 'path to save image';
Abnermouke\Supports\Library\PictureLibrary::make($main_img_path)
->draw('path_to_water_path', 100, 100, 500, 500, ''top-left')
->draw('path_to_water_path', 300, 300, 100, 100, ''top-left')
->text('xxxxxxx', 'path_to_ttf_file', 100, 100 '#000000', 'left', 'top')
->text('xxxxxxx', 'path_to_ttf_file', 200, 300 '#FFFFFF', 'left', 'top')
->save($save_img_path);
$main_img_path = 'path to image';
$prefix = 'square-';
Abnermouke\Supports\Library\PictureLibrary::make($main_img_path)
->squares($prefix, 100, null);