/** Simple demo program real file in a RealImage and display it * in a popup windows * Demo for dia course. * @auther Will Hossack, */ import uk.ac.ed.ph.signal.*; // Signal classes public class ImageDisplay { public static void main(String args[]) { // Check that argument was given. if (args.length == 0) { System.err.println("Usage: java ImageDisplay filename"); System.exit(1); } String file = args[0]; // Read image (type depermined by suffix) RealImage im = RealImage.readImage(file); System.out.println("Read image is : " + im); // Create a display panel ImageFrame display = new ImageFrame("My Image"); display.setVisible(true); display.addImage(im); // Add image with (with autscale defaults) display.centre(); // Display in centre of screen } }