You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a path for using this proposal to encode/decode images?
I'm suspecting it's possible by implementing the image container and somehow getting the binary keyframe out, but how to plumb this is somewhat unclear.
Given that a lot of developers have been asking for functionality to encode/decode images without using an HTMLImageElement as an intermediary, it would be nice to have this use case covered.
I'll note that the PR is about decoding, not encoding, so this needs to stay open once merged. I certainly agree that starting with the decoding side is the right move though, and this can be shipped gradually.
Activity
sandersdan commentedon Apr 22, 2020
This has been discussed in #13, and Dale has an explainer for a proposed WebCodecs-like API: https://github.com/dalecurtis/image-decoder-api/blob/master/explainer.md.
chcunningham commentedon Feb 19, 2021
I'll have PR out shortly.
Add Image Decoding, associated interfaces and algorithms
padenot commentedon Apr 27, 2021
I'll note that the PR is about decoding, not encoding, so this needs to stay open once merged. I certainly agree that starting with the decoding side is the right move though, and this can be shipped gradually.
dalecurtis commentedon Apr 27, 2021
Sounds good. Yes we didn't prioritize image encoding since that already exists to a certain extent:
https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL