code: function(image) {
          var maskWidth = this._getMaskX(image.width);
          var maskHeight = this._getMaskY(image.height);
          var buf = this._getResizedImageBuffer(image, maskWidth, maskHeight);
          var mask = new Array(maskWidth * maskHeight);
          for (var y = 0; y < maskHeight; y++) {
              for (var x = 0; x < maskWidth; x++) {
                  var idx = (y * maskWidth + x);
                  var filled = this._checkFilledPixel(buf, idx);
                  mask[idx] = filled ? 1 : 0;
              }
          }
          return mask;
      }
docs: Creates and returns an image mask.