--- decoder->decode returned false

简单的url加载图片,遇到的问题。

图片(jpg)下载是没问题,只是在Android手机上打不开图片,导出到PC端,打开正常可见。

http://blog.csdn.net/noway211/article/details/6818983,还有http://stackoverflow.com/questions/4339082/android-decoder-decode-returned-false-for-bitmap-download

都没有解决问题。(这个问题回去测试下,大婶看见了,也可以留言帮忙解惑)

http://stackoverflow.com/questions/11047224/unable-to-load-jpeg-image-with-bitmapfactory-decodefile-returns-null

最终我发现问题源头在于图片,是CMYK的jpg图片,把它在ps里打开也提示了这点,挺无语的。

"Maybe this is not your case but it could be if you are trying to decode images with CMYK colorspace, instead of RGB colorspace. CMYK images, like this one, are not supported by Android, and will not be displayed even in the Android web browser....."

Android不支持CMYK色彩的jgp图片。。。

解决方案:https://github.com/Mariovc/GetCMYKImage(我的图片(1张1兆大小)比较大,感觉很慢,不建议这个,最好第二种),另一种方案是图片回炉,改造成RGB色彩的jpg图片。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值