Permalink
Browse files

tovideo.js now uses rgb files

  • Loading branch information...
pkrumins committed Jul 12, 2010
1 parent d333f4c commit c92a1eb79572c741cfc302463424ef20eb73a567
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/stacked-frames/tovideo.js
@@ -14,7 +14,7 @@ function baseName(fileName) {
}
function rectDim(fileName) {
- var m = fileName.match(/^\d+-rgba-(\d+)-(\d+)-(\d+)-(\d+).dat$/);
+ var m = fileName.match(/^\d+-rgb-(\d+)-(\d+)-(\d+)-(\d+).dat$/);
var dim = [m[1], m[2], m[3], m[4]].map(function (n) {
return parseInt(n, 10);
});
@@ -27,13 +27,13 @@ stackedVideo.setOutputFile('video.ogv');
chunkDirs.forEach(function (dir) {
var chunkFiles = fs.readdirSync(dir).sort().filter(
function (f) {
- return /^\d+-rgba-\d+-\d+-\d+-\d+.dat/.test(f);
+ return /^\d+-rgb-\d+-\d+-\d+-\d+.dat/.test(f);
}
);
chunkFiles.forEach(function (chunkFile) {
var dims = rectDim(chunkFile);
- var rgba = fs.readFileSync(dir + '/' + chunkFile); // returns buffer
- stackedVideo.push(rgba, dims.x, dims.y, dims.w, dims.h);
+ var rgb = fs.readFileSync(dir + '/' + chunkFile); // returns buffer
+ stackedVideo.push(rgb, dims.x, dims.y, dims.w, dims.h);
});
stackedVideo.endPush();
});

0 comments on commit c92a1eb

Please sign in to comment.