GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / TiffCreateMultiPageFromGdPictureImage Method
The unique image identifier of the GdPicture image representing the source image.
Example





In This Topic
TiffCreateMultiPageFromGdPictureImage Method (GdPictureImaging)
In This Topic
Creates a new GdPicture image representing the editable multipage TIFF image based on a previously created GdPicture image. The newly created image is identified by its unique non-zero image identifier.

Please note that you can specify the read-only or read-write mode using the TiffOpenMultiPageForWrite method before loading the file.

Syntax
'Declaration
 
Public Function TiffCreateMultiPageFromGdPictureImage( _
   ByVal ImageID As Integer _
) As Integer
public int TiffCreateMultiPageFromGdPictureImage( 
   int ImageID
)
public function TiffCreateMultiPageFromGdPictureImage( 
    ImageID: Integer
): Integer; 
public function TiffCreateMultiPageFromGdPictureImage( 
   ImageID : int
) : int;
public: int TiffCreateMultiPageFromGdPictureImage( 
   int ImageID
) 
public:
int TiffCreateMultiPageFromGdPictureImage( 
   int ImageID
) 

Parameters

ImageID
The unique image identifier of the GdPicture image representing the source image.

Return Value

A unique image identifier of the GdPicture image representing the newly created editable multipage TIFF image. The returned value is non-zero if the image is successfully created. Please first of all use the GetStat method to determine if this method has been successful.

Be aware that you need to release the image with the ReleaseGdPictureImage method after being used.

Remarks

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