Bitmap bm是一张图片。如何从bm中截取一部分图片进行显示。

解决方案 »

  1.   

    可以用这两个static Bitmap  createBitmap(Bitmap source, int x, int y, int width, int height) static Bitmap  createBitmap(int[] colors, int offset, int stride, int width, int height, Bitmap.Config config) 
      

  2.   


    有其他方法吗?我用这个方法,source是一个较大的图片,1024*256吧,结果执行这条语句的时间就特长,要100ms,我寻思是不是有其他方法。
      

  3.   

    用clipRect吧!这个蛮好用的。用于裁剪图片。