HOw to find Posters and their Size from a specific Path

Hi,
I am trying to find the images from specific Path and Need to find There Size.

I Have Tried Following Code Which is Giving me list of Files…

String path = “D:\”;
String files;
File folder = new File(path);
File[] listOfFiles = folder.listFiles();
for (int p = 0; p < listOfFiles.length; p++)
{ if (listOfFiles[p].isFile())
{ files = listOfFiles[p].getName();
System.out.println(files);
}
}

I am getting Size of the Single image by Using Following Code.

Picture picture = worksheet.getShapes().addPicture(5,5,"C:\123.bmp ");
int width= picture.getWidth();
int Height= picture.getHeight();

But How to Check the Size if the Type is of File. Or is there any alternate way to find the images from the Path.


Hi,

I Got the solution.

Hi,


For other people sake, can you share your solution with us.
Thank you