使用FileOutputStreamAndroid-Java在活动中移动位图时如何不丢失数据?

问题描述

我目前正在使用Java和android进行隐写术应用程序,并且我找不到通过活动移动大型位图而不丢失图像中隐藏消息的正确方法。为什么在活动中移动位图时会发生变化?

第一次活动:

String filename = "bitmap";
FileOutputStream stream = this.openFileOutput(filename,Context.MODE_PRIVATE);
bitmap.compress(Bitmap.CompressFormat.PNG,100,stream);
stream.close();
Intent intent = new Intent(this,save_image.class);
startActivity(intent);

第二个活动,接收到位图:

try {
     bitmap = BitmapFactory.decodeStream(this.openFileInput("bitmap"));
} catch (FileNotFoundException e) {
     e.printstacktrace();
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)