1

我停留在一个点,我必须从像素数组创建图像文件(最好是 PNG),其中数组、宽度和高度作为参数给出。真正的问题是我不能使用BufferedImageor ImageIO

这个实现已经在 Android 子项目中使用 Bitmap 实现,如下所示:

Bitmap bitmap = Bitmap.createBitmap(pixels,
                width, height, Bitmap.Config.ARGB_8888);

像素图是通过合并 3 个图像颜色信息创建的。

不使用BufferedImage或者ImageIO我不知道如何处理它。

你有什么想法如何实现吗?

4

1 回答 1

1

使用像素图

Pixmap pixmap = new Pixmap(pixels, 0, pixels.length);
Texture texture = new Texture(pixmap); 
于 2018-08-26T18:12:04.013 回答