ImageGear for C and C++ on Windows v19.0
IG_mpi_page_set

This function assigns a new value to the page of the multi-page image.

Declaration:

 
Copy Code
AT_ERRCOUNT IG_mpi_page_set( 
        [IN] HMIGEAR hMIGear, 
        [IN] UINT nPage, 
        [IN] HIGEAR hIPage
);

Arguments:

Name Type Description
hMIGear HMIGEAR The handle to the allocated multi-page image.
nPage UINT The index of the page to set.
hIPage HIGEAR The handle of the image to set.

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 */
HIGEAR hPage1,
                hPage2;
 ...
/* initialize of multi-page image and assign it with external file */
nErrCount = IG_mpi_page_count_get( hMIGear, &nPageCount );
/* Swap first page and last page */
if (!nErrCount && nPageCount > 1)
{
        nErrCount += IG_mpi_page_get( hMIGear, 0, &hPage1 );
        nErrConut += IG_mpi_page_get( hMIGear, nPageCount - 1, &hPage2 );
        if (!nErrCount)
        {
        nErrCount += IG_mpi_page_set(hMIGear, iPage1, hPage2 );
        nErrCount += IG_mpi_page_set(hMIGear, iPage2, hPage1 );
        }
}

Remarks:

The previous value is not deleted with the IG_image_delete() function. The size of the multi-page image is not changed, so that page arrays is not expanded when nPage is greater than nPageCount-1.

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

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback