Pixel width and height of uploaded image RRS feed

  • Question

  • User1764167293 posted

    I am using the image control to upload an image.

    I can get the file's name with fileupload1.FileName or its length with FileUpload1.FileBytes.Length.

    How do I get the images's pixel width and height?

    Thanking you in anticipation.



    Monday, June 8, 2009 3:30 PM


  • User-1810834779 posted

    Load the image in the Bitmap class and after that read the Height and Width properties.

    Maybe you should first save the image to some location on the webserver before you could load it into the bitmap class.


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 9, 2009 2:52 AM