Home > @ailer/pocket > imageToBlob
imageToBlob() function 
将 HTML 图像元素转换为 Blob 对象
Signature:
typescript
imageToBlob: (img: HTMLImageElement) => Promise<Blob>Parameters 
Parameter  | Type  | Description  | 
|---|---|---|
img  | HTMLImageElement  | HTMLImageElement 对象,表示需要转换为 Blob 对象的图像  | 
Promise<Blob>
返回一个 Promise,解析为图像的 Blob 对象