Skip to content

Add image encoder / decoder to proposed solutions section. #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Add image encoder / decoder to proposed solutions section. #6

wants to merge 1 commit into from

Conversation

jabolopes
Copy link

Hi Peter,

This fixes a few typos and adds image encoding / decoding to the proposed solutions section.

Thanks!

Jose

explainer.md Outdated

A **VideoDecoder** is a TransformStream from EncodedVideoFrame to DecodedVideoFrame.

A **VideoTrackWriter** converts a WritableStream of DecodedVideoFrame into a MediaStreamTrack.

An **ImageEncoder** is a TransformStream from [ImageData](http://go/mdn/API/ImageData) to EncodedImageData.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the examples below the ImageEncoder/ImageDecoder aren't actually TransformStreams that work on multiple independent images but rather TransformStreams that support streaming decode (e.g., for JPEG progressive enhancement).

Worth discussing the merits of having a single ImageDecoder object that can decode multiple images. It's not quite as obvious as for audio/video where the decoders are stateful. Perhaps it's relevant for representing a hardware image decoder?

@jabolopes
Copy link
Author

Hi Steve, I've updated the PR based on your feedback.

I believe ImageEncoder / ImageDecoder may be stateful because the codec may be configured with codec specific parameters, for example, ImageEncoder({codec: "jpeg", quality: 0.9}). It also makes the API more consistent, because Image is presented to developers just like Audio or Video. And we are also exploring ways of integrating WebAssembly with codecs, so the object may be backed by a WebAssembly program to run the actual codec.

What do you think?

Copy link
Contributor

@steveanton steveanton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

explainer.md Outdated

A **VideoDecoder** is a TransformStream from EncodedVideoFrame to DecodedVideoFrame.

A **VideoTrackWriter** converts a WritableStream of DecodedVideoFrame into a MediaStreamTrack.

An **ImageEncoder** encodes a single image from [ImageData](http://go/mdn/API/ImageData) to EncodedImageData.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to the full url rather than a go link.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@sandersdan
Copy link
Contributor

I believe this request is out of date. ImageDecoder is currently being maintained externally (https://github.com/dalecurtis/image-decoder-api), but I do expect it will be merged here eventually.

@sandersdan sandersdan closed this Sep 9, 2020
@rektide
Copy link

rektide commented Jul 11, 2022

I believe this request is out of date. ImageDecoder is currently being maintained externally

There doesn't seem to be anything for ImageEncoder, which I would also like to see.

I did just open an issue https://github.com/dalecurtis/image-decoder-api/issues/7 . I'll try to follow up & find how we might pursue this. This would be so lovely to get.

@talltyler
Copy link

What is the status on ImageEncoder? The link above is now broken because issues has been disabled.
Having a ImageEncoder could solve many the needs of many apps creating gifs and animated pngs.

@dalecurtis
Copy link
Contributor

#204 is the tracking issue, but no active plans for it at the moment since toBlob exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants