int bmpWidth = bmp.getWidth(); int bmpHeight = bmp.getHeight(); /* 设定图片放大的比例 */ double scale = 1.25; /* 计算这次要放大的比例 */ scaleWidth = (float) (scaleWidth * scale); scaleHeight = (float) (scaleHeight * scale); /* 产生reSize后的Bitmap对象 */ Matrix matrix = new Matrix(); matrix.postScale(scaleWidth, scaleHeight); Bitmap resizeBmp = Bitmap.createBitmap(bmp, 0, 0, bmpWidth, bmpHeight, matrix, true);
初级程序员
by: 小蘑菇 发表于:2013-05-05 23:10:31 顶(0) | 踩(0) 回复
收藏,备用
回复评论