code: public static BufferedImage convertTo_U8(Planar<GrayU8> src, BufferedImage dst, boolean orderRgb ) {
  		dst = checkInputs(src, dst);
  
  		if( orderRgb ) {
  			src = orderBandsIntoBuffered(src, dst);
  		}
  
  		DataBuffer buffer = dst.getRaster().getDataBuffer();
  		try {
  			if (buffer.getDataType() == DataBuffer.TYPE_BYTE && isKnownByteFormat(dst) ) {
  				ConvertRaster.planarToBuffered_U8(src, (DataBufferByte)buffer, dst.getRaster());
  			} else if (buffer.getDataType() == DataBuffer.TYPE_INT) {
  				ConvertRaster.planarToBuffered_U8(src, (DataBufferInt)buffer, dst.getRaster());
  			} else {
  				ConvertRaster.planarToBuffered_U8(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.planarToBuffered_U8(src, dst);
  		}
  
  		return dst;
  	}
docs: Converts a {@link Planar} {@link GrayU8} into a BufferedImage.
  
  @param src Input image.
  @param dst Where the converted image is written to.  If null a new image is created.
  @param orderRgb If applicable, should it change the order of the color bands (assumed RGB or ARGB) into the
  order based on BufferedImage.TYPE. Most of the time you want this to be true.
  @return Converted image.