code: private BufferedImage buildImage(byte[] bgr) {
  		BufferedImage image = new BufferedImage(resolution.width, resolution.height, BufferedImage.TYPE_3BYTE_BGR);
  		byte[] imageData = ((DataBufferByte) image.getRaster().getDataBuffer()).getData();
  		System.arraycopy(bgr, 0, imageData, 0, bgr.length);
  
  		return image;
  	}
docs: Based on answer: https://stackoverflow.com/a/12062505/7030976
  
  @param bgr - byte array in bgr format
  @return new image