_doRender() {
    var canvas = new Canvas(this._width, this._height);
    var p = Promise.resolve({canvas: canvas, ctx: canvas.getContext('2d')});

    this._renderQueue.push(context => {
      Logging.log('Render', Logging.Constants.LogLevel.DEBUG);

      var buffer = canvas.toBuffer();

      var cachedFile = this._cache.addImage(buffer, this._id);
      return Promise.resolve(this._toBuffer ? fs.readFileSync(cachedFile) : fs.createReadStream(cachedFile));
    });

    return this._renderQueue.reduce((prev, curr) => {
      return prev.then(curr);
    }, p);
  }
/**
   * @return {Stream} - Readable read stream containing the image data
   * @private
   */
@return {Stream} - Readable read stream containing the image data
@private
@return { Stream } - Readable read stream containing the image data @private
_doRender() {
    var canvas = new Canvas(this._width, this._height);
    var p = Promise.resolve({canvas: canvas, ctx: canvas.getContext('2d')});
    this._renderQueue.push(context => {
      Logging.log('Render', Logging.Constants.LogLevel.DEBUG);
      var buffer = canvas.toBuffer();
      var cachedFile = this._cache.addImage(buffer, this._id);
      return Promise.resolve(this._toBuffer ? fs.readFileSync(cachedFile) : fs.createReadStream(cachedFile));
    });
    return this._renderQueue.reduce((prev, curr) => {
      return prev.then(curr);
    }, p);
  }
_doRender ( ) { var canvas = new Canvas ( this . _width , this . _height ) ; var p = Promise . resolve ( { canvas : canvas , ctx : canvas . getContext ( '2d' ) } ) ; this . _renderQueue . push ( context => { Logging . log ( 'Render' , Logging . Constants . LogLevel . DEBUG ) ; var buffer = canvas . toBuffer ( ) ; var cachedFile = this . _cache . addImage ( buffer , this . _id ) ; return Promise . resolve ( this . _toBuffer ? fs . readFileSync ( cachedFile ) : fs . createReadStream ( cachedFile ) ) ; } ) ; return this . _renderQueue . reduce ( ( prev , curr ) => { return prev . then ( curr ) ; } , p ) ; }
@return {Stream} - Readable read stream containing the image data
 @private
@return { Stream } - Readable read stream containing the image data @private