Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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'))
Comment

PREVIOUS NEXT
Code Example
Javascript :: usememo hook react 
Javascript :: jquery disable all forms 
Javascript :: object destructuring 
Javascript :: javascript prevent an event to triggering multiple times 
Javascript :: javascript sort associative array 
Javascript :: javascript new line 
Javascript :: some method in js 
Javascript :: jquery find table from td 
Javascript :: queryselectorall example 
Javascript :: javascript update text in div 
Javascript :: callback function js 
Javascript :: How to add Select2 on Dynamic element - jQuery 
Javascript :: js default parameter 
Javascript :: input events 
Javascript :: react native flexbox 2 columns 1 fixed width 
Javascript :: eliminar comillas de un string javascript 
Javascript :: rgb to hex conversion 
Javascript :: how to check if a string is an integer javascript 
Javascript :: mongoose updateone example 
Javascript :: parseint 
Javascript :: run javascript in html 
Javascript :: chart js two layer label 
Javascript :: server side rendering in agular 
Javascript :: change console log to print javascript 
Javascript :: explain the exclamation mark in js 
Javascript :: wait until a function finishes javascript 
Javascript :: how to setup icomoon in react js 
Javascript :: format json command line 
Javascript :: windows scroll condition 
Javascript :: hashtable js 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =