ckfinder/ckfinder-plugin-imagewatermark-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ckfinder/ckfinder-plugin-imagewatermark-php

最新稳定版本:3.4.0

Composer 安装命令:

composer require ckfinder/ckfinder-plugin-imagewatermark-php

包简介

Image watermark plugin for CKFinder 3

README 文档

README

This is an official CKFinder 3 plugin that adds a watermark to images uploaded with CKFinder.

Supported image extensions: jpg, jpeg, gif, png.

Plugin Installation

See the Plugin Installation and Configuration documentation.

Configuration Options

To set a custom image to use as a watermark add the following option to the main CKFinder configuration file (usually named config.php):

// ...
$config['ImageWatermark'] = [
    'imagePath' => __DIR__ . '/custom/image/path/stamp.png'
];

Note: Make sure that your image path is absolute, and use a transparent png image for best results.

To change the default watermark position you need to add the position option in the plugin configuration node:

// ...
$config['ImageWatermark'] = [
    'imagePath' => __DIR__ . '/custom/image/path/stamp.png', // Also use a custom image.
    'position' => [
        'right'  => 0,
        'bottom' => 0
    ]
];

The position option takes two arguments corresponding to image borders.

Possible position key values are: top, right, bottom, left.

Suboptions top-bottom and left-right are mutually exclusive, and cannot be used together.

Each position suboption can take an integer as a value. This integer denotes the distance to the selected border measured in pixels. Alternatively, you can use the 'center' string to make the watermark centered between the current and the opposite border.

Here are a few examples of the watermark (▣) position for the following position options used:

$config['ImageWatermark'] = [               ┌────────────────┐
    'position' => [                         │                │
        'right'  => 0,                      │                │
        'bottom' => 0                       │              ▣ │
    ]                                       └────────────────┘
];
$config['ImageWatermark'] = [               ┌────────────────┐
    'position' => [                         │                │
        'right'  => 'center',               │                │
        'bottom' => 0                       │        ▣       │
    ]                                       └────────────────┘
];
$config['ImageWatermark'] = [               ┌────────────────┐
    'position' => [                         │                │
        'right'  => 0,                      │               ▣│
        'bottom' => 'center'                │                │
    ]                                       └────────────────┘
];

License

Copyright (c) 2007-2016, CKSource - Frederico Knabben. All rights reserved. For license details see: LICENSE.md.

统计信息

  • 总下载量: 55
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 4
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固