Permalink
Browse files

Use nodejs Buffer, preformance ~0.120s -> ~0.090s for ubuntu.png.

Using array or Typed Arrays support should be added so it will work on more platforms
  • Loading branch information...
1 parent a74de2e commit c98ec4575059c62c9b0beaf0aeaf8d613f9b85d7 @arian committed Jul 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 PNGReader.js
View
@@ -194,7 +194,7 @@ PNGReader.prototype.interlaceNone = function(data){
// color bytes per row
var cpr = bpp * png.width;
- var pixels = new Array(bpp * png.width * png.height);
+ var pixels = new Buffer(bpp * png.width * png.height);
var scanline, previous;
var offset = 0;

0 comments on commit c98ec45

Please sign in to comment.