Displaying a thumbnail does not work (ASP)
Posted: Wed Sep 07, 2005 6:50 pm
Hi to everybody, my name is billy and i want to ask u something... I'm an asp person and recently i installed this component to work with asp, but unfortunelly, i couldn't find in the help area an example with vbscript (for asp) and it's making me nervious... can somebody help me giving me an example how to do a simple thumbnail from an image?? thanks and let me know, i found this, but it shows an error where is SERVER MAPPATH, it says that i'm selecting an invalid type of image... thanks for your help, masters!
Code: Select all
<%
Dim Image
Set Image = Server.CreateObject("GflAx" & gflsdk_version & ".GflAx")
Image.LoadBitmap server.mappath("/images_gallery/encabezado2.gif")
iwidth = image.width
iheight = image.height
= iheight/iwidth
if (image.width > int(request("width"))) then
newwidth = request("width")
newheight = request("width") * aspect
Image.Resize newwidth, newheight
end if
Image.SaveFormat = 1 ' This is a JPEG
Image.SaveJPEGQuality = 95
Response.ContentType = "image/" & ctype
Response.Expires = 60
Response.BinaryWrite Image.SendBinary
Set Image = nothing
%>