Installation (Asp)

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

nico

Installation (Asp)

Post by nico »

:|
I'm a damned dummy!!!
I would like to use the sdk to resize images on the server, showing them with .asp pages in a browser
I'm triyng to get the examples run, on XP pro with IIS, but i'm not able to.

So, here are the questions:
1) How do I install the gflax.dll
(i've copied it in system32 and runned regsvr32)
2) Is there a step by step tutorial to do something? (i can't get your examples work)

Thank you!
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Installation (Asp)

Post by helmut »

nico wrote:...I'm trying to get the examples run, on XP pro with IIS, but i'm not able to.

So, here are the questions:
1) How do I install the gflax.dll
(i've copied it in system32 and runned regsvr32)
2) Is there a step by step tutorial to do something? (i can't get your examples work)
First, I don't know ASP at all. But I know Visual Basic and other IDEs, so I give it a try:

Your first step (registering using regsvr32) is correct.

I assume that there is an IDE (Integrated development environment) for developing the ASP code. If so, it is very likely that you have to specify a "reference" to the GFL SDK. In the IDE of Visual Basic there is "Project->References" for this. There you choose the GFL SDK. If you don't do this, all the GFL calls & function will be unknown in the project (think this is what you currently experience).
lazerfisk
Posts: 17
Joined: Wed May 05, 2004 3:00 pm
Location: Karlstad, Sweden

Post by lazerfisk »

Not quite. I use Textpad for creating ASP-code :) So, there is no IDE and no references :/

Code: Select all

Dim Image
Set Image = Server.CreateObject("GflAx" & gflsdk_version & ".GflAx")

Image.LoadBitmap server.mappath(request("img"))

iwidth = image.width
iheight = image.height

aspect = 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
Hope this helps :)

Regards,
christopher