public Image getScaledImage( InputStream in ) throws IOException {
		BufferedImage img = ImageIO.read( in );
		int width = img.getWidth();
		int height = img.getHeight();
		
		if ( width <= maxIconWidth && height < maxIconHeight )
			return img;
		
		if ( width > height ) {
			height /= width/maxIconWidth;
			width = maxIconWidth;
		} else {
			width /= height/maxIconHeight;
			height = maxIconHeight;
		}
		Image scaled = img.getScaledInstance(width, height, Image.SCALE_SMOOTH);
		return scaled;
	}