code: public static void printRenderedImageData(RenderedImage renderedImage) {
          RandomIter iter = RandomIterFactory.create(renderedImage, null);
          int cols = renderedImage.getWidth();
          int rows = renderedImage.getHeight();
          int numBands = renderedImage.getSampleModel().getNumBands();
          for (int r = 0; r < rows; r++) {
              for (int c = 0; c < cols; c++) {
                  for (int b = 0; b < numBands; b++) {
                      if (b > 0) {
                          printer.print("/");
                      }
                      printer.print(iter.getSampleDouble(c, r, b));
                  }
                  printer.print(separator);
              }
              printer.println();
          }
          iter.done();
      }
docs: Print data from a {@link RenderedImage}.
  
  @param renderedImage
  the image.