How To Resize Image Using Persits Jpeg
Posted by blogmeister on
August 2, 2009
Asp Jpeg is a server component that will help your ASP or ASP.NET applications with all their image management needs. With Asp Jpeg, you can create high-quality thumbnails, logo-stamp photographs, extract metadata information from images, crop, enhance, rotate, convert, and much more. Of course, resizing images in webpages will not give you problems calculating the height based on the width since you can just input the width and the height will automatically be calculated.
However, if you wish to have high quality resized images, Asp Jpeg is a good component for that purpose. It is not free though, so you will have to purchase it. If you have one, read on. Using the component is pretty simple. Check out the code below in VBScript.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
Response.Expires = 0 ' create instance of Asp Jpeg Set Jpeg = Server.CreateObject("Persits.Jpeg") Jpeg.RegKey = "YOUR_REGISTRATION_KEY" ' Open source file Path = Server.MapPath(request("path")) Jpeg.Open(path) ' Set new height and width Jpeg.Width = Request("Width") Jpeg.Height = Jpeg.OriginalHeight * Jpeg.Width / Jpeg.OriginalWidth ' Perform resizing and send resultant image to client browser Jpeg.SendBinary |
Share the post "How To Resize Image Using Persits Jpeg"










