GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / GifCreateMultiFrameFromGdPictureImage Method
GdPicture image identifier. The image from which the new multiframe gif image will be created.
Example





In This Topic
GifCreateMultiFrameFromGdPictureImage Method (GdPictureImaging)
In This Topic
Creates a new editable multiframe gif image based from a GdPicture image.
Syntax
'Declaration
 
Public Function GifCreateMultiFrameFromGdPictureImage( _
   ByVal ImageID As Integer _
) As Integer
public int GifCreateMultiFrameFromGdPictureImage( 
   int ImageID
)
public function GifCreateMultiFrameFromGdPictureImage( 
    ImageID: Integer
): Integer; 
public function GifCreateMultiFrameFromGdPictureImage( 
   ImageID : int
) : int;
public: int GifCreateMultiFrameFromGdPictureImage( 
   int ImageID
) 
public:
int GifCreateMultiFrameFromGdPictureImage( 
   int ImageID
) 

Parameters

ImageID
GdPicture image identifier. The image from which the new multiframe gif image will be created.

Return Value

0: The image could not created. Use the GetStat() method to determine the reason this method failed. Non-zero: GdPicture image identifier. The created editable multiframe gif image.
Remarks
Supported formats are listed here: http://www.gdpicture.com/solutions/supported-formats/.

This method requires the Image Documents component to run.

Example
Saving the pages of a dicom document to an animated gif.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int dcmImageID = gdpictureImaging.CreateGdPictureImageFromFile("image.dcm", false);
 
    // Create a gif with the first page.
    int gifImageID = gdpictureImaging.GifCreateMultiFrameFromGdPictureImage(dcmImageID);
 
    // Add the remaining pages as additional frames to the gif.
    int pageCount = gdpictureImaging.DicomGetPageCount(dcmImageID);
    for (int pageNo = 2; pageNo <= pageCount; pageNo++)
    {
        gdpictureImaging.DicomSelectPage(dcmImageID, pageNo);
        gdpictureImaging.GifAppendFrameFromGdPictureImage(gifImageID, dcmImageID);
    }
 
    gdpictureImaging.GifSaveMultiFrameToFile(gifImageID, "image.gif");
 
    gdpictureImaging.ReleaseGdPictureImage(gifImageID);
    gdpictureImaging.ReleaseGdPictureImage(dcmImageID);
}
See Also