[Geojs-users] screenshotting minerva from a browser
jonathan.beezley at kitware.com
Mon Jul 11 21:29:26 EDT 2016
I looked into doing this a couple of months ago for Emory. For a couple of
reasons, it isn't currently possible.
1. Loading textures from cross origin requests taints the canvas, so the
browser won't let you access the pixels externally. The only way around
this is to proxy all of the tile requests through the main web server. I'm
not sure how all of that works through iframes if they are being served
from a different origin as well.
2. Dumping pixel data from a webgl context relies on loading them from a
framebuffer (gl.readPixels). From what David told me at the time, geojs
doesn't use a framebuffer. I believe it's possible to create a temporary
framebuffer for this purpose, but I know almost nothing about it. In any
case, it will require additional infrastructure in geojs to make it
possible; a call to an external library won't help unfortunately.
On Mon, Jul 11, 2016 at 9:09 PM, Michael Grauer <michael.grauer at kitware.com>
> Hi GeoJs-ers and others,
> For the Gumbo project it seems our partners want the ability to screenshot
> the contents of the current Minerva IFrame from the browser, and then
> export that screenshot via JS.
> They pointed me to this library which builds up a screenshot from the DOM,
> but it didn't seem to work for any webgl example pages I threw at it (with
> admittedly very little time put in).
> Has anyone run across this or have any ideas here, such as for an approach
> or to say that this will never work?
> My thought is that we could use this library to screenshot the DOM and
> export the webgl canvas to an image that was somehow included in that DOM
> or screenshot in the place of the canvas, but clearly it isn't well thought
> out or empirically tested.
> Thanks for your help or suggestions,
> Geojs-users mailing list
> Geojs-users at public.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Geojs-users