Skia 解码器无法解码远程流

Skia Decoder fails to decode remote Stream(Skia 解码器无法解码远程流)
本文介绍了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 解码器无法解码远程流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)