code: public void setImageResource(int imageResource, int imageWidth, int imageHeight) {
          bitmap = extractBitmapFromDrawable(getResources().getDrawable(imageResource));
          bitmapSrcRect = bitmapRect(bitmap);
  
          this.imageWidth = imageWidth;
          this.imageHeight = imageHeight;
  
          rebuildFitter();
      }
docs: Changes the background image and its layout dimensions.