I'm trying to save a modified image as a jpg, but I think I'm completely turned around on how to do it. here's my code so far..
BufferedImage filteredImage = f.filter(image);
JFileChooser save = new JFileChooser();
try {
// retrieve image
BufferedImage bi = filteredImage;
File outputfile = new File("image.jpg");
ImageIO.write(bi, "jpg", outputfile);
save.showSaveDialog(save);
}
catch (IOException e2) {
}
The save window opens, but the field is blank and does not save anything. Any idea what I'm doing wrong?