How to get filepath to cached bitmap ?
When loading from url like below, I’m able to get filePath to the cached image
var obj = Glide.With(this)
.Load("url")
.Submit()
.Get();
if (obj is Java.IO.File file)
{
using var handler = new Handler(Looper.MainLooper);
handler.Post(() =>
{
Glide.With(this)
.Load(file)
.SetDiskCacheStrategy(DiskCacheStrategy.All)
.Downsample(DownsampleStrategy.CenterInside)
.Listener(this)
.Into(imageView);
});
}
But how to get filepath for bitmap when loading a bitmap like below ?
Bitmap bitmap = //populate bitmap
var obj = Glide.With(this)
.Load(bitmap)
.Submit()
.Get();
//obj is a Bitmap here
using var handler = new Handler(Looper.MainLooper);
handler.Post(() =>
{
Glide.With(this)
.Load(obj)
.SetDiskCacheStrategy(DiskCacheStrategy.All)
.Downsample(DownsampleStrategy.CenterInside)
.Listener(this)
.Into(imageView);
});
5