code: public static BufferedImage get(Image img, int imgType){
  		Function<Integer, ImageObserver> obs = flags->{
  			return (image, infoflags, x, y, width, height)->(infoflags & flags)!=flags;
  		};
  		BufferedImage bimg = new BufferedImage(
  				img.getWidth(obs.apply(ImageObserver.WIDTH)), 
  				img.getHeight(obs.apply(ImageObserver.HEIGHT)), 
  				imgType);
  		Graphics2D gr2D = bimg.createGraphics();
  		gr2D.drawImage(img, 0, 0, obs.apply(ImageObserver.ALLBITS));
  				
  		gr2D.dispose();
  		
  		return bimg;
  	}
docs: Creates a new BufferedImage of the specified imgType and same size as
  the provided image and draws the provided Image onto the new BufferedImage.
  @param img to be copied to BufferedImage
  @param imgType of the BufferedImage. See
  {@link BufferedImage#BufferedImage(int, int, int)} for details on the
  available imgTypes.
  @return a BufferedImage copy of the provided Image
  @since 1.0