feat:提交
This commit is contained in:
12
tests/dev1/dataHandle/common/drawing/imageUtil.ts
Normal file
12
tests/dev1/dataHandle/common/drawing/imageUtil.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export function UrlToBitmap(src: string)
|
||||
{
|
||||
return new Promise<HTMLImageElement>((resolve) =>
|
||||
{
|
||||
let img = new Image()
|
||||
img.src = src
|
||||
img.onload = () =>
|
||||
{
|
||||
resolve(img)
|
||||
}
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user