Skip to content

Add two demos using streams for PNG manipulation #911

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

Merged
merged 2 commits into from
May 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions demos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ <h1>Streams Demos</h1>

<dt><a href="https://fetch-progress.anthum.com/">Progress indicators with Service Workers and Fetch</a> | <a href="https://github.com/AnthumChris/fetch-progress-indicators">(Source Code)</a>
<dd>Streams intercept Service Worker <code>FetchEvent</code> and <code>fetch()</code> statements to show progress indicators. See <a href="https://github.com/AnthumChris/fetch-progress-indicators#browser-support">browser support</a> notes.

<dt><a href="http://mdn.github.io/dom-examples/streams/grayscale-png/">Grayscale a PNG</a> | <a href="https://github.com/mdn/dom-examples/tree/master/streams/grayscale-png">(Source Code)</a>
<dd>A PNG is retrieved via fetch(), and the response body is piped through a TransformStream to convert the PNG data
to black and white.

<dt><a href="http://mdn.github.io/dom-examples/streams/png-transform-stream/">Unpack chunks of a PNG</a> | <a href="https://github.com/mdn/dom-examples/tree/master/streams/png-transform-stream">(Source Code)</a>
<dd>A PNG is fetched as a ReadableStream, then <code>pipeThrough()</code> is used to transform the stream of
Uint8Arrays to a stream of PNG chunks.
</dl>

<p>Feel free to submit more demos by sending a pull request to the
Expand Down