public static void writePNG(OutputStream out, DriveTrainComparisonView view, int width, int height) throws IOException {
public static void writePNG(OutputStream out, JComponent view, int width, int height) throws IOException {
	public static void writePNG(OutputStream out, DriveTrainComparisonView view, int width, int height) throws IOException {		BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);		Graphics2D g = image.createGraphics();		Dimension origSize = view.getSize();		view.setSize(width, height);		view.paint(g);		view.setSize(origSize);		ImageIO.write(image, "png", out);	}