Eksempel fra manualen:
<%@ LANGUAGE="VBSCRIPT" %>
<%
' ///////////////////////////////////////////////////////////////////
' // Generating Dynamic Images with image on the Internet
' // with w3Image 2.0
' //
' // Out: An Image to Response Object
' //
' //////////////////////////////////////////////////////////////////
Set oImage = Server.CreateObject("W3Image.Image
'// Remember to change the URL bellow to your own URL
oImage.CreateEmptySurface 1,1
oImage.LoadImageFromUrl "
http://www.my-server.net/myimage.jpg" oImage.BkMode = 1 Set objFont = oImage.CreateFont ("Tahoma",45,0,"bold",0,&H00FF0000&,false,false,true)
oImage.SetFont objFont
strText = "/Preview image/"
'// Get the center of the picture
intTop = ((oImage.Height - oImage.GetTextHeight(strText))/2)
intLeft = ((oImage.Width - oImage.GetTextWidth(strText))/2)
'// Check if the Top or Left pixels are less than 0
If intTop < 0 Then intTop = 0
If intLeft < 0 Then intLeft = 0
oImage.SetFont objFont
oImage.DrawText strText, intLeft, intTop
' // Stream image to response as JPEG-image.
Response.Clear
Response.ContentType = "image/jpeg"
oImage.StreamImage Response, "JPG", 24
%>
Altså skal du angive den fulde URL til billedet.
/Goose