안드로이드2013. 2. 28. 11:56

글을 올린 블로거를 생각해서 광고 한번만 클릭해주시면 감사하겠습니다

private void SaveBitmapToFileCache(Bitmap bitmap, String strFilePath) {

File fileCacheItem = new File(strFilePath);

OutputStream out = null;

try {

fileCacheItem.createNewFile();

out = new FileOutputStream(fileCacheItem);

 

bitmap.compress(CompressFormat.JPEG, 100, out);

catch (Exception e) {

e.printStackTrace();

} finally {

try {

out.close();

}

catch (IOException e)

{

e.printStackTrace();

}

}

}


출처 : http://snowbora.com/418

Posted by 퍼플카우D