{"_id":"watermarkjs","_rev":"11-58ecdf0a68d1428a4c8b1f267232bee1","name":"watermarkjs","description":"Watermarked images in the browser","dist-tags":{"1.0.0":"1.0.0","latest":"2.1.1"},"versions":{"1.0.0":{"name":"watermarkjs","version":"1.0.0","description":"Watermarked images in the browser","main":"dist/watermark.js","scripts":{"test":"jest","build":"gulp","start":"gulp watch","server":"gulp server"},"repository":{"type":"git","url":"git@github.com:brianium/watermarkjs.git"},"keywords":["canvas","watermark","image","file"],"author":{"name":"Brian Scaturro","email":"scaturrob@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/brianium/watermarkjs/issues"},"homepage":"https://github.com/brianium/watermarkjs","dependencies":{},"devDependencies":{"babel":"^5.1.10","babel-jest":"^4.0.0","babelify":"^6.1.0","browser-sync":"^2.7.1","browserify":"^8.1.3","del":"^1.1.1","gulp":"^3.8.11","gulp-concat":"^2.4.3","gulp-jshint":"^1.9.2","gulp-rename":"^1.2.0","gulp-uglify":"^1.1.0","jest-cli":"^0.2.2","jshint-stylish":"^1.0.0","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"jest":{"setupEnvScriptFile":"bootstrap.js","scriptPreprocessor":"<rootDir>/node_modules/babel-jest","testFileExtensions":["js"],"moduleFileExtensions":["js"]},"gitHead":"fdfde606aed9f2201d9f78a70065299cc5466c08","_id":"watermarkjs@1.0.0","_shasum":"c1696f4466e2fb42adf1671e82f4f2c418249d8a","_from":"./","_npmVersion":"1.4.28","_npmUser":{"name":"brianium","email":"scaturrob@gmail.com"},"maintainers":[{"name":"brianium","email":"scaturrob@gmail.com"}],"dist":{"shasum":"c1696f4466e2fb42adf1671e82f4f2c418249d8a","tarball":"https://registry.npmjs.org/watermarkjs/-/watermarkjs-1.0.0.tgz","integrity":"sha512-adiFU5jseroaDsd+yotuVH/vugRd8PsVGHbresL4FqBlT0nDr2/FilSnjA4YlluX2yDSEvY3iZa6sSF9MRYFZg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGjaKvzzBChpDF39w6wB0+mZtrT9LBWjyC2QxiZN8hqzAiEAgEdKttUxx1xfvrRcsn/lx0RU+kA8nXqk6rv35gGxj54="}]},"directories":{}},"1.1.0":{"name":"watermarkjs","version":"1.1.0","description":"Watermarked images in the browser","main":"dist/watermark.js","scripts":{"test":"jest","bundle":"browserify -s watermark --bare -p browserify-derequire -t [ babelify --presets [ es2015 ] ] index.js > dist/watermark.js","minify":"uglifyjs --compress --mangle --screw-ie8 -o dist/watermark.min.js dist/watermark.js","sync":"browser-sync start --server examples --index index.html --files 'examples/**/*.css, examples/**/*.html, examples/**/*.js' --port 4000","copy-dist":"cp dist/* examples/scripts","watch":"watch 'npm run build' lib","build":"npm run bundle && npm run minify && npm run copy-dist","dev":"npm run watch & npm run sync"},"repository":{"type":"git","url":"git+ssh://git@github.com/brianium/watermarkjs.git"},"keywords":["canvas","watermark","image","file"],"author":{"name":"Brian Scaturro","email":"scaturrob@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/brianium/watermarkjs/issues"},"homepage":"https://github.com/brianium/watermarkjs","devDependencies":{"babel-jest":"^6.0.1","babel-polyfill":"^6.3.14","babel-preset-es2015":"^6.3.13","babel-register":"^6.3.13","babelify":"^7.2.0","browser-sync":"^2.10.0","browserify":"^12.0.1","browserify-derequire":"^0.9.4","jest-cli":"^0.8.1","watch":"^0.16.0"},"jest":{"setupEnvScriptFile":"jestEnvironment.js","scriptPreprocessor":"<rootDir>/node_modules/babel-jest","testFileExtensions":["js"],"moduleFileExtensions":["js"]},"gitHead":"0bfbd910968e5979c546039d399305fd7659e326","_id":"watermarkjs@1.1.0","_shasum":"a38f6cb0611ea478a131a09166c643ce16b12775","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"brianium","email":"scaturrob@gmail.com"},"dist":{"shasum":"a38f6cb0611ea478a131a09166c643ce16b12775","tarball":"https://registry.npmjs.org/watermarkjs/-/watermarkjs-1.1.0.tgz","integrity":"sha512-v5tnqqGb5O59s7PnYe0jhUFxfgFGKWuLb1Twpbwe7/npVQQQdP07Abry/SqIr1H+wpVcnpcUcN4BsvDmmefRVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEmTrx3VnrONQBy/jLTUnzSizxx92BlH2JlqDtPOjieIAiEA1FDsOW7u+x17SOkSXPRlQsav13RpMtUhazUAQfdxMm4="}]},"maintainers":[{"name":"brianium","email":"scaturrob@gmail.com"}],"directories":{}},"2.0.0":{"name":"watermarkjs","version":"2.0.0","description":"Watermarked images in the browser","main":"dist/watermark.js","scripts":{"test":"jest","bundle":"webpack","minify":"uglifyjs --compress --mangle --screw-ie8 -o dist/watermark.min.js dist/watermark.js","sync":"browser-sync start --server examples --index index.html --files 'examples/**/*.css, examples/**/*.html, examples/**/*.js' --port 4000","copy-dist":"cp dist/* examples/scripts","watch":"watch 'npm run build' lib","build":"npm run bundle && npm run minify && npm run copy-dist && notify -t 'npm run build' -m 'complete'","dev":"npm run watch & npm run sync"},"repository":{"type":"git","url":"git+ssh://git@github.com/brianium/watermarkjs.git"},"keywords":["canvas","watermark","image","file"],"author":{"name":"Brian Scaturro","email":"scaturrob@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/brianium/watermarkjs/issues"},"homepage":"https://github.com/brianium/watermarkjs","devDependencies":{"babel-jest":"^6.0.1","babel-polyfill":"^6.3.14","babel-preset-es2015":"^6.3.13","babel-register":"^6.3.13","babelify":"^7.2.0","browser-sync":"^2.10.0","browserify":"^12.0.1","browserify-derequire":"^0.9.4","jest-cli":"^0.8.1","node-notify":"^1.0.0","watch":"^0.16.0","webpack":"^1.12.9"},"jest":{"setupEnvScriptFile":"jestEnvironment.js","scriptPreprocessor":"<rootDir>/node_modules/babel-jest","testFileExtensions":["js"],"moduleFileExtensions":["js"]},"gitHead":"673cc8beb113d2bfd10da72f11854b8c8ec17610","_id":"watermarkjs@2.0.0","_shasum":"69dc3eb1beaa4f70c1189b202e3de6585ecd5b22","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"brianium","email":"scaturrob@gmail.com"},"dist":{"shasum":"69dc3eb1beaa4f70c1189b202e3de6585ecd5b22","tarball":"https://registry.npmjs.org/watermarkjs/-/watermarkjs-2.0.0.tgz","integrity":"sha512-layvDVDQhvz1OuaLx+6kjfRMU7UgYC1AuyUZfQjfNJe4gOvbi09d7JzHaRv2qMhP2zcFZyVJnVGTI71VTVqMmg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjenANjIEITsnwEMx53xDJSACMP5BN5bd2MimiqPtUwAIgXDEP8LIwByoJfjdDRG5JUnRw28QLHfAobAwOsjY3C3c="}]},"maintainers":[{"name":"brianium","email":"scaturrob@gmail.com"}],"directories":{}},"2.1.1":{"name":"watermarkjs","version":"2.1.1","description":"Watermarked images in the browser","main":"dist/watermark.js","scripts":{"test":"jest","bundle":"webpack","sync":"browser-sync start --server examples --index index.html --files 'examples/**/*.css, examples/**/*.html, examples/**/*.js' --port 4000","copy-dist":"cp dist/* examples/scripts","watch":"watch \"npm run build\" lib","build":"npm run bundle && npm run copy-dist && notify -t 'npm run build' -m 'complete'","dev":"npm run watch & npm run sync"},"repository":{"type":"git","url":"git+ssh://git@github.com/brianium/watermarkjs.git"},"keywords":["canvas","watermark","image","file"],"author":{"name":"Brian Scaturro","email":"scaturrob@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/brianium/watermarkjs/issues"},"homepage":"https://github.com/brianium/watermarkjs","devDependencies":{"@babel/core":"^7.7.2","@babel/preset-env":"^7.7.1","babel-jest":"^24.9.0","babel-loader":"^8.0.6","babelify":"^10.0.0","browser-sync":"^2.26.7","browserify":"^16.5.0","browserify-derequire":"^1.0.1","jest-cli":"^24.9.0","node-notifier-cli":"^1.1.2","uglifyjs-webpack-plugin":"^2.2.0","watch":"^1.0.2","webpack":"^4.41.2","webpack-cli":"^3.3.10"},"jest":{"setupFiles":["<rootDir>/jestEnvironment.js"],"transform":{"\\.js$":["babel-jest"]},"moduleFileExtensions":["js"]},"gitHead":"523ea613c6f7f22a68e775f82066d16ad207716c","_id":"watermarkjs@2.1.1","_nodeVersion":"12.14.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-HDabpga8Fz5d61Z7gBkKO2cDsfViAU/mO5qIoWmDX92wJZLb7Dv4L+CwoHAqS4XkqWcYVGy/AF035BD1EN3v/g==","shasum":"ed14aae56b509937be4e56f379981786e0335522","tarball":"https://registry.npmjs.org/watermarkjs/-/watermarkjs-2.1.1.tgz","fileCount":56,"unpackedSize":896253,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeDzJTCRA9TVsSAnZWagAArigP/iTpWYXmmI2TkjOSLU58\nKQlIGa8flljNX+JXByrL5uoiX3Ly2Z6WPYEaBaOyg/3xHAecdBOqtTFYBtKA\nOf3/7WxlO2uoRNRD7TpvlETseMXXpHhW0Xam8zBOfzSXcljaBsZ/kueGGxlN\nd2DVddffkHJre1zutn1dh2V3nWrT/csa+BbyPXA4ADN4Gcda8A4wXpzv9YZn\ng0FgZYLiwiQYSFowYdvFzSBAEItOsllVYk5g6RcdcJg1TwOPe/p9vryOZ29g\nuFKH8+nbzd5SbszZYGGwyJypyS2/B3Tlzw39xCzKcei/ntC1VCJrKPamzqZG\n4mB3gcUItDm5XyNjHiquZ2JOokwsEG+HwEZzP8KgkqpQbcJzJcJd4XRwuP3x\n0HoTWQ5lqg4m4xfsC9v0LVsz5I8pJ2UZ1RQtCtpdKm/yzMO1P5SSY5tlxJIs\nipqCsCBj+Jrg42C1vjEazosZEYptgdNoFAhqXQM6WRpfwSkp++JOXFyH2RIg\n0LhIsqHZhq4ii0yVHddV4YLdtBtZRxIR/yt0YFaqYcdxko9zgrlPkdWaXy+h\n9rezQKK1PInWoDdMBHz7h5SW/9s31OEBhuCo8SwVYB8poFfYpuwbYj48BYyO\nRZwttEbl5YkaEsK52XH+W+DdCuRcp0GjtWNAtctLBoYBhVnyGbmD1ZmvuCYM\n4/xx\r\n=YrAu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHctzkKE7wg/tZbTVzzNXqqMZky/Ukpm45GO+5rKbtX2AiEAu4HdcPzRsDiKQsm8peyKNuMru4nhsBw5Ycc867kgDAc="}]},"maintainers":[{"name":"brianium","email":"scaturrob@gmail.com"}],"_npmUser":{"name":"brianium","email":"scaturrob@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/watermarkjs_2.1.1_1578054226922_0.616685955922526"},"_hasShrinkwrap":false}},"readme":"# watermark.js [![Build Status](https://travis-ci.org/brianium/watermarkjs.svg?branch=master)](https://travis-ci.org/brianium/watermarkjs)\n\nA functional library for watermarking images in the browser. Written with ES6, and made available\nto current browsers via [Babel](https://babeljs.io/). Supports urls, file inputs, blobs, and on-page images.\n\n**Note:**\nFor anyone that is interested: I ported this to a ClojureScript library called\n[Dandy Roll](https://github.com/brianium/dandy-roll).\n\n## Tested Browsers\n\nAny browser supporting [File](https://developer.mozilla.org/en-US/docs/Web/API/File#Browser_compatibility) and [FileReader](https://developer.mozilla.org/en-US/docs/Web/API/FileReader#Browser_compatibility) should work. The following browsers have been\ntested and work:\n\n* IE10 (Windows 7)\n* Chrome 42 (OS X 10.10.3)\n* Firefox 38 (OS X 10.10.3)\n* Safari 8.0.6 (OS X 10.10.3)\n* Opera 29.0 (OS X 10.10.3)\n\nPlease feel free to update this list or submit a fix for a particular browser via a pull request.\n\n## Installing\n\nwatermark.js is available via npm and bower:\n\n```\n# install via npm\n$ npm install watermarkjs\n\n# install via bower\n$ bower install watermarkjs\n```\n\n## Usage\n\n```js\n// watermark by local path\nwatermark(['img/photo.jpg', 'img/logo.png'])\n  .image(watermark.image.lowerRight(0.5))\n  .then(img => document.getElementById('container').appendChild(img));\n\n// load a url and file object\nconst upload = document.querySelector('input[type=file]').files[0];\nwatermark([upload, 'img/logo.png'])\n  .image(watermark.image.lowerLeft(0.5))\n  .then(img => document.getElementById('container').appendChild(img));\n\n// watermark from remote source\nconst options = {\n  init(img) {\n    img.crossOrigin = 'anonymous'\n  }\n};\nwatermark(['http://host.com/photo.jpg', 'http://host.com/logo.png'], options)\n  .image(watermark.image.lowerRight(0.5))\n  .then(img => document.getElementById('container').appendChild(img));\n```\n\n## Building\n\nBefore building or testing, install all the deps:\n\n```\nnpm i\n```\n\nThere is an npm script you can run to build:\n\n```\nnpm run build\n```\n\nOr to kick off the file watcher and build as you make changes, run the start task:\n\n```\n$ npm start\n```\n\n## Testing\n\nThere is an npm script for that too!:\n\n```\n$ npm test\n```\n\nThis library uses the [Jest](https://facebook.github.io/jest/) testing framework. Due to some current\nissues with Jest, Node 0.10.x is required to run the tests.\n\n## Examples\n\nYou can view examples and documentation by running the `sync` task via npm:\n\n```\n$ npm run sync\n```\nThe examples demonstrate using watermark images and text, as well as a demonstration\nof uploading a watermarked image to Amazon S3. It is the same content hosted at\n[http://brianium.github.io/watermarkjs/](http://brianium.github.io/watermarkjs/).\n\n## Development\n\nRunning `npm run dev` will start a browser and start watching source files for changes.\n\n## Motivation\n\n* Not every server has image libraries (shared hosting anyone?)\n* Not every server has reliable concurrency libs for efficient uploading (shared hosting anyone?)\n* JavaScript is fun and cool - more so with ES6\n\nClearly watermarking on the client has some limitations when watermarking urls and on-page elements. The curious can find urls for non-watermarked images, but it is likely that most average users won't go down this path - keeping this soft barrier useful. However!...\n\nwatermark.js has the ability to accept file inputs as a source for watermarking. This makes it easy to preview, watermark, and upload without the non-watermarked image ever becoming public. Check out the [uploading](http://brianium.github.io/watermarkjs/uploading.html) demo to see this in action.\n\nThis tool certainly shines in admin or CMS environments where you want to generate watermarks and upload them asynchronously where it would not be possible or preferable on the server. One less thing the server has to do can be a good thing :)\n\n## Suggestions? Improvements?\n\nPlease open issues or pull requests if you have bugs/improvements.\n","maintainers":[{"name":"brianium","email":"scaturrob@gmail.com"}],"time":{"modified":"2022-06-28T22:08:36.745Z","created":"2015-05-14T00:19:26.455Z","1.0.0":"2015-05-14T00:19:26.455Z","1.1.0":"2015-12-10T13:03:51.357Z","2.0.0":"2016-01-26T11:37:31.422Z","2.1.0":"2020-01-03T12:10:20.116Z","2.1.1":"2020-01-03T12:23:47.143Z"},"homepage":"https://github.com/brianium/watermarkjs","keywords":["canvas","watermark","image","file"],"repository":{"type":"git","url":"git+ssh://git@github.com/brianium/watermarkjs.git"},"author":{"name":"Brian Scaturro","email":"scaturrob@gmail.com"},"bugs":{"url":"https://github.com/brianium/watermarkjs/issues"},"license":"MIT","readmeFilename":"README.md","users":{"chirag8642":true,"vivek.vikhere":true}}