code: public static Bitmap scale(Bitmap src, int dw, int dh) {
          Bitmap res = Bitmap.createBitmap(dw, dh, Bitmap.Config.ARGB_8888);
          scale(src, res);
          return res;
      }
docs: Scaling bitmap to specific width and height without keeping aspect ratio.
  
  @param src source bitmap
  @param dw  new width
  @param dh  new height
  @return scaled bitmap