1

I make a picture and save it in the pre 'ArrayList Bitmap' and before saving them to a card I bring them in 'GridView'. But due to the fact that the picture 'Bitmap' in the large 'GridView' they are not displayed correctly. I have tried to do so before saving

bitmap.setHeight();
bitmap.setWidth();

But Android Studio underlines and says that I can not use these methods. If I understand correctly that this is connected with the API. Advise how to make a picture 50 by 50 pixels?

Sirop4ik
  • 4,543
  • 2
  • 54
  • 121

1 Answers1

0

If you already have a bitmap and want to resize it..

Bitmap bMap = BitmapFactory.decodeByteArray(bMapArray, 0, bMapArray.length); //Original Initialization 
try { 
 resizedBitmap = Bitmap.createScaledBitmap(bMap, 240, 320, false);// Here I have set it To 240 width and 320 Height
    }
catch (Exception e){
}
Smaran
  • 1,651
  • 2
  • 11
  • 15