These are chat archives for openseadragon/openseadragon

26th
Jan 2017
foobarable
@foobarable
Jan 26 2017 08:25
Just upgraded to 2.2.1 and nothing broke \o/
Dance
@jamesne49409099_twitter
Jan 26 2017 09:41
Hi, How do you change the background colour (behind the image) from black to white? Is that possible? James
AKremor
@AKremor
Jan 26 2017 11:21
@jamesne49409099_twitter I believe you can set the CSS background property on the div that OSD is set to use.
i.e If you look at the example at https://openseadragon.github.io, you can change the background-colorproperty on the #contentDiv to whatever you want, and it changes the colour shown behind/around the image. Also quickly shows it at https://codepen.io/anon/pen/JErEEm, where we set the background-color to #ff0707, a nice garish red.
Does anyone know if it is possible to get OSD to 'export' the current image as seen by the user? I would like to provide an export functionality, and need a way to capture the view as seen by the user. I'd like to avoid having to render the image server-side if possible, but can do it.
foobarable
@foobarable
Jan 26 2017 16:36
AKremor: i have a similar problem with printing overlays and i kept two issues as open tabs: openseadragon/openseadragon#477
maybe they help you
openseadragon/openseadragon#1049
Ian Gilman
@iangilman
Jan 26 2017 17:41
@AKremor The viewer just uses a canvas (unless you're on IE8), so you should be able to just do something like viewer.drawer.canvas.toDataURL()
AKremor
@AKremor
Jan 26 2017 21:43
@foobarable @iangilman Thanks to both of you for the recommendations! I'm using toDataUrl for my overlay, so its great I can use a similar method to get the image as well. I'll need to do some investigation to see if it's also possible to capture the overlay in a single call, so I don't need to worry about matching up coordinates.
Ian Gilman
@iangilman
Jan 26 2017 21:51
@AKremor You could make a third canvas and copy the viewer canvas and the overlay canvas into it and then do toDataURL from that, I suppose
AKremor
@AKremor
Jan 26 2017 22:04
Okay, interesting. I will look into that today