private void images() {
    	int i = 0;
    	ImageIcon image;
        if (dir.isDirectory()) { // make sure it's a directory
            for (final File f : dir.listFiles(IMAGE_FILTER)) {
            	try {
            		File abc = GameFrame.convert(f, GameFrame.height/v, GameFrame.height/v);
            		Image pic = ImageIO.read(abc); 
            		image = new ImageIcon(pic);
                    img[i] = image;
                    i++;
                    if(i >= img.length) {
                    	return;
                    }
            	} catch(IOException ie) {
            		System.out.println("Failed to read image: "+ f.getAbsolutePath());
                    ie.printStackTrace();
                    System.exit(0);
            	}
            }
        } else {
        	System.out.println("Error: failed to open " + dir.getAbsolutePath());
        }
        if(i <= img.length) {
        	System.out.println("Error: Too few images have been read." +
        			" Have only read " + i + " images.");
        	System.exit(0);
        }
    }