public static Bitmap getAndConvert(String res, int width, int height, boolean higherQuality) {
    	try {
			InputStream input = new FileInputStream(res);
			BufferedImage image = ImageIO.read(input);
			
			BufferedImage finalBuffer = getScaledInstance(image, width, height, RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR, higherQuality);
			
			Bitmap picture = convert(finalBuffer);
			
			input.close();
			image.flush();
			finalBuffer.flush();
			
			return picture;
			
    	} catch(IOException e) {
    		System.out.println("Error getting the image");
			System.exit(1);
			e.printStackTrace();
		}
		
		return null;
    }