https://github.com/navjotdhanawat/dynamic-watermark
Add image or text watermark on image using npm package i.e dynamic-watermark
https://github.com/navjotdhanawat/dynamic-watermark
add image logo npm watermark
Last synced: 7 months ago
JSON representation
Add image or text watermark on image using npm package i.e dynamic-watermark
- Host: GitHub
- URL: https://github.com/navjotdhanawat/dynamic-watermark
- Owner: navjotdhanawat
- License: mit
- Created: 2017-08-01T13:41:24.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-30T09:12:19.000Z (about 7 years ago)
- Last Synced: 2024-10-06T20:16:23.770Z (about 1 year ago)
- Topics: add, image, logo, npm, watermark
- Language: JavaScript
- Homepage:
- Size: 65.4 KB
- Stars: 11
- Watchers: 2
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Dynamic Watermark : (dynamic-watermark)
Dynamic Watermark is npm watermark module to add watermark over image. It can add image as well as text watermark on given positions. It does great job for adding watermarks.

```
npm install dynamic-watermark --save```
After successful installation of dynamic-watermark follow below steps:
#### Step 1: include dynamic-watermark package:
```
var watermark = require('dynamic-watermark');
```#### Step 2: Provide following options:
```
var optionsImageWatermark = {
type: "image",
source: "a.png",
logo: "logo.png", // This is optional if you have provided text Watermark
destination: "output.png",
position: {
logoX : 200,
logoY : 200,
logoHeight: 200,
logoWidth: 200
}
};var optionsTextWatermark = {
type: "text",
text: "Watermark text", // This is optional if you have provided text Watermark
destination: "output.png",
source: "a.png",
position: {
logoX : 200,
logoY : 200,
logoHeight: 200,
logoWidth: 200
},
textOption: {
fontSize: 100, //In px default : 20
color: '#AAF122' // Text color in hex default: #000000
}
};
```
#### Step 3: Final step is to call embed method by passing above options.
```
//optionsImageWatermark or optionsTextWatermark
watermark.embed(optionsImageWatermark, function(status) {
//Do what you want to do here
console.log(status);
});
```
#### Example: [How to add watermark in nodejs](http://www.thenextfact.com/how-to-add-watermark-logo-text-image-nodejs/)##### If there is something missing in this repo or any suggestions, then please open feature thread
##### If you are facing any issue then dont forget to open issue or help thread.
[Open issues](https://github.com/navjotdhanawat/dynamic-watermark/issues)