Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

Openseadragon-screenshot

This is a plugin for the openseadragon viewer that allows you to take a screenshot of whatever it is you are looking at in the browser. It includes an optional menu.

Wanna see it in action?

https://ktgleiden.github.io/openseadragon-screenshot/

Worthy to note

This plugin will work with the master branch of openseadragon (no stable release yet). If you need it to work with older versions, the only thing is that This commit is needed, since the viewer has to wait until the image has loaded completely, until we make the screenshot. This will most probably be included in the next stable release, but if you just can't wait: add the code manually ;)

Installation instructions

  • Download openseadragon-screenshot.js
  • Download Filesaver.js, which I am using for creating the screenshot and downloading it.
    • Note: Filesaver.js has another dependency, which adds the .ToBlob() method for IE. If you want IE support, also download this! Canvas-toBlob.js
  • Use the following code to add a button to make a screenshot:
    // viewer will be your OpenSeaDragon viewer object
    viewer.screenshot({
        showOptions: true, // Default is false
        keyboardShortcut: 'p', // Default is null
        showScreenshotControl: true // Default is true
        
    });

##Troubleshooting If this plugin reports that "your canvas is tainted" and it cannot export it in that case, please initialize the viewer object with the following parameter:

    var viewer = Openseadragon({
        ...,
        crossOriginPolicy: "Anonymous"
    })

About

Plugin for openseadragon, which allows you to make a screenshot of your current viewport, with a user specified resolution.

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.