課程
/移動開發
/Android
/Android圖像處理-打造美圖秀秀從它開始
老師你好,處理后的圖片怎么保存???怎么保存到本地呢?
2016-04-13
源自:Android圖像處理-打造美圖秀秀從它開始 3-2
正在回答
private?void?saveBitmap(Bitmap?bitmap,String?path,String?imageName){ ????String?fileName=null;//?照片完整路徑?? ????if(bitmap!=null){ ????????FileOutputStream?fos=null; ????????File?file=new?File(path); ????????file.mkdirs(); ????????fileName=path+imageName; ????????try{ ????????fos?=?new?FileOutputStream(fileName); ????????bitmap.compress(Bitmap.CompressFormat.JPEG,?90,?fos); ????????}catch(FileNotFoundException?e){ ????????e.printStackTrace(); ????????}finally?{ ????try?{ ????????fos.flush(); ????????fos.close(); ????}?catch?(IOException?e)?{ ????????e.printStackTrace(); ????} } ????} }
舉報
圖像色彩的分析與處理,演示市面上常見的圖像處理特效的實現方法
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2016-05-11