Create a PNG image

Another day and another neat component , this time we will create a PNG image on the fly using the T1Cfreeimage component . You can get this component here

Here is the code for this example

<%
Dim image
Set image = Server.CreateObject("T1CFreeImage.Images.1")
image.CreateImage 200,100
image.SetColor 255,0,0
image.DrawLine 10,10,50,50
image.DrawLine 100,80,10,10
For i = 1 to 50 step 10
image.DrawText 20,i ,"Beginners ASP"
next
image.SaveToFile "D:\iains websites\freebies\asp\ih2.png"
Set image = nothing
%>
<img src="ih2.png">

 

Sponsors