//Create file for the source File input = new File("c:\\30999398h.gif"); //Read the file to a BufferedImage BufferedImage image = ImageIO.read(input); try { //BufferedImage bi = getMyImage(); // retrieve image File outputfile = new File("c:\\saved.jpg"); ImageIO.write(image, "jpg", outputfile); } catch (IOException e) { }