Closed Zhang-Junzhi closed 6 years ago
Here's the definition of ImageBitmap
:
An ImageBitmap
object represents a bitmap image that can be painted to a canvas without undue latency.
The exact judgement of what is undue latency of this is left up to the implementer, but in general if making use of the bitmap requires network I/O, or even local disk I/O, then the latency is probably undue; whereas if it only requires a blocking read from a GPU or system RAM, the latency is probably acceptable.
No, we don't want to extend this method. Instead <img>
should get srcOjbect
or some such.
Thanks.
That's good to have either.
Agreed with @annevk. This does not sound like something we would want to support.
Is there any current plan to add srcObject
or some such to <img>
? I can't seem to find it by searching issues.
If not, I feel like filing one.
Please do, I started some cleanup work in https://github.com/whatwg/html/pull/3132 to prepare for it, but I haven't really made the time to start working on it again. Too many things to do.
Sometimes, an
ImageBitmap
has already been created for aBlob
for some other uses, before using URL.createObjectURL, so there's no need to again use the Blob to create an object URL. IfImageBitmap
were allowed forURL.createObjectURL
, code would be more efficient: