docs: function Bitmap(width, height, bytesPerPixel, endianness) {
    if (!(this instanceof Bitmap)) {
      return new Bitmap(width, height, bytesPerPixel, endianness);
    }
  
    // Validate bytes per pixel
    if (bytesPerPixel === undefined) {
      bytesPerPixel = 1;
    }
    if (bytesPerPixel !== 1 && bytesPerPixel !== 2 && bytesPerPixel !== 4) {
      throw new Error("Invalid number of bytes per pixel: " + bytesPerPixel);
    }
  
    this._width = width;
    this._height = height;
    this._bytesPerPixel = bytesPerPixel;
    this._endianness = endianness === undefined ? Endianness.BIG : endianness;
    this._palette = bytesPerPixel === 1 ? [].concat(DEFAULT_PALETTE) : [];
    this._data = new Buffer(width * height * bytesPerPixel);
    saveReadAndWriteFunction.call(this);
  
    // Initialize to white
    this.clear(0xFF);
  }