GdPicture image identifier. The editable multiframe gif image in which the frame will be added.
GdPicture image identifier. The image to append within the editable multiframe gif image.
Example





In This Topic
GdPicture14 Namespace / GdPictureImaging Class / GifAppendFrameFromGdPictureImage Method

GifAppendFrameFromGdPictureImage Method (GdPictureImaging)

In This Topic
Appends a new frame from a GdPicture image to the end of an editable multiframe gif image.
Syntax
'Declaration
 
Public Function GifAppendFrameFromGdPictureImage( _
   ByVal ImageID As Integer, _
   ByVal ImageToAddID As Integer _
) As GdPictureStatus
public GdPictureStatus GifAppendFrameFromGdPictureImage( 
   int ImageID,
   int ImageToAddID
)
public function GifAppendFrameFromGdPictureImage( 
    ImageID: Integer;
    ImageToAddID: Integer
): GdPictureStatus; 
public function GifAppendFrameFromGdPictureImage( 
   ImageID : int,
   ImageToAddID : int
) : GdPictureStatus;
public: GdPictureStatus GifAppendFrameFromGdPictureImage( 
   int ImageID,
   int ImageToAddID
) 
public:
GdPictureStatus GifAppendFrameFromGdPictureImage( 
   int ImageID,
   int ImageToAddID
) 

Parameters

ImageID
GdPicture image identifier. The editable multiframe gif image in which the frame will be added.
ImageToAddID
GdPicture image identifier. The image to append within the editable multiframe gif 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.

To save modifications brought to the multiframe gif image you need to use the GifSaveMultiFrameToFile() method.

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