You will have to create a Bitmap instance from the image file and then query the Width and Height as follows:
VB.NET
Dim bm As Bitmap = New Bitmap(Server.MapPath('b2346.jpg'))
Response.Write('Height :' + bm.Height.ToString())
Response.Write('<br> Width :' + bm.Width.ToString())
C#
Bitmap bm = new Bitmap( Server.MapPath('b2346.jpg'));
Response.Write ('Height :' + bm.Height.ToString() );
Response.Write ('<br> Width :' +bm.Width.ToString() );
Share with