docs: public static <T extends ImageGray<T>> Planar<T>
  	convertFromPlanar(BufferedImage src, Planar<T> dst , boolean orderRgb , Class<T> type )
  	{
  		if( src == null )
  			throw new IllegalArgumentException("src is null!");
  
  		if (dst != null) {
  			dst.reshape(src.getWidth(), src.getHeight());
  		}
  
  		try {
  			WritableRaster raster = src.getRaster();
  
  			int numBands;
  			if( !isKnownByteFormat(src) )
  				numBands = 3;
  			else
  				numBands = raster.getNumBands();
  
  			if( dst == null)
  				dst = new Planar<>(type, src.getWidth(), src.getHeight(), numBands);
  			else if( dst.getNumBands() != numBands )
  				dst.setNumberOfBands(numBands);
  
  			DataBuffer srcBuff = src.getRaster().getDataBuffer();
  			if( type == GrayU8.class ) {
  				if (srcBuff.getDataType() == DataBuffer.TYPE_BYTE &&
  						isKnownByteFormat(src) ) {
  					if( src.getType() == BufferedImage.TYPE_BYTE_GRAY)  {
  						for( int i = 0; i < dst.getNumBands(); i++ ) {
  							ConvertRaster.bufferedToGray( (DataBufferByte)srcBuff, raster, ((Planar<GrayU8>) dst).getBand(i));
  						}
  					} else {
  						ConvertRaster.bufferedToPlanar_U8((DataBufferByte)srcBuff, src.getRaster(), (Planar<GrayU8>) dst);
  					}
  				} else if (srcBuff.getDataType() == DataBuffer.TYPE_INT) {
  					ConvertRaster.bufferedToPlanar_U8((DataBufferInt)srcBuff, src.getRaster(), (Planar<GrayU8>) dst);
  				} else {
  					ConvertRaster.bufferedToPlanar_U8(src, (Planar<GrayU8>) dst);
  				}
  			} else if( type == GrayF32.class ) {
  				if (srcBuff.getDataType() == DataBuffer.TYPE_BYTE &&
  						isKnownByteFormat(src)  ) {
  					if( src.getType() == BufferedImage.TYPE_BYTE_GRAY)  {
  						for( int i = 0; i < dst.getNumBands(); i++ )
  							ConvertRaster.bufferedToGray((DataBufferByte)srcBuff, raster, ((Planar<GrayF32>) dst).getBand(i));
  					} else {
  						ConvertRaster.bufferedToPlanar_F32( (DataBufferByte)srcBuff, src.getRaster(), (Planar<GrayF32>) dst);
  					}
  				} else if (srcBuff.getDataType() == DataBuffer.TYPE_INT) {
  					ConvertRaster.bufferedToPlanar_F32((DataBufferInt)srcBuff, src.getRaster(), (Planar<GrayF32>) dst);
  				} else {
  					ConvertRaster.bufferedToPlanar_F32(src, (Planar<GrayF32>) dst);
  				}
  			} else {
  				throw new IllegalArgumentException("Band type not supported yet");
  			}
  
  		} catch( java.security.AccessControlException e) {
  			// Applets don't allow access to the raster()
  			if( dst == null )
  				dst = new Planar<>(type, src.getWidth(), src.getHeight(), 3);
  			else {
  				dst.setNumberOfBands(3);
  			}
  
  			if( type == GrayU8.class ) {
  				ConvertRaster.bufferedToPlanar_U8(src, (Planar<GrayU8>) dst);
  			} else if( type == GrayF32.class ) {
  				ConvertRaster.bufferedToPlanar_F32(src, (Planar<GrayF32>)dst);
  			}
  		}
  
  		// if requested, ensure the ordering of the bands
  		if( orderRgb ) {
  			orderBandsIntoRGB(dst,src);
  		}
  
  		return dst;
  	}