public static BufferedImage getBufferedImage(Image image) {
		if (image instanceof BufferedImage) {
			return (BufferedImage) image;
		}

		boolean success = waitForImage("<unknown name>", image);
		if (!success) {
			return null;
		}

		int width = image.getWidth(null);
		int height = image.getHeight(null);

		BufferedImage bufferedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
		Graphics graphics = bufferedImage.getGraphics();
		graphics.drawImage(image, 0, 0, null);
		graphics.dispose();
		return bufferedImage;
	}
Copies this image into a buffered image.  If this image is already a buffered image, then
it will be returned.

@param image the image
@return the buffered image
Ghidra/Framework/Gui/src/main/java/generic/util/image/ImageUtils.java