GflAx - ASP Installation ????

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

Moderators: XnTriq, xnview

Chachi
Posts: 3
Joined: Fri Nov 19, 2004 12:31 pm
Location: UK - Cambs

GflAx - ASP Installation ????

Post by Chachi »

OK I'm not the brightest but my ASP is coming on strong. After finding xnView it sounds like the answer to my problems.

I have a site that I'm building using ASP, I have many different formats of images that need to be displayed, rather than use individual 'viewers' I'd like to use the GFL SDK to impliment ASP integration ..... but I can't get it the examples to work.

I get 500 Internal Server Error - The page cannot be displayed.

I've copied the GflAx.dll to system32 and run regsvr32 to register it.

I'm using example1.asp as provided in build 2.20 (as below)

Server in 2003 running IIS 6.0

What am I doing wrong?

<%
' Load a picture, and display informations.

Dim Path, File

Set ctrl = server.createobject("GflAx.GflAx")
Path = Server.MapPath("/GflAx")
File = Path & "\image.jpg"
const AX_JPEG = 3

With ctrl
.LoadBitmap File
%>
<table border="1">
<tr><td width="150"><b>Width</b></td> <td width="100"><% =response.write(.Width) %> px</td>
<td rowspan="8" valign="top"><img src="image.asp?<% =file %>"></td>
</tr>
<tr><td><b>Height</b></td> <td><% =response.write(.height) %> px</td></tr>
<tr><td><b>ColorModel</b></td> <td><% =response.write(.ColorModel) %></td></tr>
<tr><td><b>BitmapType</b></td> <td><% =response.write(BitmapTypeLabel(.BitmapType)) %></td></tr>
<tr><td><b>Xdpi</b></td> <td><% =response.write(.Xdpi) %> dpi</td></tr>
<tr><td><b>Ydpi</b></td> <td><% =response.write(.Ydpi) %> dpi</td></tr>
<tr><td><b>NumberOfImage</b></td> <td><% =response.write(.NumberOfImages) %> image(s)</td></tr>
<tr><td><b>OriginalSize</b></td> <td><% =response.write(.OriginalSize) %> ko</td></tr>
</table>
<%
end with

set ctrl=nothing

Function BitmapTypeLabel(BitmapType)
select case BitmapType
case 1: BitmapTypeLabel="Binary"
case 2: BitmapTypeLabel="Grey"
case 3: BitmapTypeLabel="Colors"
case 4: BitmapTypeLabel="True Colors"
end select
End function

%>
User avatar
xnview
Author of XnView
Posts: 36798
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: GflAx - ASP Installation ????

Post by xnview »

Chachi wrote:But I can't get it the examples to work.
I get 500 Internal Server Error - The page cannot be displayed.
I have no problem with this script.
Perhaps the path /GflAx is not correct for you?
Pierre.
Chachi
Posts: 3
Joined: Fri Nov 19, 2004 12:31 pm
Location: UK - Cambs

Post by Chachi »

You were right about the image path, but now I have a seperate issue.

I dont appear to have the image.asp form to actually display the image?

http://pro-2003/image.asp?c:\inetpub\ww ... \image.jpg

Where can I get hold of the file?

Many thanks
Rich
Chachi
Posts: 3
Joined: Fri Nov 19, 2004 12:31 pm
Location: UK - Cambs

Post by Chachi »

Ignore me ... got it. example working fine now.


Many thanks.

Rich