【问题标题】:DecodeByteArray with WebService image always null带有 WebService 图像的 DecodeByteArray 始终为空
【发布时间】:2010-10-26 18:23:06
【问题描述】:

我正在尝试做的事情:

我正在调用一个向我发送图像的 WebService。 我从entity.getContent() 方法中得到它。

在我的代码中,我尝试使用 de BitmapFactory.decodeByteArray(myImage, 0, myImage.lenght),但它返回给我的位图始终是 null

有人有想法吗?

【问题讨论】:

    标签: android bitmap android-image


    【解决方案1】:

    当无法从该数组中解码图像时,decodeByteArray 返回 null,您可能以 BitmapFactory 无法理解的格式获取图像。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-04-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-27
      • 2021-01-18
      • 2018-06-12
      相关资源
      最近更新 更多