System.Drawing.Image imgPhoto = System.Drawing.Image.FromFile(Server.MapPath(imageUrl)); int widths = imgPhoto.Width; int heights = imgPhoto.Height;