#include "l_bitmap.h"
L_LTFIL_API L_INT L_SetFilterInfo(pFilterInfo, uFilterCount, uFlags)
pFILTERINFO pFilterInfo; |
pointer to FILTERINFO structure |
L_UINT uFilterCount; |
number of elements in an array |
L_UINT uFlags; |
flags |
Changes all of the filter information obtained in the array ppFilterList parameter by calling the L_GetFilterListInfo function; or changes the information foe a specific filter obtained in pFilterInfo parameter by calling the L_GetFilterInfo function.
Parameter | Description | |
pFilterInfo | Pointer to FILTERINFO structure containing filter information. This parameter cannot be NULL. This pointer points to either an array of information for all filters (obtained by the L_GetFilterListInfo function); or to information for a specific filter 9obtained by the L_GetFilterInfo function). | |
uFilterCount | Value that represents the number of elements in the pFilterInfo parameter. Possible values are: | |
Value | Meaning | |
1 | Change only the memory stored inside the pFilterInfo parameter obtained by the L_GetFilterInfo function. | |
> 1 | Change the memory allocated in the array of information for all filters obtained in the ppFilterList parameter by calling L_GetFilterListInfo function. | |
uFlags | Reserved for future use. Pass 0. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
The filters are identified by the value of pFilterInfo.szName.
There are currently three types of information that can be changed for a filter:
1. | The extension list associated with a specific filter. | |
LEADTOOLS will use the extension list specified by the value of pFilterInfo.pszExtensionList member to quickly test the file format. Whenever L_FileInfo function is called for a certain file, the file extension is matched against all the extension lists associated with the file filters. For example, the CMP filter is used to check for files with extensions cmp, jpg, jpeg or tif. If you want to check files with a specextension intended to check, add them to the usual extension list and call L_SetFilterInfo function. | ||
2. | Extended filter checking for a file. Extended filter checking is specified by the value of pFilterInfo.uFlags member: | |
|
|
|
|
|
|
|
|
|
|
|
|
3. | How the filter will be handled. The method of handling the filter is specified by the value of the pFilterInfo.uFlags member. If it is set to: | |
Handling Method: | Meaning: | |
FILTERINFO_IGNORED | Ignore the filter. In this case, the user cannot load, save or get information for files handled by this filter. This flag overrides the other flags. For more information, refer to the L_IgnoreFilters function. | |
FILTERINFO_FIXED | Fix the filter in memory. Fixed filters will not be unloaded even when the maximum number of filters that can be loaded in memory is reached. | |
To set the maximum number of filters that will be loaded at a certain time, specify the value of the nFixedFilters parameter of the L_PreLoadFilters function. | ||
FILTERINFO_DYNAMIC | Load and unload the filter dynamically as required. LEADTOOLS will load filters when the user loads, saves or checks files of the corresponding format. When the maximum number of filters has been loaded, the least recently used filter will be unloaded. | |
To set the number of filters that can be loaded and unloaded dynamically, specify the value of nCachedFilters parameter of L_PreLoadFilters function. | ||
If neither FILTERINFO_IGNORED nor FILTERINFO_FIXED is set in the the pFilterInfo.uFlags member, FILTERINFO_DYNAMIC will be used automatically. | ||
You can check whether the filter is dynamic with the following statement:
(uFlags & FILTERINFO_LOADMASK) == FILTERINFO_DYNAMIC |
If the filter name (pFilterInfo.szName member) is invalid, the function will return ERROR_INV_FILTERNAME error code.
Required DLLs and Libraries
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
Functions: |
L_GetFilterListInfo, L_GetFilterInfo, L_FreeFilterInfo, L_IgnoreFilters, L_PreLoadFilters, L_FileInfo |
Topics: |
|
|
Raster Image Functions: Getting and Setting File Information |
|
For an example, refer to L_GetFilterInfo.
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET