Android Utililty Methods Bitmap Load

List of utility methods to do Bitmap Load

Description

The list of methods to do Bitmap Load are organized into topic(s).

Method

StringgetBitmapStoragePath(Context context)
get Bitmap Storage Path
String bitmapStoragePath = "";
if (Environment.getExternalStorageState().equals(
        Environment.MEDIA_MOUNTED)) {
    try {
        String root = context.getExternalFilesDir(null)
                .getCanonicalPath();
        if (null != root) {
            File bitmapStorageDir = new File(root, APP_DIR);
...
BitmapgetTempBitmap(Context context)
get Temp Bitmap
Bitmap capturedBitmap = null;
final File file = getTempFile(context);
try {
    BitmapFactory.Options options = new BitmapFactory.Options();
    options.inSampleSize = 4;
    AssetFileDescriptor fileDescriptor = context
            .getContentResolver().openAssetFileDescriptor(
                    Uri.fromFile(file), "r");
...
BitmapcreateBitmapFromImageFile(File imagefile)
create Bitmap From Image File
Bitmap bitmap = null;
try {
    FileInputStream fis = new FileInputStream(imagefile);
    bitmap = BitmapFactory.decodeStream(fis);
} catch (IOException e) {
    e.printStackTrace();
    if (imagefile.exists())
        imagefile.delete();
...