Solved

aspjepg component

Posted on 2006-11-03
4
244 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
C# page opens in new window 3 45
Creating TABS in ASP Classic NOT using DIV 22 58
Update field in order 21 108
SP to delete duplicates 15 55
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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/…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

760 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now