콘텐츠로 건너뛰기
한국어
  • 검색 필드가 비어 있으므로 제안 사항이 없습니다.

Sample Python Code for BioMini

The BioMini SDK does not have official support for Python.  

Some Example of Python that show tom load the DLL and use the functions in python , please check

from ctypes import *

mydll = windll.LoadLibrary("./UFScanner.dll")
result = mydll.UFS_Init()
print(f'result : {result}')

saveFile = 'testOutputFile.bmp'
scannerNum = c_int()
scannerHandle = c_void_p()
saveFileName = saveFile.encode('utf-8')
result = mydll.UFS_GetScannerNumber(byref(scannerNum))

if scannerNum.value > 0:
result = mydll.UFS_GetScannerHandle(0, byref(scannerHandle))
print(f'scannerHandle : {scannerHandle}')

result = mydll.UFS_CaptureSingleImage(scannerHandle)
print(f'result : {result}')

if result == 0:
result = mydll.UFS_SaveCaptureImageBufferToBMP(scannerHandle, create_string_buffer(saveFileName))

result = mydll.UFS_Uninit()
print(f'result : {result}')