AniGIFCom Examples

Stills

A1 A2 A3 A4
B1 B2 B3 B4

 

Animated

CreateAniGif(aFile, sPath & "Aan1.gif", 400,
 AG_Color, AG_OptimizeNo, AG_RaiseErrorNo)
CreateAniGif(bFile, sPath & "Ban1.gif", 400,
AG_Color, AG_OptimizeNo, AG_RaiseErrorNo)
CreateAniGif(aFile, sPath & "Aan2.gif", 100, AG_Grey) CreateAniGif(bFile, sPath & "Ban2.gif", 100, AG_Grey)
CreateAniGif(aFile, sPath & "Aan3.gif", 300,, AG_OptimizeYes) CreateAniGif(bFile, sPath & "Ban3.gif", 300,, AG_OptimizeYes)
CreateAniGif(aFile, sPath & "Aan4.gif", 1000,,, AG_SwapRGYes) CreateAniGif(bFile, sPath & "Ban4.gif", 1000,,, AG_SwapRGYes)

Const AG_Color = 0; Const AG_Grey = 1; Const AG_OptimizeNo = 0; Const AG_OptimizeYes = 1; Const AG_SwapRGNo = 0; Const AG_SwapRGYes = 1; Const AG_RaiseErrorNo = 0; Const AG_RaiseErrorYes = 1



Asp Code



' Syntax
' CreateAniGif	inFiles() As Variant			- Array of input files
'		outFile As Variant			- Outputfile (Animated GIF)
'		Optional lDelay As Integer = 350	- Delay in ms
'		Optional isGray As Integer = 0		- Use greypallet
'		Optional doOptimize As Integer = 0	- Optimize Animated GIF (Does not always work)
'		Optional SwapRG As Integer = 0		- Swap red and green in color images
							  (Can correct some strange color input images)
'		Optional RaiseError As Integer = 0	- Raise an Error (if disabled then error is in return)


Const AG_Color = 0
Const AG_Grey = 1

Const AG_OptimizeNo = 0
Const AG_OptimizeYes = 1

Const AG_SwapRGNo = 0
Const AG_SwapRGYes = 1

Const AG_RaiseErrorNo = 0
Const AG_RaiseErrorYes = 1

sPath=Server.mappath(".") & "\" 

Dim aFile(3)
aFile(0)= sPath & "A1.jpg"
aFile(1)= sPath & "A2.jpg"
aFile(2)= sPath & "A3.jpg"
aFile(3)= sPath & "A4.jpg"

Dim bFile(3)
bFile(0)= sPath & "B1.jpg"
bFile(1)= sPath & "B2.jpg"
bFile(2)= sPath & "B3.jpg"
bFile(3)= sPath & "B4.jpg"

Set aniGif = Server.CreateObject("aniGIFCom.anigif")
ret=aniGif.CreateAniGif(aFile, sPath & "Aan1.gif", 400, AG_Color, AG_OptimizeNo, AG_RaiseErrorNo)
ret=aniGif.CreateAniGif(aFile, sPath & "Aan2.gif", 100, AG_Grey)
ret=aniGif.CreateAniGif(aFile, sPath & "Aan3.gif", 300,, AG_OptimizeYes)
ret=aniGif.CreateAniGif(aFile, sPath & "Aan4.gif", 1000,,, AG_SwapRGYes)
ret=aniGif.CreateAniGif(bFile, sPath & "Ban1.gif", 400, AG_Color, AG_OptimizeNo, AG_RaiseErrorNo)
ret=aniGif.CreateAniGif(bFile, sPath & "Ban2.gif", 100, AG_Grey)
ret=aniGif.CreateAniGif(bFile, sPath & "Ban3.gif", 300,, AG_OptimizeYes)
ret=aniGif.CreateAniGif(bFile, sPath & "Ban4.gif", 1000,,, AG_SwapRGYes)
Set aniGif = Nothing