方法介绍

方法名称:binaryImage二值化本地图片,图片格式可以是png bmp jpg三种类型

语法:binaryImage(srcimage,dstimage)

参数说明:srcimage是源图片,dstimage是生成后的二值化图片

返回值:1表示成功0表示失败

方法例子

local path = "/mnt/sdcard/test.png"

local save = "/mnt/sdcard/save.png"

snapShot(path,200,211,350,330)

local ret = binaryImage(path,save)

if ret == 1 then

local id = createHUD()

showHUD(id,"HelloWorld!",12,"0xffff0000",save,0,100,100,200,200)

else

print("binaryimage failed")

end

sleep(100000)

Copyright © 湖南合鑫网络科技有限公司 2020 all right reserved,powered by Gitbook该文件修订时间: 2020-11-12 15:25:48

results matching ""

    No results matching ""