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:
  #31  
Old January 29th, 2009, 09:29 AM
ranegade ranegade is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2009
Posts: 2 ranegade User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 14 m 42 sec
Reputation Power: 0
on my server it is working perfectly. the problem occured on my local machine

Reply With Quote
  #32  
Old February 1st, 2009, 02:18 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 ranegade
on my server it is working perfectly. the problem occured on my local machine
sorry, can't see why this happens. try with different XMLHTTP component maybe?

Reply With Quote
  #33  
Old June 10th, 2009, 11:28 PM
carrzkiss carrzkiss is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: NC, but moving out west in the near future
Posts: 2 carrzkiss User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m
Reputation Power: 0
I would like to start off with by saying
GREAT CODE!!!

OK.
I have implemented you code into my Upload project
But it only creates one image.

Example
The code for uploads, if the filename exist, then it add's a
-# (# being 1 - 1000000 ) to the end of the image.

I have added this to your script.

Code:
Dim strImageName, strThumbName, objXML
strImageName = left(DestFileName, 255)
strThumbName = "th_"&left(DestFileName, 255)
Set objXML = Server.CreateObject("Microsoft.XMLHTTP")
objXML.Open "GET", "http://192.168.2.9/site/Projects/Images/ImageResizer.aspx?image=" & Server.MapPath(strImageName) & "&thumb=" & Server.MapPath(strThumbName) & "&width=144&height=218", True
objXML.Send
Set objXML=Nothing


But it will only save the image as: th_image.jpg

So, if I upload 5 images with the same name, it will not create the Thumbnail past the first image name
So if I do
image-1.jpg (The upload script names it with a -1 as a duplicate)
Your script will not create another image

The Database Insertion works great, for every Thumbnail that is created, The Actual Thumbnail is never created.

Also. how can I put the generated thumbnail into a specific folder? Without know the full drive path?

Could you please assist me on this issue?
Thank you.
Carrzkiss

[QUOTE=Shadow Wizard]Attached is aspx file that can resize given image on the fly to the
desired width and/or height.QUOTE]

Reply With Quote
  #34  
Old June 17th, 2009, 02:17 PM
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
if the thumbnail is being saved with the same name, it means "DestFileName" has
the same value.. I'll need to see more code to be able to help with this.

regarding saving in specific folder, it's more simple than what you think:
Code:
objXML.Open "GET", "http://192.168.2.9/site/Projects/Images/ImageResizer.aspx?image=" & Server.MapPath(strImageName) & "&thumb=" & Server.MapPath("/thumbs/" & strThumbName) & "&width=144&height=218", True

see the bold part for what you need to change.

Reply With Quote
  #35  
Old July 16th, 2009, 10:48 AM
fmguru fmguru is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 2 fmguru User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 19 sec
Reputation Power: 0
Hi!
this code is just what i need and it works beautifully on my localhost but on server its giving me the following error. Can you please suggest what i should do?
thanking you in advance.


Error saving file: A generic error occurred in GDI+.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Error saving file: A generic error occurred in GDI+.

Source Error:

Line 237: catch (Exception exp)
Line 238: {
Line 239: throw new Exception("Error saving file: "+exp.Message);
Line 240: }
Line 241: }


Source File: d:\inetpub\vhosts\india\httpdocs\aspnetuploader\Im ageResizer.aspx Line: 239

Stack Trace:

[Exception: Error saving file: A generic error occurred in GDI+.]
ASP.BitmapWrapper.Save(String filename, ImageFormat fileFormat) in d:\inetpub\vhosts\india\httpdocs\aspnetuploader\Im ageResizer.aspx:239
ASP.BitmapWrapper.Save(String filename) in d:\inetpub\vhosts\india\httpdocs\aspnetuploader\Im ageResizer.aspx:228
ASP.aspnetuploader_imageresizer_aspx.Page_Load(Obj ect sender, EventArgs e) in d:\inetpub\vhosts\india\httpdocs\aspnetuploader\Im ageResizer.aspx:64
System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627




Quote:
Originally Posted by Shadow Wizard
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 />")
%>



