Which browsers (and versions) support the Canvas.toBlob method?

后端 未结 5 2100
醉话见心
醉话见心 2020-12-06 09:19

I\'m working on a minimalist image creation project and I need to have the ability to create images within the browser that are in-turn used on a server. So far, the

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-06 09:42

    It's been nearly 8 years since I first asked this question. Considering that I still get a trickle-in of upvotes and this question is often at the top of Google Searches, I figured I'd give an update to the state of Canvas.toBlob(...) and it's implementation.

    The following table:

                       |             | Version Support 
                       | Version     | for 'Quality'
    Browser            | Implemented | Parameter 
    -------------------+-------------+-----------------
    Android Webview)   |          50 |          50
    Chrome (Desktop)   |          50 |          50
    Chrome (Mobile)    |          50 | Unsupported 
    Edge (Desktop)     | Unsupported | Unsupported 
    Edge (Mobile)      | Unsupported | Unsupported 
    Firefox (Desktop)  |          19 |          25
    Firefox (Mobile)   |           4 |          25
    Internet Explorer* |          10 | Unsupported 
    Opera (Desktop)    |          37 |         Yes
    Opera (Mobile)     |          37 | Unsupported 
    Safari (Desktop)   |          11 | Unsupported 
    Safari (Mobile)    |          11 | Unsupported 
    Samsung Internet   |         5.0 | Unsupported 
    
    * Internet Explore implements "msToBlob" rather than the "toBlob" function signature.
    

    (Source: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob)

提交回复
热议问题