GetNextImageFile Method of the IImageSource Interface
This method is implemented on the client-side. The method returns the next image file from the image processing queue of the source.
Note: If you work with images that were already loaded into memory (for example, you use the OpenBitmap or OpenDib methods of the Engine object), implement GetNextImageDocument.
An implementation of the GetNextImageFile method may include time to wait for the next image file. However, we do not recommend implementing long waiting times, as FineReader Engine is not multithreaded. While waiting for the next file, the Engine will not be able to process messages from the recognition processes and receive notifications that certain pages have been processed. If you do need to specify a long waiting time, the GetNextImageFile method may return 0. In this case, the Engine will continue processing messages from the recognition processes and providing recognized images and after a while will check if the image queue is empty. If the queue is not empty (i.e., if IImageSource::IsEmpty returns FALSE), the Engine will call the GetNextImageFile method again. However, if the GetNextImageFile method returns 0 and there are no more pages to process, FineReader Engine will return control to the user: the IBatchProcessor::GetNextProcessedPage method will return 0.
Syntax
C++
HRESULT GetNextImageFile( IFileAdapter** Result );
C#
IFileAdapter GetNextImageFile();
Visual Basic .NET
Function GetNextImageFile() As IFileAdapter
Parameters
- Result
- [out, retval] A pointer to IFileAdapter* pointer variable that provides access to the next image file in the queue.
Return values
[C++ only] If this method returns a value other than S_OK, it indicates that an error occurred on the client-side.
Remarks
- The client implementation of this method must assure that all exceptions thrown inside the method are caught and handled and no exceptions are propagated outside the method. Propagation of an exception outside the method may lead to unpredictable results (such as program termination).
- If your license includes the Office Formats Opening module, you may also use this method to open digital documents of supported formats.
Samples
C# code
See also
9/17/2024 3:14:40 PM