Thread: resize image
View Single Post
  #1 (permalink)  
Old October 27th, 2008, 02:47 PM
dhoward dhoward is offline
Authorized User
 
Join Date: Oct 2006
Location: , , .
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default resize image

I need to resize my uploaded image before actually saving it to the sql server and don't know where to get started. Here's a code that I have thus far

 Dim fileName As String
        Dim fileType As String
        Dim namePosition As Int16
        Dim stream As IO.Stream

        stream = file1.PostedFile.InputStream
        Dim uploadedFile(stream.Length) As Byte
        stream.Read(uploadedFile, 0, stream.Length)

        namePosition = file1.PostedFile.FileName.LastIndexOf("\") + 1
        fileName = file1.PostedFile.FileName.Substring(namePosition)
        fileType = file1.PostedFile.ContentType




            connFF.Open()
            With cmdImages.Parameters
                .Add("@casenumber", strcasenumber)
                .Add("@reportdate", dtreportdate)
                .Add("@description", strdescription)
                .Add("@DSFM", strDSFM)
                .Add("@pic", uploadedFile)
            End With