code: public static BufferedImage convertTo(GrayU8 src, BufferedImage dst) {
  		dst = checkInputs(src, dst);
  
  		DataBuffer buffer = dst.getRaster().getDataBuffer();
  		try {
  			if (buffer.getDataType() == DataBuffer.TYPE_BYTE && isKnownByteFormat(dst) ) {
  				ConvertRaster.grayToBuffered(src, (DataBufferByte)buffer, dst.getRaster());
  			} else if (buffer.getDataType() == DataBuffer.TYPE_INT) {
  				ConvertRaster.grayToBuffered(src, (DataBufferInt)buffer, dst.getRaster());
  			} else {
  				ConvertRaster.grayToBuffered(src, dst);
  			}
  			// hack so that it knows the buffer has been modified
  			dst.setRGB(0,0,dst.getRGB(0,0));
  		} catch( java.security.AccessControlException e) {
  			ConvertRaster.grayToBuffered(src, dst);
  		}
  
  		return dst;
  	}
docs: Converts a {@link GrayU8} into a BufferedImage.  If the buffered image
  has multiple channels then the input image is copied into each channel.
  
  @param src Input image.
  @param dst Where the converted image is written to.  If null a new image is created.
  @return Converted image.