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 ImageDecoder object.

Properties

ImageDecoder.completeRead only

Returns a boolean indicating whether the data is completely buffered.

ImageDecoder.completedRead only

Returns a Promise that resolves once complete is true.

ImageDecoder.tracksRead only

Returns an ImageTrackList object 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