public static Bitmap decodeBitmap(File file) {
Bitmap bitmap = null;
// FileInputStream stream1;
try {
BitmapFactory.Options o = new BitmapFactory.Options();
o.inScaled = true;
// stream1 = new FileInputStream(file);
bitmap = BitmapFactory.decodeFile(file.getAbsolutePath(), o);
// stream1.close();
} catch (Exception e) {
e.printStackTrace();
}
return bitmap;
}
Bitmap bitmap = null;
// FileInputStream stream1;
try {
BitmapFactory.Options o = new BitmapFactory.Options();
o.inScaled = true;
// stream1 = new FileInputStream(file);
bitmap = BitmapFactory.decodeFile(file.getAbsolutePath(), o);
// stream1.close();
} catch (Exception e) {
e.printStackTrace();
}
return bitmap;
}
No comments:
Post a Comment