Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old October 3rd, 2006, 10:10 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,838 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 14 h 30 m 10 sec
Reputation Power: 2389
Image Resize Part II - resize image on the fly

Attached is aspx file that can resize given image on the fly to the
desired width and/or height.

Credits for the code go to GunBlade who developed the core logic.

To use the code and resize image, follow those steps:
  1. get server that support ASP.NET
  2. on that server, copy the aspx file as is.
  3. browse to the aspx file in such manner:
    Code:
    http://localhost/ImageResizer.aspx?image=[full image path here]&thumb=[full path of thumbnail to be created here]&width=[desired width]&height=[desired height]
  4. if you have desired width only and would like the height
    calculated automatically, then pass -1 as the height.
  5. if you have desired height only and would like the width
    calculated automatically, then pass -1 as the width.
  6. for example, suppose you got image called "house.jpg" in
    folder named "Images" and you want it resized to 500 pixels
    width:
    Code:
    http://localhost/ImageResizer.aspx?image=C:\Inetpub\wwwroot\Images\  house.jpg&thumb=C:\Inetpub\wwwroot\Images\house_thumb.jpg&width=500&height=-1

    the above will save the thumbnail as house_thumb.jpg in the
    same folder.

to use this in classic ASP code, use XMLHTTP component in
order to "communicate" with the aspx file. simply pass the
URL as demonstrated above:
Code:
<%
Dim strImageName, strThumbName, objXML
strImageName = "mypicture.jpg"
strThumbName = "mypicture_thumb.jpg"
Set objXML = Server.CreateObject("Microsoft.XMLHTTP")
objXML.Open "GET", "http://localhost/ImageResizer.aspx?image=" & Server.MapPath(strImageName) & "&thumb=" & Server.MapPath(strThumbName) & "&width=500&height=-1", True
objXML.Send
Set objXML=Nothing
Response.Write("original: <img src=""" & strImageName & """ /><br />")
Response.Write("thumbnail: <img src=""" & strThumbName & """ /><br />")
%>


--Edit: (11/10/2009)
Fixed the attached ASP.NET code to save the thumbnail in
JPEG (aka JPG) format, making it smaller in size and more standard.
To save in other format, change this line in the .aspx file:
Code:
wrapper.Save(strThumbnailPath, System.Drawing.Imaging.ImageFormat.Jpeg);

to any of the following:
  • Code:
    wrapper.Save(strThumbnailPath, System.Drawing.Imaging.ImageFormat.Jpeg);
  • Code:
    wrapper.Save(strThumbnailPath, System.Drawing.Imaging.ImageFormat.Gif);
  • Code:
    wrapper.Save(strThumbnailPath, System.Drawing.Imaging.ImageFormat.Bmp);
  • Code:
    wrapper.Save(strThumbnailPath, System.Drawing.Imaging.ImageFormat.Png);

--Edit: (12/10/2009)
Upgraded the code to support JPEG compression.
To use this new feature, pass the desired compression level
in the querystring, for example:
Code:
http://localhost/ImageResizer.aspx?image=C:\Inetpub\wwwroot\Images\  house.jpg&thumb=C:\Inetpub\wwwroot\Images\house_thumb.jpg&width=500&height=-1&compression=90

The above will save the thumbnail with compression level
(quality) of 90 which means good quality but rather large
file size.


good luck and happy programming!
Attached Files
File Type: zip ImageResizer.zip (5.1 KB, 63 views)

Last edited by Shadow Wizard : October 12th, 2009 at 08:49 AM. Reason: code upgrade

Reply With Quote
  #2  
Old October 3rd, 2006, 11:02 PM
baseballdude_'s Avatar
baseballdude_ baseballdude_ is offline
Expert Learner
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2005
Location: Wisconsin
Posts: 1,906 baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)  Folding Points: 22104 Folding Title: Starter FolderFolding Points: 22104 Folding Title: Starter Folder
Time spent in forums: 1 Week 5 Days 15 h 20 m 52 sec
Reputation Power: 92
Send a message via AIM to baseballdude_ Send a message via MSN to baseballdude_ Send a message via Yahoo to baseballdude_ Send a message via Google Talk to baseballdude_
Yahav, I looooooooooooooooooove you.

Did I mention that I love you Yahav?
Comments on this post
Shadow Wizard agrees: umm... I think so... :blush:

Reply With Quote
  #3  
Old October 4th, 2006, 12:10 AM
baseballdude_'s Avatar
baseballdude_ baseballdude_ is offline
Expert Learner
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2005
Location: Wisconsin
Posts: 1,906 baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)  Folding Points: 22104 Folding Title: Starter FolderFolding Points: 22104 Folding Title: Starter Folder
Time spent in forums: 1 Week 5 Days 15 h 20 m 52 sec
Reputation Power: 92
Send a message via AIM to baseballdude_ Send a message via MSN to baseballdude_ Send a message via Yahoo to baseballdude_ Send a message via Google Talk to baseballdude_
** Disregard this...I just got it fixed! There was a permissions problem after all -- the internet guest account on this new server wasn't the default IUSR :\

I've combined your upload script with the resizer to create thumbnails of images when they are uploaded. The following script piece only uploads the original file and nothing more. I tested to see that paths are right...what am I doing wrong?
ASP Code:
Original - ASP Code
  1. If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
  2.     Dim objUpload
  3.     Set objUpload = New ShadowUpload
  4.     If objUpload.GetError <> "" Then
  5.         Response.Write("Sorry, could not upload: " & objUpload.GetError)
  6.     Else
  7.         Set objXML = Server.CreateObject("Microsoft.XMLHTTP")
  8.         strDir = strPath & dir
  9.         For x = 0 To objUpload.FileCount-1
  10.             If (objUpload.File(x).ImageWidth < 1) Or (objUpload.File(x).ImageHeight < 1) Then
  11.                 Response.Write("Invalid file type!")
  12.                 Response.End()
  13.             Else
  14.                 Call objUpload.File(x).SaveToDisk(strDir, "")
  15.                 u_bound = u_bound + 1
  16.                 ReDim Preserve arrImages(u_bound)
  17.                 arrImages(u_bound) = objUpload.File(x).FileName
  18.                 strImageName = strDir & "\" & objUpload.File(x).FileName
  19.                 strThumbName = strDir & "\" & getFileName(objUpload.File(x).FileName)
  20.                 objXML.Open "GET", strPathToDir & "ImageResizer.aspx?image=" & strImageName & "&thumb=" & strThumbName & "&width=120&height=-1", True
  21.                 objXML.Send()
  22.             End If
  23.         Next
  24.         Set objXML = Nothing
  25.     End If
  26. End If

Last edited by baseballdude_ : October 4th, 2006 at 12:22 AM.

Reply With Quote
  #4  
Old October 4th, 2006, 12:50 AM
baseballdude_'s Avatar
baseballdude_ baseballdude_ is offline
Expert Learner
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2005
Location: Wisconsin
Posts: 1,906 baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)baseballdude_ User rank is Second Lieutenant (5000 - 10000 Reputation Level)  Folding Points: 22104 Folding Title: Starter FolderFolding Points: 22104 Folding Title: Starter Folder
Time spent in forums: 1 Week 5 Days 15 h 20 m 52 sec
Reputation Power: 92
Send a message via AIM to baseballdude_ Send a message via MSN to baseballdude_ Send a message via Yahoo to baseballdude_ Send a message via Google Talk to baseballdude_
I actually am having the same problem again. The XMLHTTP doesn't seem to work right (even though it doesn't error) and doesn't create the thumbnail. I have this temporarily solved, having it create an iframe to be displayed, lol...but do you know what I'm doing wrong from the post above?

Reply With Quote
  #5  
Old October 4th, 2006, 02:08 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,838 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 14 h 30 m 10 sec
Reputation Power: 2389
debug the code by adding those lines:
Code:
Dim strURL,  strResult
strURL = strPathToDir & "ImageResizer.aspx?image=" & strImageName & "&thumb=" & strThumbName & "&width=120&height=-1"
Response.Write("URL: " & strURL & "<br />")
objXML.Open "GET", strURL, True
objXML.Send
strResult = objXML.ResponseText
Respose.Write("response: " & strResult & "<br />")

and let me know the result of the debugging.

Reply With Quote
  #6  
Old October 16th, 2006, 10:42 AM
petrusj petrusj is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Posts: 3 petrusj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 47 sec
Reputation Power: 0
Does it support only JPG? Tried with GIF images and it didn't create thumbnail.

Reply With Quote
  #7  
Old October 16th, 2006, 11:14 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,838 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 14 h 30 m 10 sec
Reputation Power: 2389
it may fail on certain images. attach the image here if possible and
I'll see for myself. did you try successfully with other images?

Reply With Quote
  #8  
Old October 16th, 2006, 01:20 PM
petrusj petrusj is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Posts: 3 petrusj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 47 sec
Reputation Power: 0
Quote:
Originally Posted by Shadow Wizard
it may fail on certain images. attach the image here if possible and
I'll see for myself. did you try successfully with other images?

Try it yourself with any image other than JPG. It works perfectly with JPG, but I had no luck with GIF or PNG.

Reply With Quote
  #9  
Old October 17th, 2006, 03:06 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,838 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 14 h 30 m 10 sec
Reputation Power: 2389
Quote:
Originally Posted by kaid
I use classic ASP and don't have ASP.NET
can I use this code ?
if the server you work with does not have .NET framework you
can't use my code, sorry.

Reply With Quote
  #10  
Old October 17th, 2006, 03:19 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,838 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 14 h 30 m 10 sec
Reputation Power: 2389
Quote:
Originally Posted by petrusj
Try it yourself with any image other than JPG. It works perfectly with JPG, but I had no luck with GIF or PNG.
ok, I was in rush when posting this code I will revise it soon and
come with something better, that at least will show error or
message if something fails.

Reply With Quote
  #11  
Old October 17th, 2006, 03:50 PM
petrusj petrusj is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Posts: 3 petrusj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 m 47 sec
Reputation Power: 0
Quote:
Originally Posted by Shadow Wizard
ok, I was in rush when posting this code I will revise it soon and
come with something better, that at least will show error or
message if something fails.


Thanks!

Reply With Quote
  #12  
Old July 5th, 2007, 05:48 AM
fredde_pe fredde_pe is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 63 fredde_pe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 8 h 19 m 17 sec
Reputation Power: 6
This i just what i've been looking for! Is there any way of compressing the file size? When i resize an imge the file size is really big. When I resize an imgage which is 1024x768 (142kb) to 512x384 the file size is bigger then the original (397kb). ANy suggestions?

Reply With Quote
  #13  
Old July 5th, 2007, 06:44 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,838 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 14 h 30 m 10 sec
Reputation Power: 2389
Quote:
Originally Posted by fredde_pe
This i just what i've been looking for! Is there any way of compressing the file size? When i resize an imge the file size is really big. When I resize an imgage which is 1024x768 (142kb) to 512x384 the file size is bigger then the original (397kb). ANy suggestions?
well, it's using the .NET framework functions I don't have much control
over the technical part of the process. I will try and search for alternatives
though, will update this thread if and when I'm successful.

Reply With Quote
  #14  
Old July 19th, 2007, 04:19 AM
shem's Avatar
shem shem is offline
Shemzilla
ASP Free Loyal (3000 - 3499 posts)
 
Join Date: Aug 2005
Location: Table View, Cape Town, S.A
Posts: 3,396 shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)shem User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 17744 Folding Title: Novice Folder
Time spent in forums: 2 Weeks 5 Days 11 h 43 m 58 sec
Reputation Power: 552
does this script really make the thumbnail file size bigger?

Shem
__________________
Everyone has a photographic memory. Some don't have film.
I am a nobody, nobody is perfect, therefore I am perfect.


Reply With Quote
  #15  
Old July 19th, 2007, 04:27 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 48th Plane (28500 - 28999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 28,838 Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 21st Grade (Above 100000 Reputation Level)  Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2Folding Points: 549372 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 3 Months 2 Weeks 1 Day 14 h 30 m 10 sec
Reputation Power: 2389
Quote:
Originally Posted by shem
does this script really make the thumbnail file size bigger?

Shem
I think it depends how the image was originally created and compressed.
you'll have to test with some images and see for yourself.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > Image Resize Part II - resize image on the fly


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek