gpt4 book ai didi

java - 将 Bitmap 转换为 Bitmap[] 数组

转载 作者:行者123 更新时间:2023-12-02 07:40:35 28 4
gpt4 key购买 nike

List<String> url = new ArrayList<String>();
public Bitmap[] thumbs = { };

我从我的方法中获取图像fetchImage(String url)

for (int i = 0; i < (url.size()); i++) {
/* I fetch image with param String URL and return as Bitmap */
Bitmap photo = fetchImage(url.get(i));
}

如何将位图照片作为数组推送到Bitmap[]拇指中?

最佳答案

执行以下操作:

List<String> url = new ArrayList<String>();
public Bitmap[] thumbs = new Bitmap[url.size()];

for (int i = 0; i < (url.size()); i++) {
/* I fetch image with param String URL and return as Bitmap */
thumbs[i] = fetchImage(url.get(i));
}

关于java - 将 Bitmap 转换为 Bitmap[] 数组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11663018/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com