pingy.js
function(fn) {
      fn = fn || console.log.bind(console);

      var buffers = [];

      var base64 = new Stream();
      base64.readable = base64.writable = true;
      base64.write = function(data) {
        buffers.push(data);
      };

      base64.end = function() {
        fn(Buffer.concat(buffers).toString('base64'));
      }

      this._png.pack().pipe(base64);
    }
function(fn) {
      fn = fn || console.log.bind(console);

      var buffers = [];

      var base64 = new Stream();
      base64.readable = base64.writable = true;
      base64.write = function(data) {
        buffers.push(data);
      };

      base64.end = function() {
        fn(Buffer.concat(buffers).toString('base64'));
      }

      this._png.pack().pipe(base64);
    }
Get the base64 encoding

@param {Function} [fn] - callback, defaults to console.log