GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / TiffAppendPageFromGdPictureImage Method / TiffAppendPageFromGdPictureImage(Int32,Int32,Boolean) 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.
Specifies if the added page must be subsequently selected.
Example





In This Topic
TiffAppendPageFromGdPictureImage(Int32,Int32,Boolean) 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.

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, _
   ByVal Select As Boolean _
) As GdPictureStatus
public GdPictureStatus TiffAppendPageFromGdPictureImage( 
   int ImageID,
   int ImageToAddID,
   bool Select
)
public function TiffAppendPageFromGdPictureImage( 
    ImageID: Integer;
    ImageToAddID: Integer;
    Select: Boolean
): GdPictureStatus; 
public function TiffAppendPageFromGdPictureImage( 
   ImageID : int,
   ImageToAddID : int,
   Select : boolean
) : GdPictureStatus;
public: GdPictureStatus TiffAppendPageFromGdPictureImage( 
   int ImageID,
   int ImageToAddID,
   bool Select
) 
public:
GdPictureStatus TiffAppendPageFromGdPictureImage( 
   int ImageID,
   int ImageToAddID,
   bool Select
) 

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.
Select
Specifies if the added page must be subsequently selected.

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.

This method requires the Image Documents component to run.

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