Skip to content

Commit 7935e91

Browse files
authored
Fix: ldopengl screenshot reverse color (#4136) (#4147)
1 parent 289c592 commit 7935e91

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

module/device/method/ldopengl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def screenshot(self):
247247

248248
img = ctypes.cast(img_ptr, ctypes.POINTER(ctypes.c_ubyte * (height * width * 3))).contents
249249

250-
image = np.ctypeslib.as_array(img).reshape((height, width, 3))
250+
image = np.ctypeslib.as_array(img).copy().reshape((height, width, 3))
251251
return image
252252

253253
@staticmethod

0 commit comments

Comments
 (0)