@dajver
410 / 274 / 18
Регистрация: 18.09.2010
Сообщений: 1,114
|
13.12.2015, 21:09
|
|

Сообщение от Mikalai
непонятно что это такое:
Я предполагаю что это сокращение от Bitmap
Добавлено через 6 минут
Метод ресайза битмапа
Java | 1
2
3
4
5
6
7
8
9
10
11
12
13
| public Bitmap getResizedBitmap(Bitmap bm, int newHeight, int newWidth) {
int width = bm.getWidth();
int height = bm.getHeight();
float scaleWidth = ((float) newWidth) / width;
float scaleHeight = ((float) newHeight) / height;
// create a matrix for the manipulation
Matrix matrix = new Matrix();
// resize the bit map
matrix.postScale(scaleWidth, scaleHeight);
// recreate the new Bitmap
Bitmap resizedBitmap = Bitmap.createBitmap(bm, 0, 0, width, height, matrix, false);
return resizedBitmap;
} |
|
0
|