Solved

aspjepg component

Posted on 2006-11-03
4
271 Views
Last Modified: 2011-10-03
Hello,
I just downloaded a trial version of aspjpeg component, but i don't know how to use it.
I was wondering if someone could show me how to use this component in a regular asp page requesting the width and the height from the url?

Thank you.
0
Comment
Question by:itortu
  • 2
  • 2
4 Comments
 
LVL 28

Expert Comment

by:strickdd
ID: 17867701
<%
' Create instance of AspJpeg
Set Jpeg = Server.CreateObject("Persits.Jpeg")

' Compute path to source image
Path = Server.MapPath("../images/apple.jpg")

' Open source image
Jpeg.Open Path

' Decrease image size by 50%
Jpeg.Width = Jpeg.OriginalWidth / 2
Jpeg.Height = Jpeg.OriginalHeight / 2

' create thumbnail and save it to disk
Jpeg.Save Server.MapPath("apple_small.jpg")

%>

http://www.aspjpeg.com/manual_01.html
0
 

Author Comment

by:itortu
ID: 17867721
where are the width and the height beeing requested from the url?

thank you.
0
 

Author Comment

by:itortu
ID: 17867898
how can i view the image using the script in the example? would you be able to show me?
0
 
LVL 28

Accepted Solution

by:
strickdd earned 150 total points
ID: 17868001
<%
' Create instance of AspJpeg
Set Jpeg = Server.CreateObject("Persits.Jpeg")

' Compute path to source image
Path = Server.MapPath("../images/apple.jpg")

' Open source image
Jpeg.Open Path

' Decrease image size by 50%
Jpeg.Width = Request.QueryString("Width")
Jpeg.Height = Request.QueryString("Height")

' create thumbnail and save it to disk
Jpeg.Save Server.MapPath(FileName & ".jpg") 'input what you want the file to be called

Response.Write("<img src='" & Server.MapPath(FileName & ".jpg")  & "'>")

%>
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Auto Submit on dropdown box 3 79
Issues with Insert statement 12 29
Html value of radio 14 28
MS SQL and inserting dates into tables using stored procedures 6 15
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question