Permalink
Browse files

updated the bufType to bgra and it works!

  • Loading branch information...
1 parent cc369db commit 954689b23f511b27ab272b2c6e38caf0bd1d4e34 @substack committed May 20, 2011
Showing with 7 additions and 2 deletions.
  1. +7 −2 test/rects.js
View
@@ -88,15 +88,20 @@ exports.rects = function () {
assert.equal(dims.width, 640);
assert.equal(dims.height, 480);
- var stack = new png.DynamicPngStack('bgr');
+ var stack = null;
r.on('raw', function (rect) {
+ assert.equal(rect.bitsPerPixel, 32);
+ if (!stack) stack = new png.DynamicPngStack('bgra');
+
stack.push(
rect.fb, rect.x, rect.y, rect.width, rect.height
);
});
- setTimeout(next.ok.bind(null, stack), 4000);
+ setTimeout(function () {
+ next.ok(stack);
+ }, 4000);
});
})
.seq_(function (next, stack) {

0 comments on commit 954689b

Please sign in to comment.