zi-kang / EasyAR-miniprogram-WebAR-Demo

46 stars 24 forks source link

使用token,上传图片编码出错 #3

Open LQG24 opened 5 years ago

LQG24 commented 5 years ago

byte length of Uint32Array should be a multiple of 4;at api canvasGetImageData success callback function RangeError: byte length of Uint32Array should be a multiple of 4

byte length of Uint32Array should be a multiple of 4;at api canvasGetImageData success callback function RangeError: byte length of Uint32Array should be a multiple of 4 at typedArrayConstructByArrayBuffer () at new Uint32Array (native) at Function.UPNG.encode.compress (weapp:///UPNG.js:680:23) at Function.UPNG.encode.compressPNG (weapp:///UPNG.js:633:29) at Object.UPNG.encode (weapp:///UPNG.js:540:30) at success (weapp:///pages/recognition/recognition.js:62:40) at Function.o.success ([publib]:1:364012) at Object.success ([publib]:1:101839) at g ([publib]:1:276432) at Ue ([publib]:1:276618)

wangchangbing711 commented 5 years ago

解决了么?我也有这个问题

zi-kang commented 5 years ago

请参考:https://stackoverflow.com/questions/8419865/uint32array-buffer-byteoffset-length-does-not-work-as-expected

image

zi-kang commented 5 years ago

采用小程序新出来的API就可以了,识别速度也会加快

image