code: function(file, callback) {
  		var that = this;
  		
  		this.png_encode.encode(this, function (data) {
  			var fd = that.fs.openSync(file, 'w');
  			for(var i = 0; i < data.length; i++) {
  				that.fs.writeSync(fd, data[i], 0, data[i].length);
  			}
  			that.fs.closeSync(fd);
  			
  			if(callback) {
  				callback.call(that);
  			}
  		});
  	}
docs: toPng(string file[, function callback])
  
  Save palette as a new PNG image.
  @param file - new image file.
  @param callback - call function after creating a palette.