跳转后不会显示图片
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_result);
ImageView img=(ImageView) findViewById(R.id.image);
String path=getIntent().getStringExtra("picPath");
try {
FileInputStream fis=new FileInputStream(path);
Bitmap bitmap=BitmapFactory.decodeStream(fis);
Matrix matrix=new Matrix();
matrix.setRotate(90);
bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth() , bitmap.getHeight(), matrix, true);
img.setImageBitmap(bitmap);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// Bitmap bitmap=BitmapFactory.decodeFile(path);
// img.setImageBitmap(bitmap);
}