This is more flexible, you can draw bitmap based on scaling or specific width and height:
public void drawImage(Bitmap bitmap, int x, int y, int rotationAngle, float scalingfactor, int width, int height){
Matrix matrix = new Matrix();
matrix.postRotate(rotationAngle, bitmap.getWidth()/2, bitmap.getHeight()/2);
if(scalingfactor == 0) {
matrix.postScale((float) width / bitmap.getWidth(), (float) height / bitmap.getHeight());
}
else
matrix.postScale(scalingfactor, scalingfactor, bitmap.getWidth()/2, bitmap.getHeight()/2);
dstRectF.set(x, y, x + width, y + height);
matrix.postTranslate(x, y);
canvas.drawBitmap(bitmap, matrix, null);
}