code: public static void requireAreaInImageBounds(final int xStart, final int yStart, final int width, final int height, ImgBase<?> img){
  		if(		width <= 0 || height <= 0 ||
  				xStart < 0 || yStart < 0 ||
  				xStart+width > img.getWidth() || yStart+height > img.getHeight() )
  		{
  			throw new IllegalArgumentException(String.format(
  							"provided area [%d,%d][%d,%d] is not within bounds of the image [%d,%d]",
  							xStart,yStart,width,height, img.getWidth(), img.getHeight()));
  		}
  	}
docs: Throws an {@link IllegalArgumentException} when the specified area
  is not within the bounds of the specified image, or if the area
  is not positive.
  This is used for parameter evaluation.
  
  @param xStart left boundary of the area
  @param yStart top boundary of the area
  @param width of the area
  @param height of the area
  @param img the area has to fit in.
  @throws IllegalArgumentException when area not in image bounds or not area not positive