[LayaAir3]Laya.loader 加载png图片失真
Laya.loader.load(url, {
type: Laya.Loader.TEXTURE2D,
propertyParams: {
premultiplyAlpha: true, // 不预乘alpha
filterMode: Laya.FilterMode.Bilinear, // 使用双线性过滤
wrapModeU: Laya.WrapMode.Repeat, // U坐标使用Clamp模式
wrapModeV: Laya.WrapMode.Repeat // V坐标使用Clamp模式
}, constructParams: [undefined, undefined, Laya.TextureFormat.R8G8B8A8, true, true]
}).then((texture: any) => {}
因为我需要读取PNG图片像素点 所以加载使用了上图的方式(canRead:true),但是图片加载出来失真了,是我参数没用对么?或者有没有其他的方式读取像素?原图已上传
type: Laya.Loader.TEXTURE2D,
propertyParams: {
premultiplyAlpha: true, // 不预乘alpha
filterMode: Laya.FilterMode.Bilinear, // 使用双线性过滤
wrapModeU: Laya.WrapMode.Repeat, // U坐标使用Clamp模式
wrapModeV: Laya.WrapMode.Repeat // V坐标使用Clamp模式
}, constructParams: [undefined, undefined, Laya.TextureFormat.R8G8B8A8, true, true]
}).then((texture: any) => {}
因为我需要读取PNG图片像素点 所以加载使用了上图的方式(canRead:true),但是图片加载出来失真了,是我参数没用对么?或者有没有其他的方式读取像素?原图已上传
没有找到相关结果
已邀请:
要回复问题请先登录
0 个回复