code: public static Bitmap zoomBitmap(Bitmap bitmap, int width, int height) {
          if (bitmap == null || width <= 0 || height <= 0)
              return null;
  
          int w = bitmap.getWidth();
          int h = bitmap.getHeight();
          Matrix matrix = new Matrix();
          float scaleWidth = ((float) width / w);
          float scaleHeight = ((float) height / h);
          matrix.postScale(scaleWidth, scaleHeight);
          return Bitmap.createBitmap(bitmap, 0, 0, w, h, matrix, true);
      }
docs: zoom bitmap, if parameters are invalid will return null. <br/>
  <br/>
  Note: <br/>
  this method do not recycle any resource.
  
  @param bitmap
  @param width
  @param height
  @return