Hello to all of the weather-weary out there!

User submits an image for uploading.
The system accepts the image and performs a resizing of the image to a standard 64x64.

I want to save the image as a BLOB. And under normal circumstances, I can do so without any issues with the following code:
VB Code:
  1. Dim imageName As String = File1.PostedFile.FileName
  2.             Dim selectedFile As HttpPostedFile = File1.PostedFile
  3.             Dim imageLength As Integer = selectedFile.ContentLength
  4.             MsgBox(imageLength)
  5.             Dim binaryImagedata(imageLength) As Byte
  6.             selectedFile.InputStream.Read(binaryImagedata, 0, imageLength)
  7.  
  8.             Dim connStr As String = "connectionstring"
  9.             Dim connect As SqlConnection = New SqlConnection(connStr)
  10.             connect.Open()
  11.             Dim cmd As New SqlCommand("INSERT pic (id, avatar, imagename) VALUES (@id, @binaryimagedata, @imageName)", connect)
  12.             cmd.Parameters.AddWithValue("@id", id)
  13.             cmd.Parameters.AddWithValue("@binaryimagedata", binaryImagedata)
  14.             cmd.Parameters.AddWithValue("@imageName", imageName)
  15.                     cmdupass.ExecuteNonQuery()


However, after I resize the image, I have no way to extrapolate the bytesize of the new image. The byte size is needed for upload to occur.

VB Code:
  1. selectedFile.InputStream.Read(binaryImagedata, 0, [COLOR=Red]imageLength[/COLOR])


Here is the code used to convert the image size:

VB Code:
  1. Dim fullSizeImg As System.Drawing.Image = System.Drawing.Image.FromFile(UploadedFile)
  2.         Dim dummyCallBack As System.Drawing.Image.GetThumbnailImageAbort = New System.Drawing.Image.GetThumbnailImageAbort(AddressOf ThumbnailCallback)
  3.  
  4.         Dim ThumbHeight, ThumbWidth As Integer
  5.         Dim FullHeight As Integer = fullSizeImg.Height
  6.         Dim FullWidth As Integer = fullSizeImg.Width
  7.         If FullHeight > FullWidth Then
  8.             ThumbHeight = 64
  9.             ThumbWidth = FullWidth / FullHeight * 64
  10.         Else
  11.             ThumbWidth = 64
  12.             ThumbHeight = FullHeight / FullWidth * 64
  13.         End If
  14.         Dim thumbNailImg As System.Drawing.Image = fullSizeImg.GetThumbnailImage(ThumbWidth, ThumbHeight, dummyCallBack, IntPtr.Zero)

At this point I am stuck. I have a resized image but no way to upload to my db as a BLOB.