code: public INDArray toBgr(BufferedImage image) {
          if (image == null)
              throw new IllegalStateException("Unable to load image");
          image = scalingIfNeed(image, false);
          return toINDArrayBGR(image);
      }
docs: Convert an BufferedImage to an bgr spectrum image
  
  @param image the BufferedImage to convert
  @return the input stream to convert