tfjs-wechat
tfjs-wechat copied to clipboard
rangeError length out of range of buffer
const temp = tf.tensor(new Uint8Array(frame.data), [frame.height, frame.width, 4]) 在这个方法中,ios14.5以上报rangeError length out of range of buffer错误,其他的没有问题
const video = tf.tidy(() => { const temp = tf.tensor(new Uint8Array(frame.data), [frame.height, frame.width, 4]) const sliceOptions = getFrameSliceOptions(this.cameraPosition, frame.width, frame.height, this.displaySize.width, this.displaySize.height) return temp.slice(sliceOptions.start, sliceOptions.size).resizeBilinear([this.displaySize.height, this.displaySize.width]) })
temp 无法输出直接报angeError length out of range of buffer,ios14.5以上
套层数据壳,验证可用 https://developers.weixin.qq.com/community/develop/doc/00004ac90484e072a91cec43d56800