convert image into blob using javascript

前端 未结 2 770
不思量自难忘°
不思量自难忘° 2020-12-24 03:15

I use promise to download an image and get the image data like:

promise.downloadFile().then(function(image){                
    //do something
});
         


        
2条回答
  •  萌比男神i
    2020-12-24 04:09

    You can try this node module

    https://www.npmjs.com/package/image-to-blob

    or you can convert image to canvas, then convert to blob uri:

    https://github.com/blueimp/JavaScript-Canvas-to-Blob

提交回复
热议问题