//
// Options with watermark text, if not provided defaults to 'Sample watermark'
//
var watermark = require('image-watermark');
watermark.embedWatermark('\home\user\sample.jpg', {'text' : 'sample watermark'});
 
//
// Options to specify output path
//
var watermark = require('image-watermark');
var options = {
    'text' : 'sample watermark', 
    'dstPath' : '\home\user\documents\watermark.jpg'
};
watermark.embedWatermark('\home\user\sample.jpg', options);
 
//
// Options to specify color of watermark text
//
var watermark = require('image-watermark');
var options = {
    'text' : 'sample watermark', 
    'color' : 'rgb(154, 50, 46)'
};
watermark.embedWatermark('\home\user\sample.jpg', options);
 
// color can be specified in one of the following forms
grey					  #color-name
#f00                      #rgb
#ff0000                   #rrggbb
#ff0000ff                 #rrggbbaa
#ffff00000000             #rrrrggggbbbb
#ffff00000000ffff         #rrrrggggbbbbaaaa
rgb(255, 0, 0)            an integer in the range 0—255 for each component
rgb(100.0%, 0.0%, 0.0%)   a float in the range 0—100% for each component
 
 
//
// Options to specify resize factor i.e. if image needs to be resized
// after adding watermark text
//
var watermark = require('image-watermark');
var options = {
    'text' : 'sample watermark', 
    'resize' : '200%'
};
watermark.embedWatermark('\home\user\sample.jpg', options);
 
 
//
// Options to override same image i.e. if same image needs to
// be overriden after adding watermark, By default is false
//
var watermark = require('image-watermark');
var options = {
    'text' : 'sample watermark', 
    'override-image' : true
};
watermark.embedWatermark('\home\user\sample.jpg', options);
 
// This overrides the same image, if not specified it creates
// output image parallel to this image with name "watermark"
 
//
// Options to change the format of image
//
var watermark = require('image-watermark');
var options = {
    'text' 			: 'sample watermark', 
    'change-format' : true,
    'output-format' : 'bmp'
};
watermark.embedWatermark('\home\user\sample.jpg', options);
 
//
// Options to specify the font of watermark text
//
var watermark = require('image-watermark');
var options = {
    'text' : 'sample watermark', 
    'font' : 'Arial.ttf'
};
watermark.embedWatermark('\home\user\sample.jpg', options);
 
//
// Options to specify the alignment of watermark text
//
var watermark = require('image-watermark');
var options = {
    'text' : 'sample watermark', 
    'align' : 'ltr'
};
watermark.embedWatermark('\home\user\sample.jpg', options);
 
// Various possble values of align are:
 
//
// dia1 : Diagonal 1
// dia2 : Diagonal 2
// ttb : top to bottom
// btt : bottom to top
// ltr : left to right
// rtl : right to left
//
 
// If an invalid value is specified or in case no value
// is specified then 'dial1' is treated as default alignment

Javascript相关代码片段

debug vue chrome

React Accordion

React Custom Pagination Next Previous

construct 3 javascript

Array item Add remove react state

how to check if a data type is int javascript

Write a React Component from Scratch

import image dynamically react

Sorting arrays within an array in js

javascript retry Fetch

email.js in react

TypeError: window.matchMedia is not a function

wget post json

phonepe payment gateway pg node js

ssn input react

json string to object jQuery

Easy Data fetching in React

disable rule jsx-a11y/label-has-for

react-native-confirmation-code-field

reset select2 in bootstrap modal

nodejs export and import

mui datagrid rows per page

objs.sort() js

full calendar angular

replace all empty lines with regex javascript

create json jquery

mysql docker ER_NOT_SUPPORTED_AUTH_MODE

switch case in js

hide button after click react

edit xlsx file on nodejs without losing styling

chart js tooltip not showing

how to do hello world in python

javascript standard deviation

enter button submit from react

loop in formarray

bridging react native and native

gsap splittext alternative

jenkins nodejs

expo 50 nav bar

load npm to browser

moment-timezone

currency formatter js

image to text react native

Nodejs image uploader

jquery check if in viewport

parallax effect download js

jsx Nextjs, dashboard, kazi, zobaidul kazi

expect function to throw error vite/jest

react toastify promise

make.com arrays

react flex

javascript object.fromentries

format json without quotes

wordpress page keeps reloading

nodelist javascript

angular refresh page after submit

unminify js

jquery class contains text

ajax to controller not mapping list of ints

pdf.js shortcode

js length of string

ng build prod not working

or truth table

js or symbol

Git - Ignore node_modules folder everywhere

.net and javascript date functions format

js element in viewport

object detection in react native

remove repeated elements in array javascript

useTransission react

custom cursor for react

react get blue outline on routing Links

get rid of blue button effect on react links

nextjs remote url image

react router v6 basic code

lua table to json online

download video from url javascript

jquery set max length input

JS not selecting the element

react native clock