Try the following:
package demo; import javax.imageio.ImageIO; import java.io.File; import java.io.IOException; public class Main { public static void main( String [] args ) throws IOException { File input = new File("input.gif"); File output = new File("output.png"); ImageIO.write( ImageIO.read( input ), "png", ouput); } }
Read ImageIO .
Of course, you can read and write from the stream.
OscarRyz
source share