函数:ts.imgSize 图片缩放(仅支持 iOS)

函数功能:对指定图片进行缩放

ts.so 版本:仅 v1.2.1 以上版本支持

函数方法

ts.imgSize(path1,path2,w,h)

参数 类型 必填 说明
path1 string 指定缩放的图片路径
path2 string 生成的图片路径
w number 图片缩放后宽度
h number 图片缩放后高度

函数用例

local ts = require("ts")
path = userPath()
ts.imgSize(path.."/res/1.png",path.."/res/2.png",400,400)
--图片后缀可写 jpg 或 png

注意事项

  • 缩放函数可能导致图片变模糊
Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""