Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebAgg Backend Canvas is Not an Image #3972

Closed
blink1073 opened this issue Jan 6, 2015 · 10 comments
Closed

WebAgg Backend Canvas is Not an Image #3972

blink1073 opened this issue Jan 6, 2015 · 10 comments

Comments

@blink1073
Copy link
Member

If you have this canvas in Firefox:

screenshot from 2015-01-06 13 38 42

And then right click and select "View Image", you get:

screenshot from 2015-01-06 13 38 59

The URL is: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAEvklEQVR4nO3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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om
Copy link
Member

mdboom commented Jan 6, 2015

It's an HTML canvas on to which difference images are composited. I don't think browsers generally have a way to save/view that as an image. Note in the toolbar, however, that you can choose an image format and press the "save" button to get an image. I'm going to close this as "not a bug", but please let us know if the existing save functionality isn't sufficient for your use case.

@mdboom mdboom closed this as completed Jan 6, 2015
@tacaswell
Copy link
Member

I wonder if this is related to having two layers of canvas objects ('canvas' and 'rubberband').

@blink1073
Copy link
Member Author

There is no toolbar entry for "Save" in the webagg backend, and the "S" shortcut key is not implemented either.

@blink1073
Copy link
Member Author

Whoops, the toolbar entry is there.

@blink1073
Copy link
Member Author

Looks like I need to connect the "S" key to the toolbar implementation...

@blink1073
Copy link
Member Author

Ah, there is no save button in the NbAgg backend, that's what I was thinking of.

@pelson
Copy link
Member

pelson commented Jan 6, 2015

Incidentally, in the nbagg backend, it is possible to right click and save (at least, I remember trying to make it possible). I think I do that by sneakily capturing the right mouse click and pushing the lower image into the upper, or something.

@mdboom
Copy link
Member

mdboom commented Jan 6, 2015

@pelson: Can you remind me of the reasoning for not having a save button in NbAgg? I know you had some good justification, but I can't seem to find it, and it seems useful to me to have it at first blush.

@blink1073
Copy link
Member Author

Context menus are disabled in nbagg and right clicks have no effect.

@pelson
Copy link
Member

pelson commented Jan 7, 2015

Context menus are disabled in nbagg and right clicks have no effect.

Wow, it is amazing how well I compartmentalize things and then move on! I completely forgot I did that.

Can you remind me of the reasoning for not having a save button in NbAgg?

The webagg backend has a saved image endpoint (URL) which, when you click save, directs to you that URL. With IPython, we have no such endpoint. It might be possible to navigate to a data URL though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants