p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).

Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 27th, 2008, 03:47 PM
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



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php image resize danu_322 PHP FAQs 0 November 2nd, 2007 10:29 AM
Image Resize Magen Classic ASP Basics 5 January 23rd, 2007 12:17 PM
hyperlink image won't resize chowdn ASP.NET 2.0 Basics 0 October 23rd, 2006 02:19 PM
Image Resize after Upload echovue PHP How-To 2 July 13th, 2006 01:16 AM
Resize image before saving? mossberg ASP.NET 1.1 10 September 22nd, 2004 04:16 AM



All times are GMT -4. The time now is 02:47 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc