0.1.7 • Published 5 years ago
nodejs-watermark v0.1.7
nodejs-watermark
See the demo (master branch of this repo deployed to Heroku)
- Install GraphicsMagick on your machine (or a buildpack on your server)
- Clone this repo:
git@github.com:retzion/nodejs-watermark.git - Install dependencies:
npm i - Run it:
npm run start:dev - Try it out:
http://localhost:3000/https%3A%2F%2Fpicsum.photos%2F1200%2F777 - Try adding some params:
http://localhost:3000/u/https%3A%2F%2Fpicsum.photos%2F1200%2F777?resize=1200,660&geometry=660,540
Params:
Include geometry and resize as querystring parameters in order to customize the image.
resize: Tuple of X, Y dimensions for resizing the base image (?resize=800,450)geometry: Tuple of X, Y coordinates for where to place the watermark (?geometry=30,30)
resources:
Heroku Buildpack: https://elements.heroku.com/buildpacks/xerpa/heroku-buildpack-graphicsmagick