The code below resizes a bitmap and keeps the aspect ratio. I was wondering if there is a more efficient way of resizing, because i got the idea that i\'m writing code that
Depends on how you're using the image. If all you want to do is display the bitmap in a View, just call myImageView.setImageBitmap(bitmap)
and let the framework resize it. But if you're concerned about memory, scaling first may be a good approach.
I really don't think so, I have done almost the same way as you, and got the idea from the android developer pages...
Use the method Bitmap.createScaledBitmap() :)