Reference Guide
GdPicture14 Namespace / GdPictureImaging Class / TiffAppendPageFromGdPictureImage Method / TiffAppendPageFromGdPictureImage(Int32,Int32) Method
A unique image identifier of the GdPicture image representing the editable multipage TIFF image, in which the new page will be added.
A unique image identifier of the GdPicture image representing the image, which will be appended to the specified editable multipage TIFF image.
Example





In This Topic
    TiffAppendPageFromGdPictureImage(Int32,Int32) Method
    In This Topic
    Appends a new page from the specified GdPicture image to the end of an editable multipage TIFF image, that is represented by its unique image identifier.

    Please note that this method only handles editable multipage TIFF images; otherwise it will fail.

    Syntax
    'Declaration
     
    
    Public Overloads Function TiffAppendPageFromGdPictureImage( _
       ByVal ImageID As Integer, _
       ByVal ImageToAddID As Integer _
    ) As GdPictureStatus
    public GdPictureStatus TiffAppendPageFromGdPictureImage( 
       int ImageID,
       int ImageToAddID
    )
    public function TiffAppendPageFromGdPictureImage( 
        ImageID: Integer;
        ImageToAddID: Integer
    ): GdPictureStatus; 
    public function TiffAppendPageFromGdPictureImage( 
       ImageID : int,
       ImageToAddID : int
    ) : GdPictureStatus;
    public: GdPictureStatus TiffAppendPageFromGdPictureImage( 
       int ImageID,
       int ImageToAddID
    ) 
    public:
    GdPictureStatus TiffAppendPageFromGdPictureImage( 
       int ImageID,
       int ImageToAddID
    ) 

    Parameters

    ImageID
    A unique image identifier of the GdPicture image representing the editable multipage TIFF image, in which the new page will be added.
    ImageToAddID
    A unique image identifier of the GdPicture image representing the image, which will be appended to the specified editable multipage TIFF image.

    Return Value

    A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK. We strongly recommend always checking this status first.
    Remarks
    Be aware that this method only handles editable multipage TIFF images. You can use the TiffIsEditableMultiPage method to check if a required image is an editable multipage TIFF image.

    Likewise, for saving the provided modifications you need to use the TiffSaveMultiPageToFile(Int32,String,TiffCompression) method.

    Example
    Saving the pages of a dicom document to a multipage tiff.
    using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
    {
        int dcmImageID = gdpictureImaging.CreateGdPictureImageFromFile("image.dcm", false);
     
        // Create a tiff with the first page.
        int tiffImageID = gdpictureImaging.TiffCreateMultiPageFromGdPictureImage(dcmImageID);
     
        // Add the remaining pages as additional pages to the tif.
        int pageCount = gdpictureImaging.DicomGetPageCount(dcmImageID);
        for (int pageNo = 2; pageNo <= pageCount; pageNo++)
        {
            gdpictureImaging.DicomSelectPage(dcmImageID, pageNo);
            gdpictureImaging.TiffAppendPageFromGdPictureImage(tiffImageID, dcmImageID);
        }
     
        gdpictureImaging.TiffSaveMultiPageToFile(tiffImageID, "image.tif", TiffCompression.TiffCompressionAUTO);
        gdpictureImaging.TiffCloseMultiPageFile(tiffImageID);
     
        gdpictureImaging.ReleaseGdPictureImage(tiffImageID);
        gdpictureImaging.ReleaseGdPictureImage(dcmImageID);
    }
    See Also