code: public static boolean checkInside(ImageBase b, int x , int y , int radius ) {
  		if( x-radius < 0 )
  			return false;
  		if( x+radius >= b.width )
  			return false;
  
  		if( y-radius < 0 )
  			return false;
  		if( y+radius >= b.height )
  			return false;
  		return true;
  	}
docs: Returns true if the point is contained inside the image and 'radius' away from the image border.
  
  @param b Image
  @param x x-coordinate of point
  @param y y-coordinate of point
  @param radius How many pixels away from the border it needs to be to be considered inside
  @return true if the point is inside and false if it is outside