安卓:是否有可能为TIFF图像转换为JPG,PNG? [英] Android: Is it possible to convert a TIFF image to JPG, PNG?

查看:744
本文介绍了安卓:是否有可能为TIFF图像转换为JPG,PNG?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道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 ++添加到您的项目,然后的的libtiff 应该做你想要什么。

If you are willing to add some C++ to your project via the Android NDK, then libtiff should do what you want.

见问题<一href=\"http://stackoverflow.com/questions/1278087/convert-jpeg-png-image-to-tiff-image-format-in-android-os\">Convert JPEG / PNG图像在Android操作系统 TIFF图像格式

see question Convert JPEG/PNG image to TIFF image format in android OS

这篇关于安卓:是否有可能为TIFF图像转换为JPG,PNG?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