<%
' and add a watermark to this GIF animation
Parameters
' STR: The relative address of the picture, separated by commas in the middle of multiple pictures
Function creategif (str)
' Multi-graph animation output
Dim Jpeg,gif
Set Jpeg = Server.CreateObject ("Persits.jpeg")
Set Gif = jpeg.gif
Filenames=split (str, ",")
Gif.width = 100
Gif.height = 100
For i = 0 to UBound (FileNames)
Jpeg.open Server.MapPath (FileNames (i))
Jpeg.preserveaspectratio = True
If Jpeg.originalwidth > or Jpeg.originalheight > Then
If Jpeg.originalwidth > Jpeg.originalheight Then
Jpeg.width = 100
Else
Jpeg.height = 100
End If
End If
Gif.addimage Jpeg, (100-jpeg.width)/2, (100-jpeg.height)/2
Gif.disposalmethod =2
Gif.pencolor = 235
gif.fontfamily = "Tahoma"
Gif.fontsize = 13
Gif.printtext 20,10,. NET Tutorials ">www.111cn.net
Next
Gif.sendbinary ' Output This picture in the browser
' Gif.save Server.MapPath ("1.gif") ' Save as 1.gif picture
Set gif=nothing
Set jpeg=nothing
End Function
Call Creategif ("Images/1.jpg,images/2.jpg,images/3.jpg,images/4.jpg")
%>