docs: public static PlanarImage convertGray2RGB(PlanarImage src) {
          ColorSpace srcCS = src.getColorModel().getColorSpace();
          if(srcCS.getType() == ColorSpace.TYPE_GRAY) {
              int x = 3;
              int y = src.getSampleModel().getNumBands() + 1;
              double[][] matrix = new double[x][y];
              for (int i = 0; i < x; i++) {
                  for (int j = 0; j < y; j++) {
                      if (j == 0) {
                          matrix[i][j] = 1.0D;
                      } else {
                          matrix[i][j] = 0.0D;
                      }
                  }
              }
  
              ParameterBlock pb = new ParameterBlock();
              pb.addSource(src);
              pb.add(matrix);
              src = JAI.create("bandcombine", pb, null);
          }
  
          return src;
      }