Giter VIP home page Giter VIP logo

node-iiif-watermarker's Introduction

IIIF Watermark Server

Adds a watermark on top of a IIIF Image API server call via a node proxy server. This can be useful if you only want to display content depending on a certain condition, if you want to easily add your logo to raw images, or if you just want watermarking while preserving IIIF functionality.

Example screenshot

To run this server:

  1. Clone this repo to your machine.
  2. Install graphicsMagick to allow your machine to watermark images on the fly.
  3. Run npm install in the root of this projects folder.
  4. Point all your manifest.json images to this mock servers port (4343)
  5. Run node server.js
  6. Your IIIF images will appear watermarked with the watermark.png file.

This has been tested with TIFY, Mirador and Universal viewer.

Modify the height/width of watermark.png or use the sharp API to change how the watermark appears.

If you need to easily setup a working IIIF server with images, use the image viewer comparison repo from @nationalarchives

Performance

  • Using TIFY, a 6477 x 9727 Map with a 6.1MB file size loaded in 10 seconds without the watermark, and 12.5 seconds with the watermark.

  • There is currently caching enabled on this proxy server, set to 60 minutes.

Known issues

  • If you have large images, a watermarked thumbnail will not be generated as the thumbnail may be smaller than the size of your watermark, which sharp does not allow. To solve this, I have set the server to just send an unwatermarked image if this happens.

Other

Credits for the smiley face used goes to wikipedia

node-iiif-watermarker's People

Contributors

ashgds avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.