Main pageInformation how to purchase softwareCode examples showing how you can use this software
Detailed description of methods and properties with code samplesYou can download ShotGraph.GifAnimator and start to use it now

Examples

This page contains a collection of small code samples showing how you can use ShotGraph.GifAnimator component. You can use these samples as a basis for building your own applications.

Small animation on static background

This code places small gif animation on static gif background. For example, you can place your company logo on a chart etc.
Source image 1 Source image 2: View result

Set ani = CreateObject("ShotGraph.GifAnimator")
ani.Read "c:\images\scheme.gif"
ani.Read "078.gif",-1,5,5
ani.Join
ani.Play "c:\images\stillbg.gif"

Superposition of animated gifs

The code shows how you can superpose two (or more) gif animations. As a rule, second, third etc. source gifs have transparent background
Source image 1: Source image 2: Result:

Set ani = CreateObject("ShotGraph.GifAnimator")
ani.Read "C:\examples\super1.gif"
ani.Read "C:\examples\super2.gif",-1,5,5
ani.Join
ani.Play "C:\examples\super.gif"

Placing static text over animation

This code shows how you can place static text over existing gif animation using the WriteText method.
Source image: Result:

Set ani = CreateObject("shotgraph.gifanimator")

filename = "C:\images\stilltext1.gif"
ani.GetFileDimensions filename,width,height

ani.Read filename
ani.WriteText 0,0,ani.FramesCount(0),5,5,"MOVE","Arial",16,"00FFCC",1 or 2

ani.Join
ani.Play "C:\images\stilltext.gif"

Resizing animated gif

This code shows how you can make an animated thumbnail of animated gif. Gif image is reduces twice.
Source image: Result:

Set ani = CreateObject("ShotGraph.GifAnimator")
filename = "c:\images\resize1.gif"
ani.GetFileDimensions filename,width,height
ani.SetBackgroundColor "ffffff"
ani.Read filename
ani.Join
ani.Resize width/2,height/2
ani.Play "c:\images\resize.gif"



 ©2007 Mikhail Tchikalov
 mtchikalov@usa.com