With appium you can get widht and height of the screen like this:
driver.manage().window().getSize().getHeight()
driver.manage().window().getSize().getWidth()
…but if you want to know sizes of the image you can do this with Java:
try {
File f = new File(ScreenshotPath);
BufferedImage image = ImageIO.read(f);
int height = image.getHeight();
int width = image.getWidth();
}catch(…)…