Loading Large Bitmaps Efficiently[高效加载大图]
0x00、 高效加载大图片
0x01、 读取 Bitmap 的尺寸和类型。
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeResource(getResources(), R.id.myimage, options);
int imageHeight = options.outHeight;
int imageWidth = options.outWidth;
String imageType = options.outMimeType;0x02、 加载缩放过的图片到内存中
Last updated