concat-frames
Advanced tools
Comparing version
@@ -21,5 +21,5 @@ var PixelStream = require('pixel-stream'); | ||
ConcatFrames.prototype._startFrame = function(frame, done) { | ||
frame.width = frame.width || this.width; | ||
frame.height = frame.height || this.height; | ||
frame.colorSpace = this.colorSpace; | ||
frame.width = frame.width || this.format.width; | ||
frame.height = frame.height || this.format.height; | ||
frame.colorSpace = this.format.colorSpace; | ||
this.frames.push(frame); | ||
@@ -26,0 +26,0 @@ this.buffers = []; |
{ | ||
"name": "concat-frames", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Concatenate a pixel-stream into an array of frames", | ||
@@ -10,3 +10,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"pixel-stream": "^1.0.1" | ||
"pixel-stream": "^1.0.3" | ||
}, | ||
@@ -13,0 +13,0 @@ "devDependencies": { |
@@ -8,5 +8,2 @@ var PassThrough = require('stream').PassThrough; | ||
var s = new PassThrough; | ||
s.width = 10; | ||
s.height = 10; | ||
s.colorSpace = 'rgb'; | ||
@@ -26,2 +23,8 @@ s.pipe(concat(function(frames) { | ||
s.emit('format', { | ||
width: 10, | ||
height: 10, | ||
colorSpace: 'rgb' | ||
}); | ||
s.write(new Buffer(10 * 10 * 3)); | ||
@@ -28,0 +31,0 @@ s.write(new Buffer(10 * 5 * 3)); |
4217
1.27%83
2.47%Updated