Answers for "nodejs watermark image"

0

nodejs watermark image

//Install
npm install imaginary --save

//Import 
var fs = require('fs')
var imaginary = require('imaginary')
var serverUrl = 'localhost:8080'

imaginary('myImage.jpg')
  .server(serverUrl)
  .watermark({ text: 'copyright' })
  .on('error', function (err) {
    console.error('Cannot resize the image:', err)
  })
  .pipe(fs.createWriteStream('markedImage.jpg'))
Posted by: Guest on April-08-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language