code: public static <T extends ImageBase<T>> T convertFrom(BufferedImage src , boolean orderRgb , ImageType<T> imageType) {
  
  		T out = imageType.createImage(src.getWidth(),src.getHeight());
  
  		switch( imageType.getFamily() ) {
  			case GRAY:
  				convertFromSingle(src, (ImageGray)out, imageType.getImageClass());
  				break;
  
  			case PLANAR:
  				convertFromPlanar(src, (Planar) out, orderRgb, imageType.getImageClass());
  				break;
  
  			case INTERLEAVED:
  				convertFromInterleaved(src, (ImageInterleaved) out, orderRgb);
  				break;
  
  			default:
  				throw new RuntimeException("Not supported yet");
  		}
  
  		return out;
  	}
docs: Converts a buffered image into an image of the specified type.
  
  @param src Input BufferedImage which is to be converted
  @param orderRgb If applicable, should it adjust the ordering of each color band to maintain color consistency
  @param imageType Type of image it is to be converted into
  @return The image