The decoded-image shape this package needs: dimensions, and a way to release the decoded memory.
The DOM's ImageBitmap satisfies it structurally (it has width, height, and close()), so no adapter is needed around a real one.
ImageBitmap
width
height
close()
Readonly
Decoded height in pixels.
Decoded width in pixels.
Releases the decoded pixels; idempotent in the DOM.
The decoded-image shape this package needs: dimensions, and a way to release the decoded memory.
The DOM's
ImageBitmapsatisfies it structurally (it haswidth,height, andclose()), so no adapter is needed around a real one.