SHARE
TWEET

Untitled

a guest Jun 16th, 2019 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const watermark = require('image-watermark');
  2. const imagePath = path.resolve(__dirname,'./relative/path/to/image');
  3. watermark.embedWatermarkWithCb(imagePath, { 'text': 'sample watermark' },
  4. function (err) {
  5.     if (!err)
  6.       console.log('Succefully embeded watermark');
  7.     else {
  8.       //I am getting error here.
  9.       console.log(err);
  10.     }
  11. });
  12.      
  13. { Error: Command failed:
  14.     at ChildProcess.<anonymous>(...node_modulesimagemagickimagemagick.js:88:15)
  15.     at emitTwo (events.js:131:20)
  16.     at ChildProcess.emit (events.js:214:7)
  17.     at maybeClose (internal/child_process.js:925:16)
  18.     at Process.ChildProcess._handle.onexit
  19. (internal/child_process.js:209:5) timedOut: false, killed: false, code: 1,
  20. signal: null }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top