GdPicture.NET Reference Guide
GifSaveMultiFrameToFile Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : GifSaveMultiFrameToFile Method
GdPicture Image Identifier. The editable multiframe gif image to save as file.
The path to save the image.
Saves an editable multiframe gif image to a file.
Syntax
'Declaration
 
Public Function GifSaveMultiFrameToFile( _
   ByVal ImageID As Integer, _
   ByVal FilePath As String _
) As GdPictureStatus
public GdPictureStatus GifSaveMultiFrameToFile( 
   int ImageID,
   string FilePath
)
public function GifSaveMultiFrameToFile( 
    ImageID: Integer;
    FilePath: String
): GdPictureStatus; 
public function GifSaveMultiFrameToFile( 
   ImageID : int,
   FilePath : String
) : GdPictureStatus;
public: GdPictureStatus GifSaveMultiFrameToFile( 
   int ImageID,
   string* FilePath
) 
public:
GdPictureStatus GifSaveMultiFrameToFile( 
   int ImageID,
   String^ FilePath
) 

Parameters

ImageID
GdPicture Image Identifier. The editable multiframe gif image to save as file.
FilePath
The path to save the image.

Return Value

A member of the GdPictureStatus enumeration.
Remarks

This method can only be used with an editable multiframe gif image.

To check if an image is an editable multiframe gif image you can use the GifIsEditableMultiFrame() method.

This method must only be used to save an editable multiframe gif image.

Example
Apply negative effect on all frames of an animated gif image
Dim i As Integer
Dim GifImageID As Integer
Dim FrameCount As Integer
GifImageID = oGdPictureImaging.GifCreateMultiFrameFromFile("input.gif")
FrameCount = oGdPictureImaging.GifGetFrameCount(GifImageID)
For i = 1 To FrameCount
   oGdPictureImaging.GifSelectFrame(GifImageID, i)
   oGdPictureImaging.FxNegative(GifImageID)
Next i
oGdPictureImaging.GifSaveMultiFrameToFile(GifImageID,  "output.gif")
oGdPictureImaging.ReleaseGdPictureImage(GifImageID)
Creating an animated gif from separated image frames.
Dim oGdPictureImaging As New GdPictureImaging
Dim multiGif As Integer = oGdPictureImaging.GifCreateMultiFrameFromFile("frames\frame1.jpg")
oGdPictureImaging.GifAppendFrameFromFile(multiGif, "frames\frame2.jpg")
oGdPictureImaging.GifAppendFrameFromFile(multiGif, "frames\frame3.jpg")
oGdPictureImaging.GifAppendFrameFromFile(multiGif, "frames\frame4.jpg")
oGdPictureImaging.GifAppendFrameFromFile(multiGif, "frames\frame5.jpg")
oGdPictureImaging.GifSetLoopCount(multiGif, -1)
'Set frames time to 1 second.
For i As Integer = 1 To oGdPictureImaging.GifGetFrameCount(multiGif)
   oGdPictureImaging.GifSetFrameTime(multiGif, i, 100)
Next i
oGdPictureImaging.GifSaveMultiFrameToFile(multiGif, "frames\animated.gif")
oGdPictureImaging.ReleaseGdPictureImage(multiGif)
oGdPictureImaging.Dispose()
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
GifIsEditableMultiFrame Method