code: public static BufferedImage extractBuffered(InterleavedU8 img) {
  		if (img.isSubimage())
  			throw new IllegalArgumentException("Sub-images are not supported for this operation");
  
  		final int width = img.width;
  		final int height = img.height;
  		final int numBands = img.numBands;
  
  		// wrap the byte array
  		DataBuffer bufferByte = new DataBufferByte(img.data, width * height * numBands, 0);
  
  		ColorModel colorModel;
  		int[] bOffs = null;
  
  		if (numBands == 3) {
  			ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
  			int[] nBits = {8, 8, 8};
  			bOffs = new int[]{2, 1, 0};
  			colorModel = new ComponentColorModel(cs, nBits, false, false,
  					Transparency.OPAQUE,
  					DataBuffer.TYPE_BYTE);
  		} else if (numBands == 1) {
  			ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY);
  			int[] nBits = {8};
  			bOffs = new int[]{0};
  			colorModel = new ComponentColorModel(cs, nBits, false, true,
  					Transparency.OPAQUE,
  					DataBuffer.TYPE_BYTE);
  		} else {
  			throw new IllegalArgumentException("Only 1 or 3 bands supported");
  		}
  
  		// Create a raster using the sample model and data buffer
  		WritableRaster raster = Raster.createInterleavedRaster(
  				bufferByte, width, height, img.stride, numBands, bOffs, new Point(0, 0));
  
  		// Combine the color model and raster into a buffered image
  
  		return new BufferedImage(colorModel, raster, false, null);
  	}
docs: Creates a new BufferedImage that internally uses the same data as the provided
  {@link InterleavedU8}.  If 3 bands then the image will be of type TYPE_3BYTE_BGR
  or if 1 band TYPE_BYTE_GRAY.
  
  @param img Input image who's data will be wrapped by the returned BufferedImage.
  @return BufferedImage which shared data with the input image.