| 高级图像处理图像I/O API RC 1.0 |
|
|
|
|
| 来源: 作者:John Zukowski 添加日期:2006-6-11 8:57:14 点击次数: |
|
try { String name = prompt.getText(); File file = new File(name); if (file.exists()) { BufferedImage image = ImageIO.read(file.toURL()); if (image == null) { System.err.println("Invalid input file format"); } else { String selection = (String)comboBox.getSelectedItem(); String outputFilename = name + "." + selection; File outputFile = new File(outputFilename); |
|
| |