code: public INDArray toBgr(InputStream inputStream) {
          try {
              BufferedImage image = ImageIO.read(inputStream);
              return toBgr(image);
          } catch (IOException e) {
              throw new RuntimeException("Unable to load image", e);
          }
      }
docs: Convert an input stream to an bgr spectrum image
  
  @param inputStream the input stream to convert
  @return the input stream to convert