Convert a File Object to Bitmap
You should be able to use BitmapFactory: File mSaveBit; // Your image file String filePath = mSaveBit.getPath(); Bitmap bitmap = BitmapFactory.decodeFile(filePath); mImageView.setImageBitmap(bitmap);
You should be able to use BitmapFactory: File mSaveBit; // Your image file String filePath = mSaveBit.getPath(); Bitmap bitmap = BitmapFactory.decodeFile(filePath); mImageView.setImageBitmap(bitmap);
Update Sep 2018: After several years, I needed the almost same thing for a local image caching solution. This time around, UIL has not been in active development. I compared the popular libraries, and the conclusion is pretty no-brainer: just use Glide. It’s much more powerful and configurable. Years ago I had to fork and … Read more
I am one of the engineers on the Fresco project. So obviously I’m biased. But you don’t have to take my word for it. We’ve released a sample app that allows you to compare the performance of five libraries – Fresco, Picasso, UIL, Glide, and Volley Image Loader – side by side. You can get … Read more
Here’s what I created to hold the images that my app is currently displaying. Please note that the “Log” object in use here is my custom wrapper around the final Log class inside Android. package com.wilson.android.library; /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file … Read more