get drawWidth() {
      if (!this.smask)
        return this.width;
      return Math.max(this.width, this.smask.width);
    }
Resize an image using the nearest neighbor algorithm.  Currently only
supports one and three component images.
@param {TypedArray} pixels The original image with one component.
@param {Number} bpc Number of bits per component.
@param {Number} components Number of color components, 1 or 3 is supported.
@param {Number} w1 Original width.
@param {Number} h1 Original height.
@param {Number} w2 New width.
@param {Number} h2 New height.
@return {TypedArray} Resized image data.