File Content Extraction 26.1
XML Export SDK C Programming Guide

# Obtain Image Info

When exporting from presentation graphics files, and when using the `pdf2sr` reader to export from PDF files, File Content Extraction can obtain information about the number of images that it would create during export, without having to run a full export. This option uses function pointers that are part of the KVXMLInterfaceEx structure.

To extract image information

1. Initialize an image information session by calling the `fpGetOutputImageInfos()` function. You must pass the return value for this function to the other image functions.
2. Call the `fpGetOutputImageCount()` function to get the number of images identified.
3. (Optional) For each image, call `fpGetOutputImageInfo()` to obtain the image dimensions.
4. Free the internal resources associated with the image information session by calling `fpFreeImageInfos()`.

## Example

    int numberOfImages = 0;
    void* pImageInfoContext = (*KVXMLInt.fpGetOutputImageInfos)(pContext, &inputStream, &options);
    if (pImageInfoContext == NULL)
    {
       // Error handling code would go here.
       // fpGetKvErrorCode() could be called here to investigate.
    }
    (*KVXMLInt.fpGetOutputImageCount)(pImageInfoContext, &numberOfImages);
    for (int i = 0; i < numberOfImages; i++)
    {
       KVXMLImageInfo imageInfo;
       KVStructInit(&imageInfo);
       if ((*KVXMLInt.fpGetOutputImageInfo)(pImageInfoContext, i, &imageInfo))
       {
          // imageInfo.nWidth and imageInfo.nHeight
          // contain the dimensions at this point.
       }
    }
    (*KVXMLInt.fpFreeImageInfos)(pContext, pImageInfoContext);
    pImageInfoContext = NULL;

Copyright 1997-2025 Open Text
Version 26.1 | Last updated January 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: File Content Extraction 26.1

Topic Title: Obtain Image Info