I want to convert a bitmap object to a file object. However, I want to store the file object on memory, not in SDcard or internal storage, so that I can use the image file without saving in gallery.
The code below is just for acquiring the bitmap and converting it into smaller image
public void onActivityResult(int requestCode, int resultCode, Intent data){
super.onActivityResult(requestCode, resultCode, data);
if(resultCode != RESULT_OK)
return;
if(requestCode == PICK_FROM_CAMERA){
imageUri = data.getData();
Cursor c = this.getContentResolver().query(imageUri, null, null, null, null);
c.moveToNext();
absolutePath = c.getString(c.getColumnIndex(MediaStore.MediaColumns.DATA));
Glide.with(this).load(imageUri).into(image);
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = 4;
bitmap = BitmapFactory.decodeFile(absolutePath, options);
}