ImageGear for C and C++ on Windows v19.10 - Updated
IG_mpi_page_get
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Multi Page Image Functions > IG_mpi_page_get

This function returns the value of a page array with index nPage.

Declaration:

 
Copy Code
AT_ERRCOUNT  ACCUAPI  IG_mpi_page_get( 
        [IN] HMIGEAR hMIGear, 
        [IN] UINT nPage, 
        [OUT] LPHIGEAR lpHIPage
);

Arguments:

Name Type Description
hMIGear HMIGEAR The handle to the allocated multi-page image.
nPage UINT The number of the page to return.
lpHIPage LPHIGEAR The far pointer indicating where to return a handle of the page.

Return Value:

Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Sample:

MFC Multipage

Example:

 
Copy Code
HMIGEAR hMIGear;        /* handle to multi-page image */
AT_ERRCOUNT             nErrCount = IGE_SUCCESS;   /* will hold returned error count */
UINT nPageCount = 0; /* number of pages that should get from multi-page image */
UINT I = 0;
HIGEAR hIGear;     /* handle of an image */
 ...
nErrCount = IG_mpi_page_get( hMIGear, i, &hIGear );
 ... 

Remarks:

This value can be either NULL or a valid HIGEAR handle.

The multi-page image is not changed. This function makes a copy of the page handle.

This function does not load the page from an external file, but just returns the current page value of the multi-page image.

For multi-page vector documents, this function GETS a page from the underneath vector document data. The following formats are currently supported by this API: PDF, PostScript.