最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp aspjpeg将多个图片合成gif动画
时间:2022-07-02 23:04:02 编辑:袖梨 来源:一聚教程网
<%
' 并给此gif动画加水印
'参数:
' str:图片相对地址,多个图片中间使用英文逗号隔开
Function creategif(str)
'多图动画输出
Dim Jpeg,Gif
Set Jpeg = Server.CreateObject("Persits.Jpeg")
Set Gif = Jpeg.Gif
FileNames=Split(str,",")
Gif.
Gif.
For i = 0 To UBound(FileNames)
Jpeg.Open Server.MapPath(FileNames(i))
Jpeg.PreserveAspectRatio = True
if Jpeg.OriginalWidth > 100 or Jpeg.OriginalHeight > 100 Then
if Jpeg.OriginalWidth > Jpeg.OriginalHeight Then
Jpeg.
Else
Jpeg.
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, www.111com.net
Next
Gif.SendBinary '在浏览器中输出此图片
'Gif.Save Server.MapPath("1.gif") '保存为1.gif图片
Set Gif=Nothing
Set Jpeg=Nothing
End Function
Call creategif("images/1.jpg,images/2.jpg,images/3.jpg,images/4.jpg")
%>