On drawing on canvas if i use this code to draw the bitmap then it get stratched.
Code1:
photoBitmap = Bitmap.createScaledBitmap(tempBitmap, display.getWidth(), display.getHeight(), true); // original
But if i use below code to draw the bitmap then the Bitmap not getting stratched but i m only getting the some portion of top left corner of the Image.
Code2:
photoBitmap = Bitmap.createBitmap(tempBitmap);
Now, Above both code is for creating/getting the bitmap. and to draw the Bitmap on canvas i use below code:
canvas.drawBitmap (photoBitmap,0, 0, null);// Original Without ImageView
Now, What should i do to saw full image and it should not get stratch.
Thanks.
It sounds like what you’re asking to do is to stretch the bitmap in both directions equally so that it fits on the display. Try this: