nodeca / pica

Resize image in browser with high quality and high speed

Home Page:http://nodeca.github.io/pica/demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The ImageBitmap could not be allocated.

WeiRu1016 opened this issue · comments

chrome version: 81.0.4044.113

pica.resize(originImg, canvas)
some picture error:
DOMException: Failed to execute 'createImageBitmap' on 'Window': The ImageBitmap could not be allocated.

but use canvas, pica.resize(originCanvas, canvse) is success

https://github.com/nodeca/pica/blob/master/index.js#L464

Could you add here

.cach(e) {
  return null;
}

then rebuild dist and tell me result

@puzrin this is ok

What caused it ???

No ideas, how createImageBitmap() can exist but fail to execute.

Published fix. Thanks for your help!