问题描述
我知道Android不支持TIFF格式,但我发现从Web服务的Base64编码的图像串,我需要显示它。
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);
我试着用BitmapFactory解码,但因为它不承认它是一个图片返回null
I tried decoding it with BitmapFactory, but since it doesn't recognize it as a picture it returns null
有任何外部JAR或东西,我可以添加显示/转换了吗?
Is there any external jar or something i can add to display/convert the picture?
在此先感谢您的帮助!
推荐答案
如果你愿意通过Android NDK一些C ++添加到您的项目,然后的应该做你想要什么。
If you are willing to add some C++ to your project via the Android NDK, then libtiff should do what you want.
见问题Convert JPEG / PNG图像在Android操作系统 TIFF图像格式
see question Convert JPEG/PNG image to TIFF image format in android OS
这篇关于安卓:是否有可能为TIFF图像转换为JPG,PNG?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!