Go Back   Velocity Reviews > General Computer Discussion > Software
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
Old 02-07-2008, 10:03 AM   #1
Default Upload image thumbnail to Web Server ? Problem...


Hi,
I want to upload an image to my web server. Uploading simple images work fine but when i tried to upload the generated thumnnail to another folder named Thumb, i can't.
It works fine in local system but not in web server so I think that there may be some problem in my uploading code( may be in the last line of my code). Please do some modification with this code so that I can upload the image to the Web Server also...

Please help me...its a very urgent task for me...
Thanks,
Tapas

Code:


// Get the path of the original Imagestring displayedImg = Server.MapPath("./images/") +this.txtPCode.Text+".jpg";
string path=Server.MapPath("/images/");
// Get the path of the Thumb folderstring displayedImgThumb = Server.MapPath("./Thumb/");

// Get the original image file namestring imgFileName = Path.GetFileName(displayedImg);

// Load original image
System.Drawing.Image myimg = System.Drawing.Image.FromFile(displayedImg);

// Get the thumbnail 50 X 50 pxmyimg = myimg.GetThumbnailImage(50, 50, null, IntPtr.Zero);

// Save the new thumbnail image
myimg.Save(displayedImgThumb + imgFileName, myimg.RawFormat);


tapasmahata
tapasmahata is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload image to wwwroot as thumbnail... tapasmahata Software 0 01-24-2008 11:20 AM
image upload in asp .net 2.0 needo General Help Related Topics 1 08-26-2007 01:59 PM
SQL Server 2005 Migration Assistant Autonumber problem. LarryWestMCSD MCTS 1 03-28-2007 02:08 AM
Die Another Day - image problem towards end of film. Larry L. DVD Video 1 09-24-2003 04:30 AM
Re: Need Ideas For A New Server, Long Post Gareth Church A+ Certification 2 07-27-2003 12:46 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46