高速模糊一副图像以及像素与sp的转换

快速模糊一副图像以及像素与sp的转换如果你想模糊640x480 image的图像通过pixels ,大约需要30秒,如果Bitma

快速模糊一副图像以及像素与sp的转换

如果你想模糊640x480 image的图像通过pixels ,大约需要30秒,如果Bitmap.createScaledBitmap(Bitmap src, int dstWidth, int dstHeight, boolean filter)使用上述方法可以提高很多

不过filter应该为true。

?

?DisplayMetricsscaledDensity attribute

DisplayMetrics dm = new DisplayMetrics();?
getWindowManager().getDefaultDisplay().getMetrics(dm);?
pixelSize = (int)scaledPixelSize * dm.scaledDensity;

1 楼 enefry 2011-06-04   这个不算模糊吧.而且在尺寸不变情况下会模糊吗 ?