good luck and happy programming!

Reply With Quote
  #36  
Old July 19th, 2009, 02:58 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
this is permissions problem.
http://weblogs.asp.net/anasghanem/a...-exception.aspx
grant ASPNET account full permissions over the folder you're trying
to create the thumbnail in and it should work fine.

Reply With Quote
  #37  
Old July 22nd, 2009, 08:15 AM
fmguru fmguru is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 2 fmguru User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 19 sec
Reputation Power: 0
Thankyou I got the code working

Reply With Quote
  #38  
Old July 28th, 2009, 12:09 PM
winterpolaris winterpolaris is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 12 winterpolaris User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 0
Hi!

I am having some problem here. Please advised me.

I had no problem with the codes on my own local machines. So prior the uploading to the server, i will have to change e URL. But however after that i had a problem. My image is uploaded but the image resizer never seemed to be executed. Please help!

Basically while the files are resized it will be renamed as well. I need to execute Image Resizer twice to get 2 different sizes of the same image.

Code:

IF objUpload("file1") <> "" THEN  

Call objUpload.File(0).SaveToDisk(Server.MapPath("productimages"), varFileName1)  

strImageName = "\productimages\" & varFileName1 & ""
strThumbName = "\productimages\stb_" & varFileName1 & "" 
strDisplayName = "\productimages\sd_" & varFileName1 & "" 

Set objXML = Server.CreateObject("Microsoft.XMLHTTP")  
objXML.Open "GET", "http://www.abcefg.com/ImageResizer.aspx?image=" & Server.MapPath(strImageName) & "&thumb=" & Server.MapPath(strDisplayName) & "&width=328&height=-1", True 

objXML.Send 
Set objXML=Nothing  

Set objXML = Server.CreateObject("Microsoft.XMLHTTP") 
objXML.Open "GET", "http://www.abcefg.com/ImageResizer.aspx?image=" & Server.MapPath(strImageName) & "&thumb=" & Server.MapPath(strThumbName) & "&width=100&height=-1", True 

objXML.Send 
Set objXML=Nothing 

END IF

Reply With Quote
  #39  
Old July 28th, 2009, 12:22 PM
winterpolaris winterpolaris is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 12 winterpolaris User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 0
Secondly i faced another problem too:

I can execute these codes in IE7. However in Firefox, they said the image i upload is not an image.

Can anyone please help? Thanks!!

Reply With Quote
  #40  
Old July 29th, 2009, 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 winterpolaris
Secondly i faced another problem too:

I can execute these codes in IE7. However in Firefox, they said the image i upload is not an image.

Can anyone please help? Thanks!!
glad it's working on IE7.
what do you mean "they said the image i upload is not an image"?
who said? sounds like it's not related to the image resize code..

Reply With Quote
  #41  
Old October 9th, 2009, 03:11 PM
indiacam indiacam is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 4 indiacam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 4 m 16 sec
Reputation Power: 0
Thumbs down Major Problem With Code

shadwowizard, he is actually right! Its not JPG image file. Some image viewer cannot detect it as JPG if opened as JPG.
--------------------------------------------------------

I have found a major problem with this code. After resizing the image its mostly bigger than original. This increased my doubts about the image format itself. So I just tried to open new JPG image with IRFANVIEW Image Viewer, I was surprised to see that the JPG image was actually a PNG file. IRFANVIEW asked me to rename it to PNG as it detected it as PNG file. Then it opened it properly as PNG.

Now the secret is revealed why the size was bigger. PNG is not a compressed format like intelligent compressed format like JPG.

Now I came to know that the ASPX code is actually making PNG file and not the JPG though the extension we are asking it to make JPG.

I am not into .NET, hence requresting the developer to make changes so it will not save JPG of 140kb into PNG of 400kb even after resizing to smaller size.

I AM SURE THAT THE DRAWING NAMESPACE CAN HANDLE IT WELL TO MAKE A TRUE JPG IMAGE FILE, A COMMON PRACTICE IN INTERNET AUTHORING.

Mahendra
India

Reply With Quote
  #42  
