mirror of
https://github.com/yv1ing/ShotRDP.git
synced 2025-09-16 15:10:57 +08:00
封装识别接口
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import ctypes
|
||||
from predict import solve
|
||||
|
||||
|
||||
def shot(target, width, height):
|
||||
@@ -20,9 +21,11 @@ def shot(target, width, height):
|
||||
if error_ptr:
|
||||
print(ctypes.string_at(error_ptr).decode())
|
||||
else:
|
||||
result = ctypes.string_at(data, length.value)
|
||||
with open('./screen/0.png', 'wb') as f:
|
||||
f.write(result)
|
||||
image_bytes = ctypes.string_at(data, length.value)
|
||||
result = solve(image_bytes)
|
||||
|
||||
# with open('./screen/0.png', 'wb') as f:
|
||||
# f.write(result)
|
||||
|
||||
lib.Free(data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user