code: private BufferedImage to8Bit1ComponentGrayScale(int[][] decoded, int width, int height) {
          BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_BYTE_GRAY);
          byte[] imageBuffer = ((DataBufferByte) image.getRaster().getDataBuffer()).getData();
  
          for (int i = 0; i < imageBuffer.length; i++) {
              imageBuffer[i] = (byte) decoded[0][i];
          }
  
          return image;
      }
docs: Converts the decoded buffer into a BufferedImage.
  precision: 8 bit, componentCount = 1
  
  @param decoded data buffer
  @param width   of the image
  @param height  of the image
  @return a BufferedImage.TYPE_BYTE_GRAY