I have a bitmap of 128*128 size. I want to make it of size 256*256. But I don't want to stretch the image. Instead, my old image should be placed at the center of the new image and remaining pixels should be filled with a certain color, for example white.
How can I do this开发者_StackOverflow中文版?
ImageView have setScaleType(ScaleType type) method.
When ScaleType is http://developer.android.com/reference/android/widget/ImageView.ScaleType.html
Try to play with it. Good luck!!
精彩评论