Android BitmapFactory.decodeFile() 方法返回 null

发布于 2024-12-03 18:32:40 字数 318 浏览 0 评论 0原文

我面临位图对象创建的问题。

当我调用 BitmapFactory.decodeFile(imageFullPath) 时,它返回 null。我尝试了可用的解决方案,例如提供完整的图像路径。但我没有得到解决方案。

谁能告诉我为什么它返回 null?

根据开发人员文档,如果路径不可用或无法解码,BitmapFactory.decodeFile(imageFullPath) 将返回 null

就我而言,我面临这个问题是因为第二个(无法解码)。

所以请有人告诉我如何避免这种情况。?

提前致谢。

I am facing an issue with Bitmap object creation.

When i call the BitmapFactory.decodeFile(imageFullPath) it returns null.I tried with the available solutions like giving complete image path.But I didn't get the solution.

Can any one please tell me why it is returning null.?

According to the Developer docs BitmapFactory.decodeFile(imageFullPath) will return null if the path is not available or if unable to decode.

In my case I am facing this because of Second one(Unable to Decode).

So Please anyone tell me How can I avoid this.?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文