public static Dimension resizeToArea(int width, int height, long newArea) {
		double x1 = (double) width;
		double y1 = (double) height;
		double a1 = (double) (x1 * y1);
		double a2 = (double) newArea;
		
		double s = (float) Math.sqrt((a2/a1));
		double x2 = x1 * s;
		double y2 = y1 * s;
		
		int newX = (int) Math.round(x2);
		int newY = (int) Math.round(y2);
		
		return new Dimension(newX, newY);
	}