I want to overlay two bitmaps on a canvas and produce a single bitmap. But the second image is much smaller than its original size

I want to overlay two bitmaps on a canvas and produce a single bitmap in android. but second image is much small as its original size. But second image or small image is looking more small on canvas as compare to original bitmap image. I have implemented following code to overlay image and give the left and top align to second image.

public Bitmap overlay(Bitmap bmp1, final Bitmap bmp2, int x, int y) { final Bitmap bmOverlay = Bitmap.createBitmap(bmp1.getWidth(), bmp1.getHeight(), bmp1.getConfig()); Canvas canvas = new Canvas(bmOverlay); canvas.drawBitmap(bmp1, 0f, 0f, null); float density = PdfActivity.this.getResources().getDisplayMetrics().density; canvas.drawBitmap(bmp2, x * density, y * density, null); return bmOverlay;} 

In above code bmp2 is used to draw the second image or small image ,while bmp1 is big image draw on canvas. Please have a look at both screens:- Below is showing image after drawing on canvas.

enter image description here

Please help me to find out what is the issue so image is drawing in small format.

Below is showing original image inside the rectangle after drawing on image view.

enter image description here