September 4th, 2007, 05:55 PM
Originally Posted by Shadow Wizard
I am a noob at this... so I just want to be sure that I am understanding how to accomplish this. I have your original code ShadowUploader.asp. However, I was wondering how the ImageResizer.aspx correlates to the ShadowUploader.asp. In other words, is the ImageResizer working in conjunction with the ShadowUploader? If so, I am assuming that I will need to use a file include on either my upload form or the actual ShadowUploader page?
Second, I am not clear on your above instructions of the ImageResizer. When you say to the pass the URL, am I to just type in the URL to the browser window? I am using IIS on my local computer for testing purposes. Thank you in advance... I have never created a photo upload before so I am kind of in the dark.
September 7th, 2007, 01:57 PM
right now, the Image Resize and Upload are not related in any way.
I can add some built in integration, just need some time for this.
you need to use XMLHTTP component in order to call and use the
Resizer from within classic ASP code, the first post in the thread
contains full source code needed for that. (last block of code)
September 11th, 2007, 09:17 AM
Thanks Shadow Wizard. I will now dip my pinky toe into the dark and foreign waters of photo upload. )
November 9th, 2007, 01:32 AM
Hi Shadow Wizard,
First of all thank you for sharing the script with all of us.
I am actually putting together a image cropper feature and there it will allow a user to scale the image as well as select an area to crop. Base on your script is it possible to pass the additional information like the x & y coords and the scaled factor to your script to process and create thumbnail accordingly? If yes, how do i go about doing so?
November 11th, 2007, 03:31 AM
yes you can pass additional values over the querystring, for example:
this will pass two points: (x1,y1) and (x2,y2) of area to be cropped.
objXML.Open "GET", "http://localhost/ImageResizer.aspx?image=" & Server.MapPath(strImageName) & "&thumb=" & Server.MapPath(strThumbName) & "&x1=50&y1=100&x2=150&y2=200", True
however, the cropping itself will need whole different code than what I have.
November 12th, 2007, 09:38 PM
Would it be hard to modify the script to include cropping and is it easy? Or maybe you could point me to the right direction where i can get more info on this and i try it out myself to see if it works. I'm up for the challenge
Thanks also for the prompt reply.
November 13th, 2007, 04:59 AM
November 13th, 2007, 05:44 AM
Thank you for the URL Shadow. Will give it a try in the morning. Will post my results here if it works. Thanks again.
November 13th, 2007, 05:58 AM
if it works you can post here the whole modified code for the benefit of others.
November 13th, 2007, 08:43 AM
April 4th, 2008, 05:41 PM
Realtime resize without saving image on the server?
ImageResizer.aspx is one cool script!
Now for the impossible feature: Would it be possible for ImageResizer.aspx to return the resized image?
To be used like this:
To show the small image realtime, without saving it on the server.
Found a way!!!! (Still needs a bit of work..)
Edited ImageResizer.aspx, commented lines listed below and added a few lines.
//if (strThumbnailPath.Length == 0)
// Response.Write("missing thumbnail path");
Response.Buffer = true; //New
Response.ContentType = "image/jpeg"; //New
wrapper.Bitmap.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg); //New
ASP call is like this:
<img src="ImageResizer.aspx?image=C:\WebSites\ImageTest ing\test2.jpg&width=200&height=-1" />
Comments on this post
April 6th, 2008, 03:18 AM
My apologies my fellow coders...
i realised that i never updated this thread. I never did get to fixing the code as we took a short cut to solve the image cropping and resize problem. As our server supported php running parallel with asp we found a third party code running in php that uses GD to manipulate the image. What we did was a popup loading the php file to manipulate the image, save it to our target location then got php to talk to asp (php talk to asp?? oh yes it is possiblle.) informing that it was done and to update our database. I know i have sidelined from asp but as a programmer we have to resourceful to get the problem solved. lolz..
April 7th, 2008, 07:15 AM
thanks for sharing this - cool trick, cheers for finding it!
Originally Posted by dsflores
@saturnx - no worry, that's fine. thanks for letting us know.
January 28th, 2009, 09:06 AM
hello i need help. i try to use your script and i'm keep geting an error:
this is with code with your debug code:
URL: http://localhost/test_page/ImageResizer.aspx?image=test.jpg&thumb=test_thumb. jpg&width=120&height=-1
msxml3.dll error '8000000a'
The data necessary to complete this operation is not yet available.
Originally Posted by Shadow Wizard
January 29th, 2009, 08:54 AM
sounds like problem with the XMLHTTP component on the server..
Originally Posted by ranegade
are you hosted?