Exception in thread "main" javax.imageio.IIOException: Can't read input
file!
at javax.imageio.ImageIO.read(ImageIO.java:1196)
at TabbedPaneDemo$HeadSpin.<init>(TabbedPaneDemo.java:125)
at TabbedPaneDemo.<init>(TabbedPaneDemo.java:36)
at TabbedPaneDemo.main(TabbedPaneDemo.java:32)
>>>>>>>>>>
File f = new File("C:/PgmJava/images/duke0.gif");
BufferedImage bi = ImageIO.read(f);
BufferedImage output = new BufferedImage (200,300,
BufferedImage.TYPE_INT_ARGB);
output = ImageIO.read(f);
// Save
File outputFile = new File("C:/PgmJava/image.png");
ImageIO.write(output, "PNG", outputFile);
File f = new File("C:/PgmJava/images/duke0.gif");
Try
File f = new File("C:\\PgmJava\\images\\duke0.gif");
And of course, make sure that the file duke0.gif actually exists at that
location.
/<en
Windows will quite happily accept either form of file separator, as will
Java when running on Windows. So your suggested change will have no effect.
Mark Thornton
Sorry, it was my fault.
Thanks a lot,regards Lando.