获取指定区域二值化图像 -GetThresholdImageFromMultiColor
获取指定区域二值化图像,只保留指定颜色
x1 , y1, x2, y2传 0, 0, 0, 0 为窗口整个客户区
接口名称
GetThresholdImageFromMultiColor
DLL调用
long GetThresholdImageFromMultiColor(long ola, int x1, int y1, int x2, int y2, string colorList)
参数定义:
ola
(长整型数): OLAPlug对象的指针,由DLL版本 CreateCOLAPlugInterFace 接口生成x1
(整型数): 查找区域的左上角X坐标y1
(整型数): 查找区域的左上角Y坐标x2
(整型数): 查找区域的右下角X坐标y2
(整型数): 查找区域的右下角Y坐标colorList
(字符串): 颜色列表的JSON字符串,格式如:[{"StartColor": "3278FA", "EndColor": "6496FF", "Type": 0}, {"StartColor": "3278FA", "EndColor": "6496FF", "Type": 1}]
示例:
待补充...
COM调用
long GetThresholdImageFromMultiColor(int x1, int y1, int x2, int y2, string colorList)
参数定义:
x1
(整型数): 查找区域的左上角X坐标y1
(整型数): 查找区域的左上角Y坐标x2
(整型数): 查找区域的右下角X坐标y2
(整型数): 查找区域的右下角Y坐标colorList
(字符串): 颜色列表的JSON字符串,格式如:[{"StartColor": "3278FA", "EndColor": "6496FF", "Type": 0}, {"StartColor": "3278FA", "EndColor": "6496FF", "Type": 1}]
示例:
返回值
长整型数:
OLAImage对象的地址
注意:图片使用完后需要调用 FreeImagePtr 接口进行释放