A callback function is a function that you write and that LEADTOOLS calls. With a callback function you can add processing, and in some cases, you can direct the input or output of a LEADTOOLS engine such as the decompression engine. Generally, the engine is in a loop. In cases where you can direct the output, with each time through the loop, it fills a buffer with data and calls your function to process the data.
Callback functions are also commonly used to update status bars or to see if the user wants to interrupt the process. The L_SetStatusCallBack function enables you to do that with many functions that do not declare a callback in the parameter list.
To retrieve the current status callback function, and any associated user-defined data, call L_GetStatusCallBack.
In addition, many of the LEADTOOLS functions let you pass a parameter that specifies a callback function. These callback functions are more flexible than the one specified with L_SetStatusCallBack. There are some variations in how the idea is implemented, and you must refer to the individual function descriptions to see how they are used.
LEADTOOLS C API callback functions let you perform the following:
File-to-buffer compression and decompression
File-to-buffer image loading
Redirected I/O functions for memory-to-memory compression and decompression
On-the-fly resizing
Painting while loading
Seeing if the user wants to interrupt the process
Updating a status bar
Providing help for dialogs
For a list of the possible callback functions, refer to Callbacks.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document