ASP AspJpeg to synthesize multiple images into GIF animation

Source: Internet
Author: User

<%
' 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")
%>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.