问题
I know android does not support TIFF format but I'm getting a Base64 image string from a web service and i need to display it.
byte[] decodedString = Base64.decode(serverResponse, Base64.DEFAULT);
Bitmap imgMap = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
I tried decoding it with BitmapFactory, but since it doesn't recognize it as a picture it returns null
Is there any external jar or something i can add to display/convert the picture?
Thanks in advance for your help!!
回答1:
If you are willing to add some C++ to your project via the Android NDK, then libtiff should do what you want.
see question Convert JPEG/PNG image to TIFF image format in android OS
来源:https://stackoverflow.com/questions/11035377/android-is-it-possible-to-convert-a-tiff-image-to-jpg-png