System.Drawing.Image imgPhoto = System.Drawing.Image.FromFile("D:/20130806160802.jpg"); int sourceWidth = imgPhoto.Width; int sourceHeight = imgPhoto.Height; Response.Write(sourceWidth);