tfjs-wechat icon indicating copy to clipboard operation
tfjs-wechat copied to clipboard

rangeError length out of range of buffer

Open WD-CHINA opened this issue 3 years ago • 3 comments

const temp = tf.tensor(new Uint8Array(frame.data), [frame.height, frame.width, 4]) 在这个方法中,ios14.5以上报rangeError length out of range of buffer错误,其他的没有问题

WD-CHINA avatar May 06 '21 08:05 WD-CHINA

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]) })

WD-CHINA avatar May 06 '21 08:05 WD-CHINA

temp 无法输出直接报angeError length out of range of buffer,ios14.5以上

WD-CHINA avatar May 06 '21 08:05 WD-CHINA

套层数据壳,验证可用 https://developers.weixin.qq.com/community/develop/doc/00004ac90484e072a91cec43d56800

cometwan avatar May 11 '21 09:05 cometwan