| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#16
|
|||
|
|||
|
Quote:
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. |
|
#17
|
||||
|
||||
|
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) |
|
#18
|
|||
|
|||
|
Thanks Shadow Wizard. I will now dip my pinky toe into the dark and foreign waters of photo upload.
) |
|
#19
|
|||
|
|||
|
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? Thanks... |
|
#20
|
||||
|
||||
|
yes you can pass additional values over the querystring, for example:
Code:
objXML.Open "GET", "http://localhost/ImageResizer.aspx?image=" & Server.MapPath(strImageName) & "&thumb=" & Server.MapPath(strThumbName) & "&x1=50&y1=100&x2=150&y2=200", True this will pass two points: (x1,y1) and (x2,y2) of area to be cropped. however, the cropping itself will need whole different code than what I have. |
|
#21
|
|||
|
|||
|
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. |
|
#22
|
||||
|
||||
|
I found this, which look pretty nice:
http://snippets.dzone.com/posts/show/1484 |
|
#23
|
|||
|
|||
|
Thank you for the URL Shadow. Will give it a try in the morning. Will post my results here if it works. Thanks again.
|
|
#24
|
||||
|
||||
|
if it works you can post here the whole modified code for the benefit of others.
![]() |
|
#25
|
|||
|
|||
|
very nice code
thanks |
|
#26
|
|||
|
|||
|
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: <img src="ImageResizer.aspx?image=test.jpg"> 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. . . . //string strThumbnailPath=ToStringDef . . . //if (strThumbnailPath.Length == 0) //{ // Response.Write("missing thumbnail path"); // Response.End(); //} . . . //wrapper.Save(strThumbnailPath); Response.Buffer = true; //New Response.ContentType = "image/jpeg"; //New wrapper.Bitmap.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg); //New bitmap.Dispose(); //Response.Write("OK"); . . . ASP call is like this: <img src="ImageResizer.aspx?image=C:\WebSites\ImageTesting\t est2.jpg&width=200&height=-1" /> |
|
#27
|
|||
|
|||
|
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.. |
|
#28
|
||||
|
||||
|
Quote:
thanks for sharing this - cool trick, cheers for finding it! ![]() @saturnx - no worry, that's fine. thanks for letting us know. ![]() |