bitmap

2 篇文章

Android BitmapFactory的OutOfMemoryError解决方案

情景再现 今天写了两个东西,一个是通过照相机拍摄照片,然后获得照片之后将它设置到ImageView上面,另一个是通过相册,或者文件获得照片,放到ImageView上面。 一开始,一切正常 然后我做了下面的操作: 点击拍照,将拍到的照片放到了ImageView上面,然后我又点击拍照,在放到ImageV

getPixels中stride的理解

public void getPixels (int[] pixels, int offset, int stride, int x, int y, int width, int height) 把位图的数据拷贝到pixels[]中。每一个都由一个表示颜色值的int值来表示。幅度参数表明调用者允许的