Link to home
Start Free TrialLog in
Avatar of clearchannel
clearchannel

asked on

Upload and resize image using Persits ASPJpeg and ASPUpload

I urgently need a complete script to upload a file from a form and then resize that image into 2 seperate files. I need a large file 800 x 600 and then a thumbnail 100 x 75. All images should be are 4 x 3 constraint proportions.

To do this I have the following extensions available to me...

Persits ASPJpeg
Persits ASPUpload

Thanks for your help.
Avatar of Member_2_3718378
Member_2_3718378

Have you written any code yet?  If not, the examples in the manuals for each product should help you get started:

===================================================
http://www.aspupload.com/manual.html
http://www.aspjpeg.com/manual.html
===================================================

Of specific interest are the two example:

===================================================
'// Uploading an image to a server.
http://www.aspupload.com/manual_simple.html

'// Creating a thumbnail from an uploaded image.
http://www.aspjpeg.com/manual_02.html#2_1
===================================================


-= DeathToSpam =-
ASKER CERTIFIED SOLUTION
Avatar of CCongdon
CCongdon
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Obvioulsy, ditch the extra %> at the end.

Also, if you have multiple images per page, replace the section in the middle That says:

Set UploadFile = Upload.Files(1)

With:

For Each imageFile in Upload.Files
  Set UploadedFile = imageFile

and put a 'Next' after Jpeg.Close



Oh, and ditch the line that says FSO =, that was an extra piece of my script that I clipped out. I had my script set to make company name and user name directories in the upload area to put the new images into.
Avatar of clearchannel

ASKER

Thanks for your help guys. As soon as I test this solution I will award points. :)
hmmm just a clarification....
Jpeg.Height = Jpeg.OriginalHeight * L / Jpeg.OriginalWidth
Jpeg.Save FilleName

the "FilleName" in that shouldnt that be "Filename"? as no where else is it declaring what file name it should use
another error... took me a while to figure it out...

the line "Jpeg.Open UploadedFile.FileName" needs to be "Jpeg.Open FileName" as you're already adding the path above.. i think... anyways this seems to make it work.

im kinda changing the code so not sure if the default works or not.. just something i saw that didnt look right