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.
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.
ImageDecoder()
Creates a new ImageDecoder
object.
ImageDecoder.complete
Read only
Returns a boolean
indicating whether the data is completely buffered.
ImageDecoder.completed
Read only
Returns a Promise
that resolves once complete
is true.
ImageDecoder.tracks
Read only
Returns an ImageTrackList
object listing the available tracks and providing a method for selecting a track to decode.
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.
Specification |
---|
WebCodecs # imagedecoder-interface |
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
ImageDecoder |
94 |
94 |
No |
No |
80 |
No |
94 |
94 |
No |
66 |
No |
17.0 |
ImageDecoder |
94 |
94 |
No |
No |
80 |
No |
94 |
94 |
No |
66 |
No |
17.0 |
close |
94 |
94 |
No |
No |
80 |
No |
94 |
94 |
No |
66 |
No |
17.0 |
complete |
94 |
94 |
No |
No |
80 |
No |
94 |
94 |
No |
66 |
No |
17.0 |
completed |
94 |
94 |
No |
No |
80 |
No |
94 |
94 |
No |
66 |
No |
17.0 |
decode |
94 |
94 |
No |
No |
80 |
No |
94 |
94 |
No |
66 |
No |
17.0 |
isTypeSupported |
94 |
94 |
No |
No |
80 |
No |
94 |
94 |
No |
66 |
No |
17.0 |
reset |
94 |
94 |
No |
No |
80 |
No |
94 |
94 |
No |
66 |
No |
17.0 |
tracks |
94 |
94 |
No |
No |
80 |
No |
94 |
94 |
No |
66 |
No |
17.0 |
type |
94 |
94 |
No |
No |
80 |
No |
94 |
94 |
No |
66 |
No |
17.0 |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ImageDecoder