public static Image loadRaw(File file, int width, int height)
			throws IOException {
		
		BufferedImage ret;
		byte[] data = getBytesFromFile(file);
		ret = new BufferedImage(width, height, BufferedImage.TYPE_BYTE_GRAY);
		WritableRaster raster = ret.getRaster();
		int k = 0;
		for (int j = 0; j < height; j++) {
			for (int i = 0; i < width; i++) {
				raster.setSample(i, j, 0, data[k]);
				k = k + 1;
			}
		} 
		Image image = new RgbImage(width, height);
		for (int i = 0; i < width; i++) {
			for (int j = 0; j < height; j++) {
				image.setPixel(i, j, ret.getRGB(i, j));
			}
		}
		return image;
	}