im trying to show .tif image in android using glide. but after some searching I realise that android didn't support tif/tiff format. to resolve that im using that library which is Android-TiffBitmapFactory.
that seems to be good and its documentation is also easy.
when I trying implement this in my code it gives always null bitmap.
I dont know what goes wrong. so please help me how can I do that . and one more thing can i embed this library with glide so that i don't need to download and then use from storage.
just directly like normal image.
and here's my code for that
File file = new File("/storage/emulated/0/Download/MyEx.tif");
TiffBitmapFactory.Options options = new TiffBitmapFactory.Options();
thread = new Thread(() -> {
bitmap = TiffBitmapFactory.decodeFile(file, options);;
if(bitmap != null) {
thread.interrupt();
Log.d(TAG, "run: " + "thread stopped" + bitmap);
}
});
Glide.with(context) .load(bitmap)
.diskCacheStrategy(DiskCacheStrategy.ALL) .into(sdp);