These are chat archives for openseadragon/openseadragon

1st
Aug 2016
MereHappyJaZZ
@MereHappyJaZZ
Aug 01 2016 16:13
Hi all,
non-developer here, so possibly ignorant questions incoming =)
OSD is working by streaming contents in a <div> element. I've seen some nice code adding filters to a <canvas>, http://evanw.github.io/glfx.js/
Questions is, how can I apply those filters to OSD?
Cheers! =)
VoidVolker
@VoidVolker
Aug 01 2016 16:35
@MereHappyJaZZ maybe set handler on some kind event like 'after render'
try to search in docs
Ian Gilman
@iangilman
Aug 01 2016 16:36
@MereHappyJaZZ You'd want to listen for the update-viewport event and manipulate the Viewer's drawer.context or drawer.canvas, like so:
viewer.addHandler('update-viewport', function() {
    viewer.drawer.context.fillRect(...);
});
Looks like the glfx library wants to make its own canvas though... in that case you would want the viewer hidden somehow and to use its canvas as a source texture for the glfx canvas
MereHappyJaZZ
@MereHappyJaZZ
Aug 01 2016 23:27
Thanks! Seems to be a bit too much for me, so I'll stick with "regular" webkit css filters which work directly on <div> =) Cheers!
Ian Gilman
@iangilman
Aug 01 2016 23:41
@MereHappyJaZZ You might try playing with this OSD plugin: https://github.com/usnistgov/OpenSeadragonFiltering