摘要: 正常的图片缩放代码如:ByteArrayOutputStream baos = new ByteArrayOutputStream();arg1.compress(Bitmap.CompressFormat.JPEG, 100, baos);//arg1为传进来的原始bitmapbaos.toByt... 阅读全文
posted @ 2015-08-03 16:14 Michelle's Home 阅读(6628) 评论(1) 推荐(0) 编辑
摘要: 问题描述:从网络获取图片,数据为InputStream流对象,然后调用BitmapFactory的decodeStream()方法解码获取图片,返回null。代码如下:private Bitmap getUrlBitmap(String url) { Bitmap bm; try... 阅读全文
posted @ 2015-08-03 15:32 Michelle's Home 阅读(2173) 评论(0) 推荐(0) 编辑
摘要: 问题描述:takephoto->拍照->确定->截图->保存,此时返回给onActivityResult的resultCode是0,截图无效。我查看图片储存的情况,拍完照是有存储好的,但截图后没有存储,图片变成了0byte。原因:privatevoidcropImageUri(Uriuri,intr... 阅读全文
posted @ 2015-08-03 14:46 Michelle's Home 阅读(3043) 评论(0) 推荐(1) 编辑