This code provides an empty tiff file, I do not understand why. The Canvas in which g is shows the line.
private BufferedImage bImage;
Graphics2D g2d;
public void paint(Graphics g) {
g2d = (Graphics2D)g;
bImage = new BufferedImage(sX, sY, BufferedImage.TYPE_INT_RGB);
g2d = bImage.createGraphics();
g2d.drawLine(a,b,c,d);
g.drawLine(a,b,c,d);
try { ImageIO.write(bImage, "tiff", saveFile);}...
}