mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 21:40:33 +05:00
fix netgen.gui.Snapshot
This commit is contained in:
parent
9eb959f608
commit
8f11802953
@ -57,7 +57,7 @@ if not netgen.libngpy._meshing._netgen_executable_started:
|
|||||||
def Snapshot(w,h, filename=None):
|
def Snapshot(w,h, filename=None):
|
||||||
netgen.Redraw(blocking=True)
|
netgen.Redraw(blocking=True)
|
||||||
import numpy
|
import numpy
|
||||||
image = netgen.libngpy.Snapshot(w, h)
|
image = netgen.libngguipy.Snapshot(w, h)
|
||||||
image = numpy.array(image, dtype=numpy.uint8).reshape(h, w, 3)
|
image = numpy.array(image, dtype=numpy.uint8).reshape(h, w, 3)
|
||||||
image = image[::-1,:,:]
|
image = image[::-1,:,:]
|
||||||
if filename:
|
if filename:
|
||||||
|
Loading…
Reference in New Issue
Block a user