ImageDecoder
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The ImageDecoder interface of the WebCodecs API provides a way to unpack and decode encoded image data.
Constructor
ImageDecoder()-
Creates a new
ImageDecoderobject.
Properties
ImageDecoder.completeRead only-
Returns a
booleanindicating whether the data is completely buffered. ImageDecoder.completedRead only-
Returns a
Promisethat resolves oncecompleteis true. ImageDecoder.tracksRead only-
Returns an
ImageTrackListobject listing the available tracks and providing a method for selecting a track to decode.
Methods
ImageDecoder.close()-
Ends all pending work and releases system resources.
ImageDecoder.decode()-
Enqueues a control message to decode the frame of an image.
ImageDecoder.reset()-
Resets all states including configuration, control messages in the control message queue, and all pending callbacks.
Specifications
| Specification |
|---|
| WebCodecs # imagedecoder-interface |
Browser compatibility
BCD tables only load in the browser