函数:ts.img.save 保存颜色表为图片文件(仅支持 iOS)

函数名称:保存颜色表为图片文件

函数功能:保存颜色表为图片文件

函数方法

ts.img.save(tab,imgPath)

返回值:无

参数 类型 必填 说明
tab table 颜色表
imgPath string 保存路径

函数用例

local ts = require("ts")
ss = ts.img.screen(101, 101, 200, 200)
--由于  ts.img.screen 函数所生成的颜色表坐标相反,所以需要转换下坐标
ts.img.save(ss,userPath().."/res/test_2.png")--不支持相对路径
Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""