Old October 11th, 2009, 04:03 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 indiacam
shadwowizard, he is actually right! Its not JPG image file. Some image viewer cannot detect it as JPG if opened as JPG.
--------------------------------------------------------

I have found a major problem with this code. After resizing the image its mostly bigger than original. This increased my doubts about the image format itself. So I just tried to open new JPG image with IRFANVIEW Image Viewer, I was surprised to see that the JPG image was actually a PNG file. IRFANVIEW asked me to rename it to PNG as it detected it as PNG file. Then it opened it properly as PNG.

Now the secret is revealed why the size was bigger. PNG is not a compressed format like intelligent compressed format like JPG.

Now I came to know that the ASPX code is actually making PNG file and not the JPG though the extension we are asking it to make JPG.

I am not into .NET, hence requresting the developer to make changes so it will not save JPG of 140kb into PNG of 400kb even after resizing to smaller size.

I AM SURE THAT THE DRAWING NAMESPACE CAN HANDLE IT WELL TO MAKE A TRUE JPG IMAGE FILE, A COMMON PRACTICE IN INTERNET AUTHORING.

Mahendra
India
thanks for the heads up, I'll take a look and try to see what's going on.

Reply With Quote
  #43  
Old October 11th, 2009, 05:52 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
Proved to be one-line fix, I've uploaded the fix to my original post.
Problem was that I have used the "Raw Format" of the image object
itself, which is probably PNG for some reason.
Now I'm "forcing" JPEG image format and it appears to work fine.
Thanks again!

Reply With Quote
  #44  
Old October 12th, 2009, 04:56 AM
indiacam indiacam is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 4 indiacam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 4 m 16 sec
Reputation Power: 0
Quote:
Originally Posted by Shadow Wizard
Proved to be one-line fix, I've uploaded the fix to my original post.
Problem was that I have used the "Raw Format" of the image object
itself, which is probably PNG for some reason.
Now I'm "forcing" JPEG image format and it appears to work fine.
Thanks again!


Dear Shadow Wizard! Simply WOW and THANKS.

One more Suggestion and Request! The quality and size of JPEG image required by us, can be controlled while saving by level of quality adjustment e.g. 50% to 100%. Is there any parameter you can set in aspx file so that we can pass a value to control the quality and size of file even more accurate. Example for thumbnails the quality of 50% is enough which makes size 2 to 3 kbs only. For bigger size quality is around 65 to 75. Image still more clear but file size is optimum. Just give it a try. Lets make this code unbeatable.

------------------

Your reply was really so fast! I still wondor, how come no one noticed this problem in such a long duration of this code submission on 3rd October 2006?

I feel great because I could give my bit to help you make this code outstanding. I will sure test it and post a feedback. Thanks a lot again.

Mahendra
Bhaarat (aka India)

Reply With Quote
  #45  
Old October 12th, 2009, 09:07 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 indiacam
Dear Shadow Wizard! Simply WOW and THANKS.

One more Suggestion and Request! The quality and size of JPEG image required by us, can be controlled while saving by level of quality adjustment e.g. 50% to 100%. Is there any parameter you can set in aspx file so that we can pass a value to control the quality and size of file even more accurate. Example for thumbnails the quality of 50% is enough which makes size 2 to 3 kbs only. For bigger size quality is around 65 to 75. Image still more clear but file size is optimum. Just give it a try. Lets make this code unbeatable.

Your Wish Is My Command, see the original post I have uploaded
new code that support different compression level for the thumbnail.
To set desired compression, add "&compression=X" to the URL
where X is the desired number.
Let me know if you have problem with this.

Quote:
Originally Posted by indiacam
Your reply was really so fast! I still wondor, how come no one noticed this problem in such a long duration of this code submission on 3rd October 2006?

Good question.. probably this code is not really in wide use or
people just didn't care/notice.

Quote:
Originally Posted by indiacam
I feel great because I could give my bit to help you make this code outstanding. I will sure test it and post a feedback. Thanks a lot again.

No problem Mahendra, hope you'll put my code into good use!

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 1 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek