GLVis / pyglvis

GLVis Jupyter Widget
BSD 3-Clause "New" or "Revised" License
14 stars 3 forks source link

Screenshot/export? #5

Closed rw-anderson closed 3 years ago

rw-anderson commented 3 years ago

Is there any way to capture/export the images created in a pyglvis widget? The "S" "ctrl-P" keys does not seem to dump a screenshot like it does in glvis.

tzanio commented 3 years ago

@tomstitt can correct me if I'm wrong, but I believe the screenshots are disabled in the JS (and consequently) pyglvis versions. I'm not sure if there is a technical/security reason for that, or if it just hasn't been implemented.

Is taking a regular OS screenshot (e.g. Cmd-Shift-4 on a Mac) not sufficient for your needs?

rw-anderson commented 3 years ago

I'm trying to create galleries of figures programatically, so manual screenshots isn't really feasible.

tomstitt commented 3 years ago

@tzanio is correct, the screenshot code is not implemented for the Emscripten/JS build we use in pyglvis. It's something we should be able to add and I'll let you know when it's working.

tzanio commented 3 years ago

Resolved by https://github.com/GLVis/glvis/pull/196 and https://github.com/GLVis/glvis-js/pull/12.

Will be deployed as part of glvis-4.1.