Molara-Lab / Molara

Molara is a Python package for the visualization of chemical structures such as molecules or crystals. It provides a graphical user interface for importing structures from output files of popular computational chemistry software as well as for creating custom structures.
GNU General Public License v3.0
11 stars 0 forks source link

Export images with higher resolution #326

Closed adrianusler closed 2 months ago

adrianusler commented 4 months ago

In think that this requires something like a virtual openGLWidget that is larger than the displayed one. One could then maybe call makeCurrent() on this one and grab the framebuffer from there? I'll see what can be done.

Update: I found a solution and will implement this soon! Update: See PR #373. But I need to implement some tests before we can merge it.

Michel-Heinz commented 4 months ago

It might be possible to render to a separate framebuffer. However I do not know if there are any routines to export this framebuffer as png.

adrianusler commented 4 months ago

@Michel-Heinz apparently, the openGL-context must be part of a window. So I guess I have to add a "virtual" (i.e., permanently hidden) Gui form to the mix and render images on that when it's needed.

adrianusler commented 4 months ago

Technically, this is a duplicate of #221. But since we have had a discussion here, I will close #221 (even though it is older).