Export

The Export method allows to send image in any frame to external ShotGraph component.

Export Track,Frame,oShotGraph

Parameters

Track
Specifies the zero-based track number to get image from. The negative value means target track.
Frame
Specifies the zero-based frame number.
oShotGraph
Variable containing ShotGraph object.


Note
Using this method you can copy image from any frame to ShotGraph imagespace. Then you can alter this message using all available methods of ShotGraph component. After modifying you can get image back from ShotGraph imagespace using the Import method.
ShotGraph is a COM component for creating new and modifying existing still images on the fly. You should have fully functional ShotGraph component to use this feature.
Example 1
The code sample fills animation track from file, compiles animation and place static text over every frame and writes animation to new file.

Set g = CreateObject("shotgraph.image")
Set ani = CreateObject("shotgraph.gifanimator")

filename = "c:\images\d.gif"

ani.GetFileDimensions filename,width,height
g.CreateImage width,height,256
g.SetColor 0,0,0,201
g.SetTextColor 0
g.SetBkMode "TRANSPARENT"
g.SetTextAlign "TA_CENTER","TA_BASELINE"
g.CreateFont "Arial",0,18,0,True,True,False,False

ani.Read filename
ani.Join

for i=0 to ani.FramesCount-1
ani.Export -1,i,g
g.TextOut width/2,height/2,"Text"
ani.Import -1,i,g
Next

ani.Play "c:\images\new_file.gif"
Example 2
The code sample fills animation track from file, compiles animation, flips it vertically and writes animated gif.

Set g = CreateObject("shotgraph.image")
Set ani = CreateObject("shotgraph.gifanimator")

filename = "c:\images\d.gif"

ani.GetFileDimensions filename,width,height
g.CreateImage width,height,256

ani.Read filename
ani.Join

for i=0 to ani.FramesCount-1
ani.Export -1,i,g
g.Flip False
ani.Import -1,i,g
Next

ani.Play "c:\images\zzz.gif"