| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A Slow-Scan Television (SSTV) encoder for node.js.
var fs = require('fs'),
Speaker = require('speaker'), // npm install speaker
SSTV = require('./index.js');
function play(pcm) { speaker.write(pcm); }
function onRead(err, data) {
if (err !== null) {
console.log(err);
return;
}
for (var m in SSTV.Modes) {
new SSTV.Encoder().encode(SSTV.Modes[m], data, play);
}
}
var speaker = new Speaker({ channels : 1, bitDepth : 16, sampleRate : 44100 });
fs.readFile('/path/to/some/picture.png', onRead);####SSTV.Encoder
Produces a Buffer of PCM audio data based on a Buffer of PNG, JPEG, or BMP image data (eg. as read from a file).
#####Methods
#####Events
####SSTV.Modes
Mode identifiers for use with SSTV.Encoder.encode(mode, picture).
Additional modes can be added if anybody wants them. I've implemented a variety of "popular", "fast", or interesting ones to start with.
#####Properties
| Back | FazBrowse Home | New Git URL |