?
Solved

aspjepg component

Posted on 2006-11-03
4
Medium Priority
?
287 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 600 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

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 informatio…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

649 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