scannerlib的python demo增加穿孔移除设置

This commit is contained in:
luoliangyi 2023-03-24 09:16:25 +08:00
parent 5e5e88ce38
commit 760cfb332b
2 changed files with 57 additions and 0 deletions

View File

@ -172,6 +172,30 @@ Ret = HGLib_SetDeviceParam(Device, 37, byref(DevParam)) #HGLIB_OPTION_NAME_XCHK
DevParam = ctypes.c_int(54) #HGLIB_OPTION_ENUMVALUE_BJTCFS_ADBX 凸多边形
Ret = HGLib_SetDeviceParam(Device, 42, byref(DevParam)) #HGLIB_OPTION_NAME_BJTCFS 背景填充方式
DevParam = ctypes.c_int(1)
Ret = HGLib_SetDeviceParam(Device, 45, byref(DevParam))
DevParam = ctypes.c_double(0.1)
Ret = HGLib_SetDeviceParam(Device, 46, byref(DevParam))
DevParam = ctypes.c_int(1)
Ret = HGLib_SetDeviceParam(Device, 47, byref(DevParam))
DevParam = ctypes.c_double(0.1)
Ret = HGLib_SetDeviceParam(Device, 48, byref(DevParam))
DevParam = ctypes.c_int(1)
Ret = HGLib_SetDeviceParam(Device, 49, byref(DevParam))
DevParam = ctypes.c_double(0.1)
Ret = HGLib_SetDeviceParam(Device, 50, byref(DevParam))
DevParam = ctypes.c_int(1)
Ret = HGLib_SetDeviceParam(Device, 51, byref(DevParam))
DevParam = ctypes.c_double(0.1)
Ret = HGLib_SetDeviceParam(Device, 52, byref(DevParam))
#扫描事件回调
def HGLibDeviceScanEventFunc(device: c_void_p, event: c_uint, err: c_int, info: c_char_p, param: c_void_p):

View File

@ -163,6 +163,39 @@ HGLib_SetDeviceParam.restype = ctypes.c_int
DevParam = ctypes.c_int(1) #HGLIB_OPTION_ENUMVALUE_DLSCLX_W -> 不进行多流输出类型
Ret = HGLib_SetDeviceParam(Device, 1, byref(DevParam)) #见HGLib_SetDeviceParam 头文件接口说明 1 -> HGLIB_OPTION_NAME_DLSC 多流输出
DevParam = ctypes.c_int(300)
Ret = HGLib_SetDeviceParam(Device, 27, byref(DevParam)) #HGLIB_OPTION_NAME_FBL 分辨率
DevParam = ctypes.c_int(1)
Ret = HGLib_SetDeviceParam(Device, 37, byref(DevParam)) #HGLIB_OPTION_NAME_XCHK 消除黑框
DevParam = ctypes.c_int(54) #HGLIB_OPTION_ENUMVALUE_BJTCFS_ADBX 凸多边形
Ret = HGLib_SetDeviceParam(Device, 42, byref(DevParam)) #HGLIB_OPTION_NAME_BJTCFS 背景填充方式
DevParam = ctypes.c_int(1)
Ret = HGLib_SetDeviceParam(Device, 45, byref(DevParam))
DevParam = ctypes.c_double(0.1)
Ret = HGLib_SetDeviceParam(Device, 46, byref(DevParam))
DevParam = ctypes.c_int(1)
Ret = HGLib_SetDeviceParam(Device, 47, byref(DevParam))
DevParam = ctypes.c_double(0.1)
Ret = HGLib_SetDeviceParam(Device, 48, byref(DevParam))
DevParam = ctypes.c_int(1)
Ret = HGLib_SetDeviceParam(Device, 49, byref(DevParam))
DevParam = ctypes.c_double(0.1)
Ret = HGLib_SetDeviceParam(Device, 50, byref(DevParam))
DevParam = ctypes.c_int(1)
Ret = HGLib_SetDeviceParam(Device, 51, byref(DevParam))
DevParam = ctypes.c_double(0.1)
Ret = HGLib_SetDeviceParam(Device, 52, byref(DevParam))
#扫描事件回调
def HGLibDeviceScanEventFunc(device: c_void_p, event: c_uint, err: c_int, info: c_char_p, param: c_void_p):