This topic appears in a few places, but not the specifics (as far as I can find):
I want to use a BufferedImage GuiNode and I can do this using the Picture class if the Buffered image is creatd by loading a PNG. For example:
BufferedImage background = ImageIO.read(resourceClass.getResourceAsStream("icons" + File.separatorChar + "background.png"));
texture.setImage(new AWTLoader().load(background , true));
However, it does not seem to work for buffered images generated like this:
background = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);
int color = 125;
for (int y = 0; y < background .getHeight(); y++)
{
for (int x = 0; x < background .getWidth(); x++)
{
background .setRGB(x, y, color);
}
}
texture.setImage(new AWTLoader().load(background , true));
Am I missing something?
Thanks in advance,
MJ