locked
Get Height & width of image after resizing at runtime RRS feed

  • Question

  • User-1558868557 posted

    Hi,

    How can i get height & width of resized image at runtime dynamically.

    i need reply urgently if anyone knows,plz send code for that.

    Thanks.

    Thursday, December 6, 2007 5:42 AM

All replies

  • User294545519 posted

     Does this help?

     

     Dim imageurl As String = Server.MapPath("/uploads/" + filename)
            Dim fullSizeImg As System.Drawing.Image = System.Drawing.Image.FromFile(imageurl)
            
            Dim width As Integer = fullSizeImg.Width
            Dim height As Integer = fullSizeImg.Height
      
    Thursday, December 6, 2007 10:09 AM
  • User-1558868557 posted

    Hi there,

    This code will give me actual height & width of image,that is already i've done.

    I want height & width at runtime when i resize an image at runtime, and i have to save that resized image with their size after resize.

    Hope u got my problem.

    Plz reply urgently if anyone knows this.

    Thanks.

    Friday, December 7, 2007 12:04 AM
  • User1356549919 posted

    You can pass the Byte array of resized image in the above code

    Or 

    If you are dealing this with image control, then you can get img(Image control ID).width &  img.height.

    Tuesday, December 2, 2008 1:58 AM