-
Notifications
You must be signed in to change notification settings - Fork 17
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
Save canvas as PNG without loss of resolution #95
Comments
This is why |
The screenshot button should generate an image with the same resolution as the dataset instead of just exporting the current rendering buffer of the canvas (the "View image" context menu action can still do that). |
I think this is a great use case for I think this solution would be a lot cleaner than trying to generate a PNG manually from the texture data. Unfortunately, EDIT: Firefox officially supports |
With the |
Just to clarify that this issue is about generating a PNG image of the WebGL canvas as the user sees it (zoom level, color map, etc.), as opposed to #35, which was about exporting the raw dataset/slice as TIFF/NPY. The challenge here is to generate a PNG without losing any resolution. The current "Snapshot" button only outputs an image with the size of the canvas as it is displayed on the screen. This is where EDIT: R3F now seems to support rendering into an offscreen canvas: pmndrs/react-three-fiber#2770 |
Note that, in Firefox at least, there's a "View image" contextual option on the heatmap's canvas, which generates an image automatically. This doesn't work for me, but it works somewhat for others:
It may be worth making sure "View image" works before implementing a more advanced export feature.
The text was updated successfully, but these errors were encountered: