
httpRequest = new httpGet(fileUrl); httpClIEnt httpclIEnt = new DefaulthttpClIEnt(); httpResponse response = (httpResponse) httpclIEnt.execute(httpRequest); httpentity entity = response.getEntity(); Bufferedhttpentity bufhttpentity = new Bufferedhttpentity(entity); inputStream instream = bufhttpentity.getContent(); Bitmap bm = BitmapFactory.decodeStream(instream); String file_path = Environment.getExternalStorageDirectory()+file.separator+"basquetMobile- images"; file dir = new file(file_path); if(!dir.exists()) dir.mkdirs(); file file = new file(dir,tipoImagen+IDEquipo+".jpg"); fileOutputStream fOut = new fileOutputStream(file); bm.compress(Bitmap.CompressFormat.JPEG,75,fOut); fOut.flush(); fOut.close();
谢谢您的帮助!!
>>>>>>>>>>>>>>>>>>>>>> [溶液]<< ;<<<<<<<<<<<<<<<>>>>>
更改:
文件文件=新文件(dir,tipoImagen IDEquipo“.png”);
bm.compress(Bitmap.CompressFormat.PNG,100,fOut);
>>>>>>>>>>>>>>>>>>>>>>感谢和LT;!< <<<<<<<<<<<<<<<>>>>>
解决方法 更改:文件文件=新文件(dir,fOut);
总结以上是内存溢出为你收集整理的android – 从互联网下载图像损失透明度全部内容,希望文章能够帮你解决android – 从互联网下载图像损失透明度所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)