Skip to content
English
  • There are no suggestions because the search field is empty.

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}')