[ Solved ] Get Width and Height of an image using C#
Code:
using System.Drawing; //include this namespace
Bitmap uploadedimage = new Bitmap(FileUpload1.PostedFile.InputStream);
string hei = String.Format(uploadedimage.Height.ToString());
string wid = String.Format(uploadedimage.Width.ToString());
Description:
Fileupload1 is the name of the Control you have used for uploading files.
using System.Drawing; //include this namespace
Bitmap uploadedimage = new Bitmap(FileUpload1.PostedFile.InputStream);
string hei = String.Format(uploadedimage.Height.ToString());
string wid = String.Format(uploadedimage.Width.ToString());
Description:
Fileupload1 is the name of the Control you have used for uploading files.