// let init = {
// type: "image/gif",
// data: imageByteStream
// };
// let imageDecoder = new ImageDecoder(init);
const url = 'https://editor-engine.test.bhbapp.cn/images/a.jpg'
function loadAsBolb(url, callback) {
const xhr = new XMLHttpRequest()
xhr.open('get', url, true)
xhr.responseType = 'blob'
xhr.onreadystatechange = function () { //绑定响应状态事件监听函数
if (xhr.readyState == 4) { //监听readyState状态
if (xhr.status == 200 || xhr.status == 0) { //监听HTTP状态码
callback && callback(xhr.response); //接收数据
}
}
}
xhr.send()
}
loadAsBolb(url, function (xx) {
console.log(URL.createObjectURL(new Blob(xx)))
})
console