devongovett / jpg-stream

A streaming JPEG encoder and decoder
85 stars 14 forks source link

More documentation, or links to... #1

Closed tracker1 closed 9 years ago

tracker1 commented 9 years ago

It would be nice if the README.md could either include or link to more documentation on how to use this library, or the structure a frame uses... are there a series of related libraries that are interchangable (there's mention of a png one)... what about simple transforms (resize, etc).

Very cool project, just interested in a little bit more.

devongovett commented 9 years ago

The decoder is basically just a node transform stream that takes JPEG data and outputs raw pixel data. It emits a format event with the width, height, and colorSpace of the image before any data is emitted into the stream. All of that is documented by pixel-stream.

The encoder is just the inverse: it takes a pixel-stream (e.g. a node stream with a format event) and encodes a JPEG to produce a byte stream.

Resizing is described in the readme, and you can use resizer-stream for that.

I'll be writing a blog post at some point to link to all the various modules there are, and how to use them together. For now, just check out my github profile to find the modules I've written so far.

As for docs, if you have some suggestions let me know.