标签:android blog java width os div
1、缩放
public Bitmap scalingBitmap(Bitmap bitmap, int newW, int newH) { int w = bitmap.getWidth(); int h = bitmap.getHeight(); float sx = (float) newW / w; float sy = (float) newH / h; Matrix matrix = new Matrix(); matrix.postScale(sx, sy); // 长和宽放大缩小的比例 return Bitmap.createBitmap(bitmap, 0, 0, w, h, matrix, true); }
Android Bitmap 常用摘要,布布扣,bubuko.com
标签:android blog java width os div
原文地址:http://www.cnblogs.com/cll-android/p/3831543.html