You can get X and Y coordinates by simply using getX and getY functions as given below.
WebElement Image = driver.findElement(By.xpath("//yourxpathhere"));
//Used points class to get x and y coordinates of element.
Point point = Image.getLocation();
int xcord = point.getX();
System.out.println("Element's Position from left side Is "+xcord +" pixels.");
int ycord = point.getY();
System.out.println("Element's Position from top side Is "+ycord +" pixels.");
Hope that helps!