Building the image watermarking dependency for the Candyland webapp.
You can view a live app demo here.
$ node cli.js --help
📷 Image watermarking dependency for the Candyland web app
Usage
$ node cli.js [<options> ...]
Options
--help, -h Display help message
--input, -i Input file path
--output, -o Output file path
--text, -t Watermark text
--color, -c Watermark RGB color value
--version, -v Display installed version
Examples
$ node cli.js --help
$ node cli.js -i dogo.png -t 'Super Dogo!'
$ node cli.js -i dogo.png -o super-dogo.png -t 'Super Dogo!'
$ node cli.js -i dogo.png -t 'Super Dogo!' -c 'rgba(0, 255, 0)'
const watermak = require('./index');
const inputImage = 'dogo.png'; // Input image path
const color = 'rgb(255, 0, 0)'; // Watermark text color
const text = 'Super Awesome Dogo!'; // Watermark text
const outputImage = 'dogoWatermarked.png'; // Output image path
watermark.addWatermark(inputImage, outputImage, text, color);
Example: addWatermak.('Hello.png', 'world.png', 'Hello World', 'rgb(0, 255, 0)');
-
Type:
String
-
Optional:
False
-
Default Value:
None
Path of input png
, jpg
, gif
image file.
-
Type:
String
-
Optional:
True
-
Default Value:
~/candyland-watermark.png
Path of output png
, jpg
, gif
image file.
If not provided the output file will be saved at the home directory under the name ~/candyland-watermark.png
.
-
Type:
String
-
Optional:
True
-
Default Value:
'Candyland Watermark'
Text to be user as watermark on input image file.
If not provided the default text
value will be used.
-
Type:
String
-
Optional:
True
-
Default Value:
rgb(255, 0, 0)
Color to be used for the watermark text.
Any rgb
color value is valid to be used.
If not provided the default color
red rgb(255, 0, 0)
will be used.
The only external app dependency is imagemagick
.
You can get it straight from your system's official software repositories or by manually downloading the binaries from the official imagemagick homepage.
- Clone this repository to your local machine
- Navigate to your clone
cd candyland-dependency
- Install the dependencies
npm install
- Build the development server
npm start
- Run the API
npm run dist
- Run the CLI interface
npm run cli
- Cleanup assets & compiled files
npm run clean
- Leonidas Avdelas (@LoniasGR)
AM: 3113182
- George Baxopoulos (@georgebax)
AM: 3113021
- Konstantinos Mitropoulos (@tsikos7)
AM: 3113169
- Philippos Orphanoudakis (@PhilOrfan)
AM: 3113140
- Klaus Sinani (@klauscfhq)
AM: 3113623
- Christos Stilianidis (@Jezulas)
AM: 3113130
MIT © Candyland team