Free Support Forum -

Java detecting image heght and width

i want to detect height and widhth of image using java code

Hi there,

Thanks for your inquiry. Please find below code snippet for getting image height and width. Hopefully it will serve the purpose.

com.aspose.imaging.Image image = com.aspose.imaging.Image.load(“E:/Data/test.bmp”);

int imageHeight=image.getHeight();
int imageWidth=image.getWidth();

Please feel free to contact us for any further assistance.

Best Regards,