GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / TiffExtractPage Method / TiffExtractPage(Int32,Int32,Stream,TiffCompression) Method
A unique image identifier of the GdPicture image representing the multipage TIFF image.
The page number of a page you want to extract. It must be a value from 1 to GdPictureImaging.TiffGetPageCount.
A Stream object where the TIFF image of the extracted page will be saved to. This Stream object must be initialized before it can be sent into this method and it should remain open for subsequent use.





In This Topic
TiffExtractPage(Int32,Int32,Stream,TiffCompression) Method
In This Topic
This method allows you to directly extract a specified page from a multipage TIFF image, that is represented by its unique image identifier. The required page is easily extracted to a TIFF image file without the need to decode and re-encode the bitmap.

This method only handles multipage TIFF images, both editable or opened as read-only.

Be aware that when working with the multipage TIFF format using GdPicture images, the resulting image files created from individual pages are compressed in memory using the TIFF CCITT 4 compression when they are bitonal, otherwise they are compressed using the TIFF LZW compression.

Syntax
'Declaration
 
Public Overloads Function TiffExtractPage( _
   ByVal ImageID As Integer, _
   ByVal Page As Integer, _
   ByVal Stream As Stream, _
   Optional ByVal Compression As TiffCompression _
) As GdPictureStatus
public GdPictureStatus TiffExtractPage( 
   int ImageID,
   int Page,
   Stream Stream,
   TiffCompression Compression
)
public function TiffExtractPage( 
    ImageID: Integer;
    Page: Integer;
    Stream: Stream;
    Compression: TiffCompression
): GdPictureStatus; 
public function TiffExtractPage( 
   ImageID : int,
   Page : int,
   Stream : Stream,
   Compression : TiffCompression
) : GdPictureStatus;
public: GdPictureStatus TiffExtractPage( 
   int ImageID,
   int Page,
   Stream* Stream,
   TiffCompression Compression
) 
public:
GdPictureStatus TiffExtractPage( 
   int ImageID,
   int Page,
   Stream^ Stream,
   TiffCompression Compression
) 

Parameters

ImageID
A unique image identifier of the GdPicture image representing the multipage TIFF image.
Page
The page number of a page you want to extract. It must be a value from 1 to GdPictureImaging.TiffGetPageCount.
Stream
A Stream object where the TIFF image of the extracted page will be saved to. This Stream object must be initialized before it can be sent into this method and it should remain open for subsequent use.
Compression

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 supports multipage TIFF images, both editable or opened as read-only. If the specified image is not a multipage image, this method will fail.

Please note that the output stream should be open for writing and should be closed/disposed of by the user as well.

This method requires the Image Documents component to run.

See Also