我正在尝试从图像视图中保存图像,但出现异常(Read-only file system)
我试过这段代码,
bitmap1 = imageView.getDrawingCache(); //for retrieving the Image
public void saveOnClick(View view)
{
try
{
String filename="qrimage";
FileOutputStream out = new FileOutputStream(filename);
bitmap1.compress(Bitmap.CompressFormat.PNG, 90, out);
Toast.makeText(getApplicationContext(), "Saved", Toast.LENGTH_SHORT).show();
}
catch (Exception e)
{
e.printStackTrace();
Toast.makeText(getApplicationContext(), e.getMessage()+" Not Saved!", Toast.LENGTH_SHORT).show();
}
}