Android : Converting TIFF image file to Bitmap Android

on Wednesday, March 18, 2015


I would like to convert images on SDcard to bitmap. I am using below code



String filepath = "/storage/emulated/0/Download/sample2.tif";
Bitmap bm = BitmapFactory.decodeFile(filepath);


This code is working fine for file with extension .jpg or .png but not for .tif or .tiff. For TIFF files bmbecomes null no exceptions nothing all file paths are valid.


Is there any limitation in Android BitmapFactory with respect to decoding TIFF images?


Also tried decodeByteArray and decodeStream, looks like limitation for me.


Please let me know any other way to convert TIFF Image file to Bitmap.


0 comments:

Post a Comment