CDAT / vcs-js

3 stars 3 forks source link

Add screenshot saving functionality #52

Open scottwittenburg opened 6 years ago

scottwittenburg commented 6 years ago

We need the ability to save a screenshot of a plot, either on the server, or to the clients desktop, or both. This feature should allow us to specify the size of the saved image (in pixels), in case it's different from the size that may have already been plotted in the browser. We should probably not require that the plot is already rendered in the browser before allowing to save a screenshot on either side.

In general we should target allowing to save in any file format that is already supported by vcs. However, without this requirement, saving on the client might normally be fairly simple, as we could just get our hands on the already-rendered canvas, and get the image as base64. If we need to support saving pdf or postscript on the clients desktop, then we will need to come up with a way create that data format on the server and encode it to be sent to the client.

scottwittenburg commented 6 years ago

@James-Crean I added this as an issue to allow to track these efforts better on our end. Please feel free to chime in here with anything you think is important from our email conversation, which I may not have already covered.

scottwittenburg commented 6 years ago

ping @aashish24 @danlipsa

James-Crean commented 6 years ago

Thanks Scott! It looks very thorough to me, and I do not see anything missing at the moment.