Skia Decoder fails to decode remote Stream(Skia 解码器无法解码远程流)
问题描述
我正在尝试打开 JPEG 图像的远程流并将其转换为位图对象:
I am trying to open a remote Stream of a JPEG image and convert it into a Bitmap object:
BitmapFactory.decodeStream(
new URL("http://some.url.to/source/image.jpg")
.openStream());
解码器返回 null 并且在日志中我收到以下消息:
The decoder returns null and in the logs I get the following message:
DEBUG/skia(xxxx): --- decoder->decode returned false
注意:
1.内容长度非零,内容类型为image/jpeg
2. 当我在浏览器中打开网址时,我可以看到图片.
Note:
1. the content length is non-zero and content type is image/jpeg
2. When I open the URL in browser I can see the image.
我在这里缺少什么?
请帮忙.谢谢.
推荐答案
似乎流和android处理它的方式有问题;错误报告中的补丁现在解决了这个问题.
seems there was some problem with the stream and the way android handled it; the patch in this bug report solved the problem for now.
这篇关于Skia 解码器无法解码远程流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Skia 解码器无法解码远程流


- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01