watermark-js-plus 1.3.17 → 1.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -1
- package/dist/index.cjs.js +6 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.esm.js +6 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.iife.js +6 -3
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +1 -1
- package/dist/index.umd.js +6 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/types/src/types/index.d.ts +1 -0
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -86,6 +86,24 @@ BlindWatermark.decode({
|
|
|
86
86
|
|
|
87
87
|
To learn more, check [its documentation](https://zhensherlock.github.io/watermark-js-plus).
|
|
88
88
|
|
|
89
|
+
## Maintainers
|
|
90
|
+
|
|
91
|
+
[@zhensherlock](https://github.com/zhensherlock).
|
|
92
|
+
|
|
93
|
+
## Contributing
|
|
94
|
+
|
|
95
|
+
Feel free to dive in! [Open an issue](https://github.com/zhensherlock/watermark-js-plus/issues/new/choose) or submit PRs.
|
|
96
|
+
|
|
97
|
+
Standard Readme follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.
|
|
98
|
+
|
|
99
|
+
### Contributors
|
|
100
|
+
|
|
101
|
+
This project exists thanks to all the people who contribute.
|
|
102
|
+
|
|
103
|
+
<a href="https://github.com/zhensherlock/watermark-js-plus/graphs/contributors">
|
|
104
|
+
<img src="https://contrib.rocks/image?repo=zhensherlock/watermark-js-plus" />
|
|
105
|
+
</a>
|
|
106
|
+
|
|
89
107
|
## License
|
|
90
108
|
|
|
91
|
-
[MIT](LICENSE)
|
|
109
|
+
[MIT](LICENSE) © MichaelSun
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* watermark-js-plus v1.3.
|
|
2
|
+
* watermark-js-plus v1.3.19
|
|
3
3
|
* (c) 2022-2023 Michael Sun
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -1081,7 +1081,8 @@ var BlindWatermark = /** @class */ (function (_super) {
|
|
|
1081
1081
|
url: '',
|
|
1082
1082
|
fillColor: '#000',
|
|
1083
1083
|
compositeOperation: 'color-burn',
|
|
1084
|
-
mode: 'canvas'
|
|
1084
|
+
mode: 'canvas',
|
|
1085
|
+
compositeTimes: 3
|
|
1085
1086
|
}, props);
|
|
1086
1087
|
if (!options.url) {
|
|
1087
1088
|
return;
|
|
@@ -1100,7 +1101,9 @@ var BlindWatermark = /** @class */ (function (_super) {
|
|
|
1100
1101
|
ctx.drawImage(img_1, 0, 0, width, height);
|
|
1101
1102
|
ctx.globalCompositeOperation = options.compositeOperation;
|
|
1102
1103
|
ctx.fillStyle = options.fillColor;
|
|
1103
|
-
|
|
1104
|
+
for (var i = 0; i < options.compositeTimes; i++) {
|
|
1105
|
+
ctx.fillRect(0, 0, width, height);
|
|
1106
|
+
}
|
|
1104
1107
|
var resultImage = convertImage(canvas);
|
|
1105
1108
|
if (options.onSuccess && isFunction(options.onSuccess)) {
|
|
1106
1109
|
(_a = options.onSuccess) === null || _a === void 0 ? void 0 : _a.call(options, resultImage);
|