Android Question Crop bitmap

Emme Developer

Well-Known Member
Licensed User
Longtime User
Hi to all! I'm trying to understand how to use new bitmap.resize. Is possibile to fill an image without losing the aspect ratio, maybe by cropping the bitmap? Thanks!
 

klaus

Expert
Licensed User
Longtime User
The LoadBitmapResize method maintains the aspect ratio.
You find a small example in the German forum.

upload_2017-11-28_10-39-53.png


In the upper image the ImageView.Width is wider and in the lower image the ImageView.Height is higher.
The pink areas are Panels with the same dimensions as the imagvies which are added to show the difference between the original ImageView dimensions and the displayed image.
 
Upvote 0

Emme Developer

Well-Known Member
Licensed User
Longtime User
The LoadBitmapResize method maintains the aspect ratio.
You find a small example in the German forum.

View attachment 62182

In the upper image the ImageView.Width is wider and in the lower image the ImageView.Height is higher.
The pink areas are Panels with the same dimensions as the imagvies which are added to show the difference between the original ImageView dimensions and the displayed image.
Thanks for your answer Klaus. I saw this, so i'm trying to get an image that fit the ImageView, by cropping the resized image
 
Upvote 0
Top