public static Image createImage(Component c) {

		// prevent this from being called when the user has made the window too small to work
		Rectangle bounds = c.getBounds();
		int w = Math.max(bounds.width, 1);
		int h = Math.max(bounds.height, 1);

		BufferedImage bufferedImage = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
		Graphics g = bufferedImage.getGraphics();
		c.paint(g);
		g.dispose();
		return bufferedImage;
	}
Creates an image of the given component

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