BitmapFactory.Options boolean inJustDecodeBounds If set to true, the decoder will return null (no bitmap), but the out… fields will still be set, allowing the caller to query the bitmap without having to allocate the memory for its pixels.
outHeight与outWidth就是图片的长和宽。 可以先用这种方式获取长宽,然后再决定图片的尺寸。
新闻热点
疑难解答