import java.io.File;
import java.io.FileOutputStream;
import java.io.BufferedOutputStream;
File myDrawFile = new File(mSaveFilePath);
try {
BufferedOutputStream bos = new BufferedOutputStream
(new FileOutputStream(myDrawFile));
mBitmap.compress(Bitmap.CompressFormat.PNG, 90, bos);
bos.flush();
bos.close();
} catch (Exception e) {
e.printStackTrace();
Log.d(null, "Save file error!");
return false;
}
Log.d(null, "Save file ok!");
return true;
沒有留言:
張貼留言